00001 /* 00002 * This file is part of Healpix_cxx. 00003 * 00004 * Healpix_cxx is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * Healpix_cxx is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with Healpix_cxx; if not, write to the Free Software 00016 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00017 * 00018 * For more information about HEALPix, see http://healpix.sourceforge.net 00019 */ 00020 00021 /* 00022 * Healpix_cxx is being developed at the Max-Planck-Institut fuer Astrophysik 00023 * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt 00024 * (DLR). 00025 */ 00026 00027 /*! \file powspec_fitsio.h 00028 * Copyright (C) 2003-2013 Max-Planck-Society 00029 * \author Martin Reinecke 00030 */ 00031 00032 #ifndef POWSPEC_FITSIO_H 00033 #define POWSPEC_FITSIO_H 00034 00035 #include <string> 00036 00037 class fitshandle; 00038 class PowSpec; 00039 00040 /*! \defgroup powspec_fitsio_group FITS-based I/O of power spectra */ 00041 /*! \{ */ 00042 00043 /*! Reads the power spectrum stored in the FITS binary table pointed to by 00044 \a inp into \a powspec. */ 00045 void read_powspec_from_fits (fitshandle &inp, PowSpec &powspec, int nspecs, 00046 int lmax); 00047 /*! Opens the FITS file \a filename, jumps to HDU \a hdunum, and reads \a nspecs 00048 columns into \a powspec. \a nspecs must be 1, 4, or 6. */ 00049 void read_powspec_from_fits (const std::string &infile, 00050 PowSpec &powspec, int nspecs, int lmax, int hdunum=2); 00051 00052 /*! Inserts a new binary table into \a out, which contains \a nspecs columns 00053 of FITS type TDOUBLE, and writes the components of \a powspec into it. 00054 \a nspecs must be 1, 4, or 6. */ 00055 void write_powspec_to_fits (fitshandle &out, 00056 const PowSpec &powspec, int nspecs); 00057 /*! Creates a new FITS file called \a outfile, inserts a binary table, 00058 which contains \a nspecs columns of FITS type TDOUBLE, and writes the 00059 components of \a powspec into it. \a nspecs must be 1, 4, or 6. */ 00060 void write_powspec_to_fits (const std::string &outfile, 00061 const PowSpec &powspec, int nspecs); 00062 00063 /*! \} */ 00064 00065 #endif