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_healpix_tools.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_healpix_tools.h
00028  *  Copyright (C) 2003, 2004, 2005 Max-Planck-Society
00029  *  \author Martin Reinecke
00030  */
00031 
00032 #ifndef HEALPIX_ALM_HEALPIX_TOOLS_H
00033 #define HEALPIX_ALM_HEALPIX_TOOLS_H
00034 
00035 #include "xcomplex.h"
00036 #include "arr.h"
00037 
00038 template<typename T> class Alm;
00039 template<typename T> class Healpix_Map;
00040 
00041 /*! \defgroup alm_healpix_group Conversions between a_lm and HEALPix maps */
00042 /*! \{ */
00043 
00044 /*! Converts a Healpix map to a set of a_lms.
00045     \param map the input map, which must have RING ordering
00046     \param alm the output a_lms. l_max and m_max of the conversion are
00047            determined from this object.
00048     \param weight array containing the weights for the individual rings of
00049            the map. It must have at least 2*\a map.Nside() entries.
00050     \param add_alm If this is \a true, then the computed a_lm are added
00051            to the values already residing in \a alm. */
00052 template<typename T> void map2alm (const Healpix_Map<T> &map,
00053   Alm<xcomplex<T> > &alm, const arr<double> &weight,
00054     bool add_alm=false);
00055 
00056 /*! Converts a Healpix map to a set of a_lms, using an iterative scheme
00057     which is more accurate than plain map2alm().
00058     \param map the input map, which must have RING ordering.
00059     \param alm the output a_lms. l_max and m_max of the conversion are
00060            determined from this object.
00061     \param num_iter the number of iterations (0 is identical to map2alm()).
00062     \param weight array containing the weights for the individual rings of
00063            the map. It must have at least 2*\a map.Nside() entries. */
00064 template<typename T> void map2alm_iter (const Healpix_Map<T> &map,
00065   Alm<xcomplex<T> > &alm, int num_iter, const arr<double> &weight);
00066 
00067 template<typename T> void map2alm_iter (const Healpix_Map<T> &map,
00068   Alm<xcomplex<T> > &alm, int num_iter)
00069   {
00070   arr<double> wgt(2*map.Nside());
00071   wgt.fill(1);
00072   map2alm_iter(map,alm,num_iter,wgt);
00073   }
00074 
00075 template<typename T> void map2alm_iter2 (const Healpix_Map<T> &map,
00076   Alm<xcomplex<T> > &alm, double err_abs, double err_rel);
00077 
00078 /*! Converts Healpix maps containing the I, Q and U Stokes parameters
00079     to sets of a_lms.
00080     \param mapT the I-Stokes parameter input map
00081     \param mapQ the Q-Stokes parameter input map
00082     \param mapU the U-Stokes parameter input map
00083     \note All maps must have the same nside, and must be in RING scheme.
00084     \param almT the output temperature a_lms
00085     \param almG the output gradient a_lms
00086     \param almC the output curl a_lms
00087     \note all a_lm sets must have the the same lmax and mmax.
00088     \param weight ring weights for the maps.
00089     \param add_alm If this is \a true, then the computed a_lm are added
00090            to the values already residing in \a alm.
00091     \note The weight array must have at least 2*\a mapT.Nside() entries. */
00092 template<typename T> void map2alm_pol
00093   (const Healpix_Map<T> &mapT,
00094    const Healpix_Map<T> &mapQ,
00095    const Healpix_Map<T> &mapU,
00096    Alm<xcomplex<T> > &almT,
00097    Alm<xcomplex<T> > &almG,
00098    Alm<xcomplex<T> > &almC,
00099    const arr<double> &weight,
00100    bool add_alm=false);
00101 /*! Converts Healpix maps containing the I, Q and U Stokes parameters
00102     to sets of a_lms, using an iterative scheme which is more accurate than
00103     plain map2alm_pol().
00104     \param mapT the I-Stokes parameter input map
00105     \param mapQ the Q-Stokes parameter input map
00106     \param mapU the U-Stokes parameter input map
00107     \note All maps must have the same nside, and must be in RING scheme.
00108     \param almT the output temperature a_lms
00109     \param almG the output gradient a_lms
00110     \param almC the output curl a_lms
00111     \note all a_lm sets must have the the same lmax and mmax.
00112     \param num_iter the number of iterations (0 is identical to map2alm_pol()).
00113     \param weight ring weights for the maps.
00114     \note The weight array must have at least 2*\a mapT.Nside() entries. */
00115 template<typename T> void map2alm_pol_iter
00116   (const Healpix_Map<T> &mapT,
00117    const Healpix_Map<T> &mapQ,
00118    const Healpix_Map<T> &mapU,
00119    Alm<xcomplex<T> > &almT,
00120    Alm<xcomplex<T> > &almG,
00121    Alm<xcomplex<T> > &almC,
00122    int num_iter,
00123    const arr<double> &weight);
00124 
00125 template<typename T> void map2alm_pol_iter
00126   (const Healpix_Map<T> &mapT,
00127    const Healpix_Map<T> &mapQ,
00128    const Healpix_Map<T> &mapU,
00129    Alm<xcomplex<T> > &almT,
00130    Alm<xcomplex<T> > &almG,
00131    Alm<xcomplex<T> > &almC,
00132    int num_iter)
00133   {
00134   arr<double> wgt(2*mapT.Nside());
00135   wgt.fill(1);
00136   map2alm_pol_iter(mapT,mapQ,mapU,almT,almG,almC,num_iter,wgt);
00137   }
00138 
00139 template<typename T> void map2alm_pol_iter2
00140   (const Healpix_Map<T> &mapT,
00141    const Healpix_Map<T> &mapQ,
00142    const Healpix_Map<T> &mapU,
00143    Alm<xcomplex<T> > &almT,
00144    Alm<xcomplex<T> > &almG,
00145    Alm<xcomplex<T> > &almC,
00146    double err_abs, double err_rel);
00147 
00148 /*! Converts a a set of a_lm to a HEALPix map.
00149     \param alm the input a_lms. l_max and m_max of the conversion are
00150            determined from this object.
00151     \param map the output map, which must have RING ordering. */
00152 template<typename T> void alm2map (const Alm<xcomplex<T> > &alm,
00153   Healpix_Map<T> &map);
00154 
00155 /*! Converts a a set of polarised a_lm to a HEALPix map.
00156     \param almT the input temperature a_lms
00157     \param almG the input gradient a_lms
00158     \param almC the input curl a_lms
00159     \param mapT the I-Stokes parameter output map
00160     \param mapQ the Q-Stokes parameter output map
00161     \param mapU the U-Stokes parameter output map */
00162 template<typename T> void alm2map_pol
00163   (const Alm<xcomplex<T> > &almT,
00164    const Alm<xcomplex<T> > &almG,
00165    const Alm<xcomplex<T> > &almC,
00166    Healpix_Map<T> &mapT,
00167    Healpix_Map<T> &mapQ,
00168    Healpix_Map<T> &mapU);
00169 
00170 /*! Converts a a set of a_lm to a HEALPix map and its first derivatives.
00171     \param alm the input a_lms. l_max and m_max of the conversion are
00172            determined from this object.
00173     \param map the output map, which must have RING ordering.
00174     \param mapdth an output map containing \f$d (\mbox{map})/d\vartheta\f$,
00175            which must have RING ordering.
00176     \param mapdph an output map containing
00177            \f$(\sin\vartheta)^{-1}d(\mbox{map})/d\varphi\f$,
00178            which must have RING ordering. */
00179 template<typename T> void alm2map_der1
00180   (const Alm<xcomplex<T> > &alm,
00181    Healpix_Map<T> &map,
00182    Healpix_Map<T> &mapdth,
00183    Healpix_Map<T> &mapdph);
00184 
00185 /*! \} */
00186 
00187 #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