Healpix C++  3.83
powspec_fitsio.h
Go to the documentation of this file.
1 /*
2  * This file is part of Healpix_cxx.
3  *
4  * Healpix_cxx is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * Healpix_cxx is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with Healpix_cxx; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * For more information about HEALPix, see http://healpix.sourceforge.net
19  */
20 
21 /*
22  * Healpix_cxx is being developed at the Max-Planck-Institut fuer Astrophysik
23  * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt
24  * (DLR).
25  */
26 
27 /*! \file powspec_fitsio.h
28  * Copyright (C) 2003-2017 Max-Planck-Society
29  * \author Martin Reinecke
30  */
31 
32 #ifndef POWSPEC_FITSIO_H
33 #define POWSPEC_FITSIO_H
34 
35 #include <string>
36 
37 class fitshandle;
38 class PowSpec;
39 
40 /*! \defgroup powspec_fitsio_group FITS-based I/O of power spectra */
41 /*! \{ */
42 
43 /*! Reads the power spectrum stored in the FITS binary table pointed to by
44  \a inp into \a powspec. */
45 void read_powspec_from_fits (fitshandle &inp, PowSpec &powspec, int nspecs,
46  int lmax);
47 /*! Reads the power spectrum stored in the FITS binary table pointed to by
48  \a inp. */
49 PowSpec read_powspec_from_fits (fitshandle &inp, int nspecs, int lmax);
50 /*! Opens the FITS file \a filename, jumps to HDU \a hdunum, and reads \a nspecs
51  columns into \a powspec. \a nspecs must be 1, 4, or 6. */
52 void read_powspec_from_fits (const std::string &infile,
53  PowSpec &powspec, int nspecs, int lmax, int hdunum=2);
54 /*! Opens the FITS file \a filename, jumps to HDU \a hdunum, and reads \a nspecs
55  columns into \a powspec. \a nspecs must be 1, 4, or 6. */
56 PowSpec read_powspec_from_fits (const std::string &infile, int nspecs, int lmax,
57  int hdunum=2);
58 
59 /*! Inserts a new binary table into \a out, which contains \a nspecs columns
60  of FITS type TDOUBLE, and writes the components of \a powspec into it.
61  \a nspecs must be 1, 4, or 6. */
62 void write_powspec_to_fits (fitshandle &out,
63  const PowSpec &powspec, int nspecs);
64 /*! Creates a new FITS file called \a outfile, inserts a binary table,
65  which contains \a nspecs columns of FITS type TDOUBLE, and writes the
66  components of \a powspec into it. \a nspecs must be 1, 4, or 6. */
67 void write_powspec_to_fits (const std::string &outfile,
68  const PowSpec &powspec, int nspecs);
69 
70 /*! \} */
71 
72 #endif
void read_powspec_from_fits(fitshandle &inp, PowSpec &powspec, int nspecs, int lmax)
void write_powspec_to_fits(fitshandle &out, const PowSpec &powspec, int nspecs)

Generated on Wed Nov 13 2024 12:18:30 for Healpix C++