alm_powspec_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.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 alm_powspec_tools.h
00028  *  Copyright (C) 2003, 2004, 2005 Max-Planck-Society
00029  *  \author Martin Reinecke
00030  */
00031 
00032 #ifndef PLANCK_ALM_POWSPEC_TOOLS_H
00033 #define PLANCK_ALM_POWSPEC_TOOLS_H
00034 
00035 #include "xcomplex.h"
00036 
00037 template<typename T> class Alm;
00038 class PowSpec;
00039 class planck_rng;
00040 class rotmatrix;
00041 
00042 /*! \defgroup alm_ps_group Conversions between a_lm and power spectra */
00043 /*! \{ */
00044 
00045 /*! Creates a Gaussian realisation of the input power spectrum \a powspec,
00046     using the random number generator \a rng, and returns the result
00047     in \a alm. */
00048 template<typename T> void create_alm (const PowSpec &powspec,
00049   Alm<xcomplex<T> > &alm, planck_rng &rng);
00050 
00051 /*! Creates a Gaussian realisation of the polarised input power spectrum
00052     \a powspec, using the random number generator \a rng, and returns the
00053     result in \a almT, \a almG and \a almC. */
00054 template<typename T> void create_alm_pol
00055   (const PowSpec &powspec,
00056    Alm<xcomplex<T> > &almT,
00057    Alm<xcomplex<T> > &almG,
00058    Alm<xcomplex<T> > &almC,
00059    planck_rng &rng);
00060 
00061 /*! Returns the unpolarised power spectrum of \a alm in \a powspec. */
00062 template<typename T> void extract_powspec
00063   (const Alm<xcomplex<T> > &alm, PowSpec &powspec);
00064 /*! Returns the cross power spectrum of \a alm1 and \a alm2 in \a powspec. */
00065 template<typename T> void extract_crosspowspec
00066   (const Alm<xcomplex<T> > &alm1,
00067    const Alm<xcomplex<T> > &alm2, PowSpec &powspec);
00068 /*! Returns the polarised power spectrum of \a almT, \a almG and \a almC
00069     in \a powspec. */
00070 template<typename T> void extract_powspec
00071   (const Alm<xcomplex<T> > &almT,
00072    const Alm<xcomplex<T> > &almG,
00073    const Alm<xcomplex<T> > &almC,
00074    PowSpec &powspec);
00075 
00076 /*! \} */
00077 
00078 /*! Applies a convolution with a Gaussian beam with an FWHM of
00079     \a fwhm (in radian) to \a alm.
00080     \note If \a fwhm<0, a deconvolution with \a -fwhm is performed.
00081     \relates Alm */
00082 template<typename T> void smoothWithGauss
00083   (Alm<xcomplex<T> > &alm, double fwhm);
00084 /*! Applies a convolution with a Gaussian beam with an FWHM of
00085     \a fwhm (in radian) to \a almT, \a almG and \a almC.
00086     \note If \a fwhm<0, a deconvolution with \a -fwhm is performed.
00087     \relates Alm */
00088 template<typename T> void smoothWithGauss
00089   (Alm<xcomplex<T> > &almT,
00090    Alm<xcomplex<T> > &almG,
00091    Alm<xcomplex<T> > &almC,
00092    double fwhm);
00093 
00094 /*! Rotates \a alm through the Euler angles \a psi, \a theta and \a phi.
00095     The Euler angle convention  is right handed, rotations are active.
00096     - \a psi is the first rotation about the z-axis (vertical)
00097     - then \a theta about the ORIGINAL (unrotated) y-axis
00098     - then \a phi  about the ORIGINAL (unrotated) z-axis (vertical)
00099     \relates Alm */
00100 template<typename T> void rotate_alm (Alm<xcomplex<T> > &alm,
00101   double psi, double theta, double phi);
00102 
00103 /*! Rotates \a almT, \a almG and \a almC through the Euler angles
00104     \a psi, \a theta and \a phi.
00105     The Euler angle convention  is right handed, rotations are active.
00106     - \a psi is the first rotation about the z-axis (vertical)
00107     - then \a theta about the ORIGINAL (unrotated) y-axis
00108     - then \a phi  about the ORIGINAL (unrotated) z-axis (vertical)
00109     \relates Alm */
00110 template<typename T> void rotate_alm (Alm<xcomplex<T> > &almT,
00111   Alm<xcomplex<T> > &almG, Alm<xcomplex<T> > &almC,
00112   double psi, double theta, double phi);
00113 
00114 /*! Rotates \a alm through the rotation matrix \a mat.
00115     \relates Alm */
00116 template<typename T> void rotate_alm (Alm<xcomplex<T> > &alm,
00117   const rotmatrix &mat);
00118 
00119 /*! Rotates \a almT, \a almG and \a almC through the rotation matrix \a mat.
00120     \relates Alm */
00121 template<typename T> void rotate_alm (Alm<xcomplex<T> > &almT,
00122   Alm<xcomplex<T> > &almG, Alm<xcomplex<T> > &almC,
00123   const rotmatrix &mat);
00124 
00125 #endif

Generated on Wed Apr 24 11:31:18 2013 for Healpix C++