NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links

alm_fitsio.h

Go to the documentation of this file.
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.jpl.nasa.gov
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 alm_fitsio.h
00028  *  FITS I/O for spherical harmonic coefficients
00029  *
00030  *  Copyright (C) 2003, 2004, 2005 Max-Planck-Society
00031  *  \author Martin Reinecke
00032  */
00033 
00034 #ifndef PLANCK_ALM_FITSIO_H
00035 #define PLANCK_ALM_FITSIO_H
00036 
00037 #include <string>
00038 #include "xcomplex.h"
00039 class fitshandle;
00040 
00041 template<typename T> class Alm;
00042 
00043 /*! \defgroup alm_fitsio_group FITS-based I/O of a_lm */
00044 /*! \{ */
00045 
00046 /*! Returns the maximum \a l and \a m multipole moments found in the FITS HDU
00047     pointed to be \a inp in \a lmax and \a mmax. */
00048 void get_almsize(fitshandle &inp, int &lmax, int &mmax);
00049 /*! Returns the maximum \a l and \a m multipole moments found in the HDU
00050     \a hdunum of file \a filename in \a lmax and \a mmax. */
00051 void get_almsize(const std::string &filename, int &lmax, int &mmax,
00052   int hdunum=2);
00053 /*! Returns the maximum \a l and \a m multipole moments found in the HDUs
00054     2, 3 and 4 of file \a filename in \a lmax and \a mmax. */
00055 void get_almsize_pol(const std::string &filename, int &lmax, int &mmax);
00056 
00057 /*! Reads the a_lm of the FITS binary table pointed to by \a inp into
00058     \a alms. \a alms is reallocated with the parameters \a lmax and \a mmax.
00059     Values not present in the FITS table are set to zero; values outside
00060     the requested (l,m) range are ignored. */
00061 template<typename T> void read_Alm_from_fits
00062   (fitshandle &inp, Alm<xcomplex<T> > &alms, int lmax, int mmax);
00063 /*! Opens the FITS file \a filename, jumps to the HDU \a hdunum, then reads
00064     the a_lm from the FITS binary table there into \a alms. \a alms is
00065     reallocated with the parameters \a lmax and \a mmax.
00066     Values not present in the FITS table are set to zero; values outside
00067     the requested \a (l,m) range are ignored. */
00068 template<typename T> void read_Alm_from_fits
00069   (const std::string &filename, Alm<xcomplex<T> > &alms,
00070    int lmax, int mmax, int hdunum=2);
00071 
00072 /*! Inserts a new binary table into \a out, which contains three columns
00073     of FITS type TINT32BIT, \a datatype and \a datatype, respectively.
00074     The data in \a alms is written into this table; values outside
00075     the requested (\a lmax, \a mmax) range are omitted. */
00076 template<typename T> void write_Alm_to_fits
00077   (fitshandle &out, const Alm<xcomplex<T> > &alms,
00078    int lmax, int mmax, int datatype);
00079 
00080 /*! Inserts a new binary table into \a out, which contains three columns
00081     of FITS type TINT32BIT, \a datatype and \a datatype, respectively.
00082     The data in \a alms is written into this table; values outside
00083     the requested (\a lmax, \a mmax) range are omitted. Values with an absolute
00084     magnitude of zero are not written. */
00085 template<typename T> void write_compressed_Alm_to_fits
00086   (fitshandle &out, const Alm<xcomplex<T> > &alms,
00087    int lmax, int mmax, int datatype);
00088 
00089 /*! \} */
00090 
00091 #endif

Generated on Fri Jun 18 16:12:30 2010 for Healpix C++
Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:
Webmaster:

CL 03-2650