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-2010 Max-Planck-Society 00029 * \author Martin Reinecke 00030 */ 00031 00032 #ifndef POWSPEC_FITSIO_H 00033 #define POWSPEC_FITSIO_H 00034 00035 #include <string> 00036 class fitshandle; 00037 00038 class PowSpec; 00039 00040 /*! \defgroup powspec_fitsio_group FITS-based I/O of power spectra */ 00041 /*! \{ */ 00042 00043 /*! Opens the FITS file \a filename, jumps to HDU 2, and reads \a nspecs 00044 columns into \a powspec. \a nspecs must be 1, 4, or 6. */ 00045 void read_powspec_from_fits (const std::string &infile, 00046 PowSpec &powspec, int nspecs, int lmax); 00047 /*! Inserts a new binary table into \a out, which contains \a nspecs columns 00048 of FITS type TDOUBLE, and writes the components of \a powspec into it. 00049 \a nspecs must be 1, 4, or 6. */ 00050 void write_powspec_to_fits (fitshandle &out, 00051 const PowSpec &powspec, int nspecs); 00052 00053 /*! Creates a new FITS file called \a outfile, inserts a binary table, 00054 which contains \a nspecs columns of FITS type TDOUBLE, and writes the 00055 components of \a powspec into it. \a nspecs must be 1, 4, or 6. */ 00056 void write_powspec_to_fits (const std::string &outfile, 00057 const PowSpec &powspec, int nspecs); 00058 00059 /*! \} */ 00060 00061 #endif