Changeset 1218 in Sophya for trunk/SophyaLib/Samba


Ignore:
Timestamp:
Oct 3, 2000, 2:14:14 PM (25 years ago)
Author:
ansari
Message:

doc dans .cc

Location:
trunk/SophyaLib/Samba
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/Samba/lambdaBuilder.cc

    r729 r1218  
    11#include "lambdaBuilder.h"
    22#include "nbconst.h"
     3
     4
     5/*!
     6  \class SOPHYA::Legendre
     7generate Legendre polynomials : use in two steps :
     8
     9a) instanciate Legendre(\f$x\f$, \f$lmax\f$) ; \f$x\f$ is the value for wich Legendre polynomials will be required (usually equal to \f$\cos \theta\f$) and \f$lmax\f$ is the MAXIMUM value of the order of polynomials wich will be required in the following code (all polynomials, from \f$l=0 to lmax\f$, are computed once for all by an iterative formula).
     10
     11b) get the value of Legendre polynomial for a particular value of \f$l\f$ by calling the method getPl.
     12
     13*/
    314
    415
     
    1223  array_init(lmax);
    1324}
     25   
     26/*! \fn void SOPHYA::Legendre::array_init(int_4 lmax)
     27
     28compute all \f$P_l(x,l_{max})\f$ for \f$l=1,l_{max}\f$
     29*/
    1430void Legendre::array_init(int_4 lmax)
    1531{
     
    2844TVector<r_8>* LambdaLMBuilder::normal_l_     = NULL;
    2945
     46
     47
     48/*! \class SOPHYA::LambdaLMBuilder
     49
     50
     51This class generate the coefficients :
     52\f[
     53            \lambda_l^m=\sqrt{\frac{2l+1}{4\pi}\frac{(l-m)!}{(l+m)!}}
     54            P_l^m(\cos{\theta})
     55\f]
     56where \f$P_l^m\f$ are the associated Legendre polynomials.  The above coefficients contain the theta-dependance of spheric harmonics :
     57\f[
     58            Y_{lm}(\cos{\theta})=\lambda_l^m(\cos{\theta}) e^{im\phi}.
     59\f]
     60
     61Each object has a fixed theta (radians), and maximum l and m to be calculated
     62(lmax and mmax).
     63 use the class in two steps :
     64a) instanciate  LambdaLMBuilder(\f$\theta\f$, \f$lmax\f$, \f$mmax\f$) ;  \f$lmax\f$ and \f$mmax\f$ are  MAXIMUM values for which \f$\lambda_l^m\f$ will be required in the following code (all coefficients, from \f$l=0 to lmax\f$, are computed once for all by an iterative formula).
     65b) get the values of coefficients for  particular values of \f$l\f$ and \f$m\f$ by calling the method lamlm.
     66*/
     67
     68
    3069LambdaLMBuilder::LambdaLMBuilder(r_8 theta,int_4 lmax, int_4 mmax)
    3170    {
     
    84123
    85124
     125/*! \fn void  SOPHYA::LambdaLMBuilder::updateArrayRecurrence(int_4 lmax)
     126
     127 compute a static array of coefficients independant from theta (common to all instances of the LambdaBuilder Class
     128*/
    86129void  LambdaLMBuilder::updateArrayRecurrence(int_4 lmax)
    87130   {
     
    98141   }
    99142
    100 
     143/*! \fn void  SOPHYA::LambdaLMBuilder::updateArrayLamNorm()
     144
     145 compute  static arrays of coefficients independant from theta (common to all instances of the derived  classes
     146*/
    101147void  LambdaLMBuilder::updateArrayLamNorm()
    102148     {
     
    119165
    120166
     167/*! \class SOPHYA::LambdaWXBuilder
     168
     169This class generates the coefficients :
     170\f[
     171            _{w}\lambda_l^m=-2\sqrt{\frac{2(l-2)!}{(l+2)!}\frac{(2l+1)}{4\pi}\frac{(l-m)!}{(l+m)!}} G^+_{lm}
     172\f]
     173\f[
     174            _{x}\lambda_l^m=-2\sqrt{\frac{2(l-2)!}{(l+2)!}\frac{(2l+1)}{4\pi}\frac{(l-m)!}{(l+m)!}}G^-_{lm}
     175\f]
     176where
     177\f[G^+_{lm}(\cos{\theta})=-\left( \frac{l-m^2}{\sin^2{\theta}}+\frac{1}{2}l\left(l-1\right)\right)P_l^m(\cos{\theta})+\left(l+m\right)\frac{\cos{\theta}}{\sin^2{\theta}}P^m_{l-1}(\cos{\theta})
     178\f]
     179and
     180\f[G^-_{lm}(\cos{\theta})=\frac{m}{\sin^2{\theta}}\left(\left(l-1\right)\cos{\theta}P^m_l(\cos{\theta})-\left(l+m\right)P^m_{l-1}(\cos{\theta})\right)
     181\f]
     182 \f$P_l^m\f$ are the associated Legendre polynomials.
     183
     184The coefficients express the theta-dependance of the \f$W_{lm}(\cos{\theta})\f$ and \f$X_{lm}(\cos{\theta})\f$ functions :
     185\f[W_{lm}(\cos{\theta}) = \sqrt{\frac{(l+2)!}{2(l-2)!}}_w\lambda_l^m(\cos{\theta})e^{im\phi}
     186\f]
     187\f[X_{lm}(\cos{\theta}) = -i\sqrt{\frac{(l+2)!}{2(l-2)!}}_x\lambda_l^m(\cos{\theta})e^{im\phi}
     188\f]
     189 where \f$W_{lm}(\cos{\theta})\f$ and \f$X_{lm}(\cos{\theta})\f$ are defined as :
     190
     191\f[
     192W_{lm}(\cos{\theta})=-\frac{1}{2}\sqrt{\frac{(l+2)!}{(l-2)!}}\left(
     193_{+2}Y_l^m(\cos{\theta})+_{-2}Y_l^m(\cos{\theta})\right)
     194\f]
     195\f[X_{lm}(\cos{\theta})=-\frac{i}{2}\sqrt{\frac{(l+2)!}{(l-2)!}}\left(
     196_{+2}Y_l^m(\cos{\theta})-_{-2}Y_l^m(\cos{\theta})\right)
     197\f]
     198
     199*/
    121200
    122201
     
    173252   }
    174253
     254/*!   \class SOPHYA::LambdaPMBuilder
     255
     256This class generates the coefficients
     257\f[
     258            _{\pm}\lambda_l^m=2\sqrt{\frac{(l-2)!}{(l+2)!}\frac{(2l+1)}{4\pi}\frac{(l-m)!}{(l+m)!}}\left( G^+_{lm} \mp G^-_{lm}\right)
     259\f]
     260where
     261\f[G^+_{lm}(\cos{\theta})=-\left( \frac{l-m^2}{\sin^2{\theta}}+\frac{1}{2}l\left(l-1\right)\right)P_l^m(\cos{\theta})+\left(l+m\right)\frac{\cos{\theta}}{\sin^2{\theta}}P^m_{l-1}(\cos{\theta})
     262\f]
     263and
     264\f[G^-_{lm}(\cos{\theta})=\frac{m}{\sin^2{\theta}}\left(\left(l-1\right)\cos{\theta}P^m_l(\cos{\theta})-\left(l+m\right)P^m_{l-1}(\cos{\theta})\right)
     265\f]
     266and \f$P_l^m\f$ are the associated Legendre polynomials.
     267The coefficients express the theta-dependance of the  spin-2 spherical harmonics :
     268\f[_{\pm2}Y_l^m(\cos{\theta})=_\pm\lambda_l^m(\cos{\theta})e^{im\phi}
     269\f]
     270*/
    175271
    176272LambdaPMBuilder::LambdaPMBuilder(r_8 theta, int_4 lmax, int_4 mmax) : LambdaLMBuilder(theta, lmax, mmax)
  • trunk/SophyaLib/Samba/lambdaBuilder.h

    r864 r1218  
    1010namespace SOPHYA {
    1111
    12 /*!
    13 generate Legendre polynomials : use in two steps :
    14 
    15 a) instanciate Legendre(\f$x\f$, \f$lmax\f$) ; \f$x\f$ is the value for wich Legendre polynomials will be required (usually equal to \f$\cos \theta\f$) and \f$lmax\f$ is the MAXIMUM value of the order of polynomials wich will be required in the following code (all polynomials, from \f$l=0 to lmax\f$, are computed once for all by an iterative formula).
    16 
    17 b) get the value of Legendre polynomial for a particular value of \f$l\f$ by calling the method getPl.
    18 */
     12/*!  classe pour les polynomes de legendre*/
    1913class Legendre {
    2014
     
    3226
    3327 private :
    34    /*! compute all \f$P_l(x,l_{max})\f$ for \f$l=1,l_{max}\f$ */
    3528  void array_init(int_4 lmax);
    3629
     
    4235
    4336
    44 /*!
    45 This class generate the coefficients :
    46 \f[
    47             \lambda_l^m=\sqrt{\frac{2l+1}{4\pi}\frac{(l-m)!}{(l+m)!}}
    48             P_l^m(\cos{\theta})
    49 \f]
    50 where \f$P_l^m\f$ are the associated Legendre polynomials.  The above coefficients contain the theta-dependance of spheric harmonics :
    51 \f[
    52             Y_{lm}(\cos{\theta})=\lambda_l^m(\cos{\theta}) e^{im\phi}.
    53 \f]
    54 
    55 Each object has a fixed theta (radians), and maximum l and m to be calculated
    56 (lmax and mmax).
    57  use the class in two steps :
    58 a) instanciate  LambdaLMBuilder(\f$\theta\f$, \f$lmax\f$, \f$mmax\f$) ;  \f$lmax\f$ and \f$mmax\f$ are  MAXIMUM values for which \f$\lambda_l^m\f$ will be required in the following code (all coefficients, from \f$l=0 to lmax\f$, are computed once for all by an iterative formula).
    59 b) get the values of coefficients for  particular values of \f$l\f$ and \f$m\f$ by calling the method lamlm.
    60 */
    6137 class LambdaLMBuilder {
    6238
     
    7147
    7248 private:
    73 /*! compute a static array of coefficients independant from theta (common to all instances of the LambdaBuilder Class */
    7449 void updateArrayRecurrence(int_4 lmax);
    7550
     
    8257 protected :
    8358
    84 /*! compute  static arrays of coefficients independant from theta (common to all instances of the derived  classes */
    8559 void updateArrayLamNorm();
    8660
     
    9670
    9771
    98 /*!
    99 
    100 This class generates the coefficients :
    101 \f[
    102             _{w}\lambda_l^m=-2\sqrt{\frac{2(l-2)!}{(l+2)!}\frac{(2l+1)}{4\pi}\frac{(l-m)!}{(l+m)!}} G^+_{lm}
    103 \f]
    104 \f[
    105             _{x}\lambda_l^m=-2\sqrt{\frac{2(l-2)!}{(l+2)!}\frac{(2l+1)}{4\pi}\frac{(l-m)!}{(l+m)!}}G^-_{lm}
    106 \f]
    107 where
    108 \f[G^+_{lm}(\cos{\theta})=-\left( \frac{l-m^2}{\sin^2{\theta}}+\frac{1}{2}l\left(l-1\right)\right)P_l^m(\cos{\theta})+\left(l+m\right)\frac{\cos{\theta}}{\sin^2{\theta}}P^m_{l-1}(\cos{\theta})
    109 \f]
    110 and
    111 \f[G^-_{lm}(\cos{\theta})=\frac{m}{\sin^2{\theta}}\left(\left(l-1\right)\cos{\theta}P^m_l(\cos{\theta})-\left(l+m\right)P^m_{l-1}(\cos{\theta})\right)
    112 \f]
    113  \f$P_l^m\f$ are the associated Legendre polynomials.
    114 
    115 The coefficients express the theta-dependance of the \f$W_{lm}(\cos{\theta})\f$ and \f$X_{lm}(\cos{\theta})\f$ functions :
    116 \f[W_{lm}(\cos{\theta}) = \sqrt{\frac{(l+2)!}{2(l-2)!}}_w\lambda_l^m(\cos{\theta})e^{im\phi}
    117 \f]
    118 \f[X_{lm}(\cos{\theta}) = -i\sqrt{\frac{(l+2)!}{2(l-2)!}}_x\lambda_l^m(\cos{\theta})e^{im\phi}
    119 \f]
    120  where \f$W_{lm}(\cos{\theta})\f$ and \f$X_{lm}(\cos{\theta})\f$ are defined as :
    121 
    122 \f[
    123 W_{lm}(\cos{\theta})=-\frac{1}{2}\sqrt{\frac{(l+2)!}{(l-2)!}}\left(
    124 _{+2}Y_l^m(\cos{\theta})+_{-2}Y_l^m(\cos{\theta})\right)
    125 \f]
    126 \f[X_{lm}(\cos{\theta})=-\frac{i}{2}\sqrt{\frac{(l+2)!}{(l-2)!}}\left(
    127 _{+2}Y_l^m(\cos{\theta})-_{-2}Y_l^m(\cos{\theta})\right)
    128 \f]
    129 
    130 */
    13172class LambdaWXBuilder : public LambdaLMBuilder
    13273{
     
    15697};
    15798
    158 /*!
    159 
    160 This class generates the coefficients
    161 \f[
    162             _{\pm}\lambda_l^m=2\sqrt{\frac{(l-2)!}{(l+2)!}\frac{(2l+1)}{4\pi}\frac{(l-m)!}{(l+m)!}}\left( G^+_{lm} \mp G^-_{lm}\right)
    163 \f]
    164 where
    165 \f[G^+_{lm}(\cos{\theta})=-\left( \frac{l-m^2}{\sin^2{\theta}}+\frac{1}{2}l\left(l-1\right)\right)P_l^m(\cos{\theta})+\left(l+m\right)\frac{\cos{\theta}}{\sin^2{\theta}}P^m_{l-1}(\cos{\theta})
    166 \f]
    167 and
    168 \f[G^-_{lm}(\cos{\theta})=\frac{m}{\sin^2{\theta}}\left(\left(l-1\right)\cos{\theta}P^m_l(\cos{\theta})-\left(l+m\right)P^m_{l-1}(\cos{\theta})\right)
    169 \f]
    170 and \f$P_l^m\f$ are the associated Legendre polynomials.
    171 The coefficients express the theta-dependance of the  spin-2 spherical harmonics :
    172 \f[_{\pm2}Y_l^m(\cos{\theta})=_\pm\lambda_l^m(\cos{\theta})e^{im\phi}
    173 \f]
    174 */
    17599class LambdaPMBuilder : public LambdaLMBuilder
    176100{
  • trunk/SophyaLib/Samba/sphericaltransformserver.cc

    r833 r1218  
    88#include "nbmath.h"
    99
    10 
     10/*! \class SOPHYA::SphericalTransformServer
     11
     12 Class for performing analysis and synthesis of sky maps using spin-0 or spin-2 spherical harmonics.
     13
     14Maps must be SOPHYA SphericalMaps (SphereGorski or SphereThetaPhi).
     15
     16Temperature and polarization (Stokes parameters) can be developped on spherical harmonics :
     17\f[
     18\frac{\Delta T}{T}(\hat{n})=\sum_{lm}a_{lm}^TY_l^m(\hat{n})
     19\f]
     20\f[
     21Q(\hat{n})=\frac{1}{\sqrt{2}}\sum_{lm}N_l\left(a_{lm}^EW_{lm}(\hat{n})+a_{lm}^BX_{lm}(\hat{n})\right)
     22\f]
     23\f[
     24U(\hat{n})=-\frac{1}{\sqrt{2}}\sum_{lm}N_l\left(a_{lm}^EX_{lm}(\hat{n})-a_{lm}^BW_{lm}(\hat{n})\right)
     25\f]
     26\f[
     27\left(Q \pm iU\right)(\hat{n})=\sum_{lm}a_{\pm 2lm}\, _{\pm 2}Y_l^m(\hat{n})
     28\f]
     29
     30\f[
     31Y_l^m(\hat{n})=\lambda_l^m(\theta)e^{im\phi}
     32\f]
     33\f[
     34_{\pm}Y_l^m(\hat{n})=_{\pm}\lambda_l^m(\theta)e^{im\phi}
     35\f]
     36\f[
     37W_{lm}(\hat{n})=\frac{1}{N_l}\,_{w}\lambda_l^m(\theta)e^{im\phi}
     38\f]
     39\f[
     40X_{lm}(\hat{n})=\frac{-i}{N_l}\,_{x}\lambda_l^m(\theta)e^{im\phi}
     41\f]
     42
     43(see LambdaLMBuilder, LambdaPMBuilder, LambdaWXBuilder classes)
     44
     45power spectra :
     46
     47\f[
     48C_l^T=\frac{1}{2l+1}\sum_{m=0}^{+ \infty }\left|a_{lm}^T\right|^2=\langle\left|a_{lm}^T\right|^2\rangle
     49\f]
     50\f[
     51C_l^E=\frac{1}{2l+1}\sum_{m=0}^{+\infty}\left|a_{lm}^E\right|^2=\langle\left|a_{lm}^E\right|^2\rangle
     52\f]
     53\f[
     54C_l^B=\frac{1}{2l+1}\sum_{m=0}^{+\infty}\left|a_{lm}^B\right|^2=\langle\left|a_{lm}^B\right|^2\rangle
     55\f]
     56
     57\arg
     58\b Synthesis : Get temperature and polarization maps  from \f$a_{lm}\f$ coefficients or from power spectra, (methods GenerateFrom...).
     59
     60\b Temperature:
     61\f[
     62\frac{\Delta T}{T}(\hat{n})=\sum_{lm}a_{lm}^TY_l^m(\hat{n}) = \sum_{-\infty}^{+\infty}b_m(\theta)e^{im\phi}
     63\f]
     64
     65with
     66\f[
     67b_m(\theta)=\sum_{l=\left|m\right|}^{+\infty}a_{lm}^T\lambda_l^m(\theta)
     68\f]
     69
     70\b Polarisation
     71\f[
     72Q \pm iU = \sum_{-\infty}^{+\infty}b_m^{\pm}(\theta)e^{im\phi}
     73\f]
     74
     75where :
     76\f[
     77b_m^{\pm}(\theta) = \sum_{l=\left|m\right|}^{+\infty}a_{\pm 2lm}\,_{\pm}\lambda_l^m(\theta)
     78\f]
     79
     80or :
     81\f[
     82Q  = \sum_{-\infty}^{+\infty}b_m^{Q}(\theta)e^{im\phi}
     83\f]
     84\f[
     85U  = \sum_{-\infty}^{+\infty}b_m^{U}(\theta)e^{im\phi}
     86\f]
     87
     88where:
     89\f[
     90b_m^{Q}(\theta) = \frac{1}{\sqrt{2}}\sum_{l=\left|m\right|}^{+\infty}\left(a_{lm}^E\,_{w}\lambda_l^m(\theta)-ia_{lm}^B\,_{x}\lambda_l^m(\theta)\right)
     91\f]
     92\f[
     93b_m^{U}(\theta) = \frac{1}{\sqrt{2}}\sum_{l=\left|m\right|}^{+\infty}\left(ia_{lm}^E\,_{x}\lambda_l^m(\theta)+a_{lm}^B\,_{w}\lambda_l^m(\theta)\right)
     94\f]
     95
     96Since the pixelization provides "slices" with constant \f$\theta\f$ and \f$\phi\f$ equally distributed  on \f$2\pi\f$  \f$\frac{\Delta T}{T}\f$, \f$Q\f$,\f$U\f$  can be computed by FFT.
     97
     98
     99\arg
     100\b Analysis :  Get \f$a_{lm}\f$ coefficients or  power spectra from temperature and polarization maps   (methods DecomposeTo...).
     101
     102\b Temperature:
     103\f[
     104a_{lm}^T=\int\frac{\Delta T}{T}(\hat{n})Y_l^{m*}(\hat{n})d\hat{n}
     105\f]
     106
     107approximated as :
     108\f[
     109a_{lm}^T=\sum_{\theta_k}\omega_kC_m(\theta_k)\lambda_l^m(\theta_k)
     110\f]
     111where :
     112\f[
     113C_m (\theta _k)=\sum_{\phi _{k\prime}}\frac{\Delta T}{T}(\theta _k,\phi_{k\prime})e^{-im\phi _{k\prime}}
     114\f]
     115Since the pixelization provides "slices" with constant \f$\theta\f$ and \f$\phi\f$ equally distributed  on \f$2\pi\f$ (\f$\omega_k\f$ is the solid angle of each pixel of the slice \f$\theta_k\f$) \f$C_m\f$ can be computed by FFT.
     116
     117\b polarisation:
     118
     119\f[
     120a_{\pm 2lm}=\sum_{\theta_k}\omega_kC_m^{\pm}(\theta_k)\,_{\pm}\lambda_l^m(\theta_k)
     121\f]
     122where :
     123\f[
     124C_m^{\pm} (\theta _k)=\sum_{\phi _{k\prime}}\left(Q \pm iU\right)(\theta _k,\phi_{k\prime})e^{-im\phi _{k\prime}}
     125\f]
     126or :
     127
     128\f[
     129a_{lm}^E=\frac{1}{\sqrt{2}}\sum_{\theta_k}\omega_k\left(C_m^{Q}(\theta_k)\,_{w}\lambda_l^m(\theta_k)-iC_m^{U}(\theta_k)\,_{x}\lambda_l^m(\theta_k)\right)
     130\f]
     131\f[
     132a_{lm}^B=\frac{1}{\sqrt{2}}\sum_{\theta_k}\omega_k\left(iC_m^{Q}(\theta_k)\,_{x}\lambda_l^m(\theta_k)+C_m^{U}(\theta_k)\,_{w}\lambda_l^m(\theta_k)\right)
     133\f]
     134
     135where :
     136\f[
     137C_m^{Q} (\theta _k)=\sum_{\phi _{k\prime}}Q(\theta _k,\phi_{k\prime})e^{-im\phi _{k\prime}}
     138\f]
     139\f[
     140C_m^{U} (\theta _k)=\sum_{\phi _{k\prime}}U(\theta _k,\phi_{k\prime})e^{-im\phi _{k\prime}}
     141\f]
     142
     143 */
     144
     145 /*! \fn void SOPHYA::SphericalTransformServer::GenerateFromAlm( SphericalMap<T>& map, int_4 pixelSizeIndex, const Alm<T>& alm) const
     146
     147 synthesis of a temperature  map from  Alm coefficients
     148*/
    11149template<class T>
    12150void SphericalTransformServer<T>::GenerateFromAlm( SphericalMap<T>& map, int_4 pixelSizeIndex, const Alm<T>& alm) const
     
    125263
    126264
     265  /*! \fn TVector< complex<T> >  SOPHYA::SphericalTransformServer::fourierSynthesisFromB(const Bm<complex<T> >& b_m,  int_4 nph, r_8 phi0) const
     266
     267\return a vector with nph elements  which are  sums :\f$\sum_{m=-mmax}^{mmax}b_m(\theta)e^{im\varphi}\f$ for nph values of \f$\varphi\f$ regularly distributed in \f$[0,\pi]\f$ ( calculated by FFT)
     268
     269  The object b_m (\f$b_m\f$) of the class Bm is a special vector which index goes from -mmax to mmax.
     270  */
    127271template<class T>
    128272TVector< complex<T> >  SphericalTransformServer<T>::fourierSynthesisFromB(const Bm<complex<T> >& b_m,  int_4 nph, r_8 phi0) const
     
    205349
    206350//********************************************
     351/*! \fn TVector<T>  SOPHYA::SphericalTransformServer::RfourierSynthesisFromB(const Bm<complex<T> >& b_m,  int_4 nph, r_8 phi0) const
     352
     353same as fourierSynthesisFromB, but return a real vector, taking into account the fact that b(-m) is conjugate of b(m) */
    207354template<class T>
    208355TVector<T>  SphericalTransformServer<T>::RfourierSynthesisFromB(const Bm<complex<T> >& b_m,  int_4 nph, r_8 phi0) const
     
    285432//*******************************************
    286433
     434 /*! \fn  Alm<T> SOPHYA::SphericalTransformServer::DecomposeToAlm(const SphericalMap<T>& map, int_4 nlmax, r_8 cos_theta_cut) const
     435
     436\return the Alm coefficients from analysis of a temperature map.
     437
     438    \param<nlmax> : maximum value of the l index
     439
     440     \param<cos_theta_cut> : cosinus of the symmetric cut EULER angle theta : cos_theta_cut=0 means no cut ; cos_theta_cut=1 all the sphere is cut.
     441  */
    287442template<class T>
    288443 Alm<T> SphericalTransformServer<T>::DecomposeToAlm(const SphericalMap<T>& map, int_4 nlmax, r_8 cos_theta_cut) const
     
    346501  return alm;
    347502}
     503  /*! \fn TVector< complex<T> > SOPHYA::SphericalTransformServer::CFromFourierAnalysis(int_4 nmmax, const TVector<complex<T> >datain, r_8 phi0) const
     504
     505\return a vector with mmax elements  which are  sums :
     506\f$\sum_{k=0}^{nphi}datain(\theta,\varphi_k)e^{im\varphi_k}\f$ for (mmax+1) values of \f$m\f$ from 0 to mmax.
     507   */
    348508template<class T>
    349509TVector< complex<T> > SphericalTransformServer<T>::CFromFourierAnalysis(int_4 nmmax, const TVector<complex<T> >datain, r_8 phi0) const
     
    384544
    385545//&&&&&&&&& nouvelle version
     546/* \fn TVector< complex<T> > SOPHYA::SphericalTransformServer::CFromFourierAnalysis(int_4 nmmax, const TVector<T> datain, r_8 phi0) const
     547
     548same as previous one, but with a "datain" which is real (not complex) */
    386549template<class T>
    387550TVector< complex<T> > SphericalTransformServer<T>::CFromFourierAnalysis(int_4 nmmax, const TVector<T> datain, r_8 phi0) const
     
    445608}
    446609
     610 /*! \fn void SOPHYA::SphericalTransformServer::GenerateFromAlm(SphericalMap<T>& mapq,
     611                                               SphericalMap<T>& mapu,
     612                                               int_4 pixelSizeIndex,
     613                                               const Alm<T>& alme,
     614                                               const Alm<T>& almb) const
     615
     616synthesis of a polarization map from  Alm coefficients. The spheres mapq and mapu contain respectively the Stokes parameters. */
    447617template<class T>
    448618void SphericalTransformServer<T>::GenerateFromAlm(SphericalMap<T>& mapq,
     
    521691
    522692
     693 /*! \fn void SOPHYA::SphericalTransformServer::DecomposeToAlm(const SphericalMap<T>& mapq,
     694                                              const SphericalMap<T>& mapu,
     695                                              Alm<T>& alme,
     696                                              Alm<T>& almb,
     697                                              int_4 nlmax,
     698                                              r_8 cos_theta_cut) const
     699
     700analysis of a polarization map into Alm coefficients.
     701
     702 The spheres \c mapq and \c mapu contain respectively the Stokes parameters.
     703
     704 \c a2lme and \c a2lmb will receive respectively electric and magnetic Alm's
     705    nlmax : maximum value of the l index
     706
     707 \c cos_theta_cut : cosinus of the symmetric cut EULER angle theta : cos_theta_cut=0 means no cut ; cos_theta_cut=1 all the sphere is cut.
     708 */
    523709template<class T>
    524710void SphericalTransformServer<T>::DecomposeToAlm(const SphericalMap<T>& mapq,
     
    578764
    579765
     766 /*! \fn void SOPHYA::SphericalTransformServer::almFromWX(int_4 nlmax, int_4 nmmax,
     767                                         r_8 phi0, r_8 domega,
     768                                         r_8 theta,
     769                                         const TVector<T>& dataq,
     770                                         const TVector<T>& datau,
     771                                         Alm<T>& alme,
     772                                         Alm<T>& almb) const
     773
     774Compute polarized Alm's as :
     775\f[
     776a_{lm}^E=\frac{1}{\sqrt{2}}\sum_{slices}{\omega_{pix}\left(\,_{w}\lambda_l^m\tilde{Q}-i\,_{x}\lambda_l^m\tilde{U}\right)}
     777\f]
     778\f[
     779a_{lm}^B=\frac{1}{\sqrt{2}}\sum_{slices}{\omega_{pix}\left(i\,_{x}\lambda_l^m\tilde{Q}+\,_{w}\lambda_l^m\tilde{U}\right)}
     780\f]
     781
     782where \f$\tilde{Q}\f$ and \f$\tilde{U}\f$ are C-coefficients computed by FFT (method CFromFourierAnalysis, called by present method) from the Stokes parameters.
     783
     784\f$\omega_{pix}\f$ are solid angle of each pixel.
     785
     786dataq, datau : Stokes parameters.
     787
     788  */
    580789template<class T>
    581790void SphericalTransformServer<T>::almFromWX(int_4 nlmax, int_4 nmmax,
     
    628837
    629838
    630 template<class T>
    631 void SphericalTransformServer<T>::almFromPM(int_4 nph, int_4 nlmax, int_4 nmmax,
     839 /*! \fn void SOPHYA::SphericalTransformServer::almFromPM(int_4 nph, int_4 nlmax,
     840                                         int_4 nmmax,
     841                                         r_8 phi0, r_8 domega, 
     842                                         r_8 theta,
     843                                         const TVector<T>& dataq,
     844                                         const TVector<T>& datau,
     845                                         Alm<T>& alme,
     846                                         Alm<T>& almb) const
     847
     848Compute polarized Alm's as :
     849\f[
     850a_{lm}^E=-\frac{1}{2}\sum_{slices}{\omega_{pix}\left(\,_{+}\lambda_l^m\tilde{P^+}+\,_{-}\lambda_l^m\tilde{P^-}\right)}
     851\f]
     852\f[
     853a_{lm}^B=\frac{i}{2}\sum_{slices}{\omega_{pix}\left(\,_{+}\lambda_l^m\tilde{P^+}-\,_{-}\lambda_l^m\tilde{P^-}\right)}
     854\f]
     855
     856where \f$\tilde{P^{\pm}}=\tilde{Q}\pm\tilde{U}\f$  computed by FFT (method CFromFourierAnalysis, called by present method) from the Stokes parameters,\f$Q\f$ and \f$U\f$ .
     857
     858\f$\omega_{pix}\f$ are solid angle of each pixel.
     859
     860dataq, datau : Stokes parameters.
     861
     862  */
     863template<class T>
     864void SphericalTransformServer<T>::almFromPM(int_4 nph, int_4 nlmax,
     865                                         int_4 nmmax,
    632866                                         r_8 phi0, r_8 domega, 
    633867                                         r_8 theta,
     
    673907
    674908
     909/*! \fn void SOPHYA::SphericalTransformServer::mapFromWX(int_4 nlmax, int_4 nmmax,
     910                                         SphericalMap<T>& mapq,
     911                                         SphericalMap<T>& mapu,
     912                                         const Alm<T>& alme,
     913                                         const Alm<T>& almb) const
     914
     915synthesis of Stokes parameters following formulae :
     916
     917\f[
     918Q=\sum_{m=-mmax}^{mmax}b_m^qe^{im\varphi}
     919\f]
     920\f[
     921U=\sum_{m=-mmax}^{mmax}b_m^ue^{im\varphi}
     922\f]
     923
     924computed by FFT (method fourierSynthesisFromB called by the present one)
     925
     926with :
     927
     928\f[
     929b_m^q=-\frac{1}{\sqrt{2}}\sum_{l=|m|}^{lmax}{\left(\,_{w}\lambda_l^ma_{lm}^E-i\,_{x}\lambda_l^ma_{lm}^B\right) }
     930\f]
     931\f[
     932b_m^u=\frac{1}{\sqrt{2}}\sum_{l=|m|}^{lmax}{\left(i\,_{x}\lambda_l^ma_{lm}^E+\,_{w}\lambda_l^ma_{lm}^B\right) }
     933\f]
     934 */
    675935template<class T>
    676936void SphericalTransformServer<T>::mapFromWX(int_4 nlmax, int_4 nmmax,
     
    7441004    }
    7451005}
     1006/*! \fn void SOPHYA::SphericalTransformServer::mapFromPM(int_4 nlmax, int_4 nmmax,
     1007                                         SphericalMap<T>& mapq,
     1008                                         SphericalMap<T>& mapu,
     1009                                         const Alm<T>& alme,
     1010                                         const Alm<T>& almb) const
     1011
     1012synthesis of polarizations following formulae :
     1013
     1014\f[
     1015P^+ = \sum_{m=-mmax}^{mmax} {b_m^+e^{im\varphi} }
     1016\f]
     1017\f[
     1018P^- = \sum_{m=-mmax}^{mmax} {b_m^-e^{im\varphi} }
     1019\f]
     1020
     1021computed by FFT (method fourierSynthesisFromB called by the present one)
     1022
     1023with :
     1024
     1025\f[
     1026b_m^+=-\sum_{l=|m|}^{lmax}{\,_{+}\lambda_l^m \left( a_{lm}^E+ia_{lm}^B \right) }
     1027\f]
     1028\f[
     1029b_m^-=-\sum_{l=|m|}^{lmax}{\,_{+}\lambda_l^m \left( a_{lm}^E-ia_{lm}^B \right) }
     1030\f]
     1031 */
    7461032template<class T>
    7471033void SphericalTransformServer<T>::mapFromPM(int_4 nlmax, int_4 nmmax,
     
    8091095
    8101096
     1097  /*! \fn void SOPHYA::SphericalTransformServer::GenerateFromCl(SphericalMap<T>& sphq,
     1098                                              SphericalMap<T>& sphu,
     1099                                              int_4 pixelSizeIndex,
     1100                                              const TVector<T>& Cle,
     1101                                              const TVector<T>& Clb,
     1102                                              const r_8 fwhm) const
     1103
     1104synthesis of a polarization  map from  power spectra electric-Cl and magnetic-Cl (Alm's are generated randomly, following a gaussian distribution).
     1105  \param fwhm FWHM in arcmin for random generation of Alm's (eg. 5)
     1106*/
    8111107template<class T>
    8121108void SphericalTransformServer<T>::GenerateFromCl(SphericalMap<T>& sphq,
     
    8331129  GenerateFromAlm(sphq,sphu,pixelSizeIndex,a2lme,a2lmb);
    8341130}
     1131 /*! \fn void SOPHYA::SphericalTransformServer::GenerateFromCl(SphericalMap<T>& sph,
     1132                                                 int_4 pixelSizeIndex,
     1133                                              const TVector<T>& Cl,
     1134                                                 const r_8 fwhm)  const
     1135
     1136synthesis of a temperature  map from  power spectrum Cl (Alm's are generated randomly, following a gaussian distribution). */
    8351137template<class T>
    8361138void SphericalTransformServer<T>::GenerateFromCl(SphericalMap<T>& sph,
     
    8461148
    8471149
     1150/*! \fn TVector<T>  SOPHYA::SphericalTransformServer::DecomposeToCl(const SphericalMap<T>& sph, int_4 nlmax, r_8 cos_theta_cut) const
     1151
     1152\return power spectrum from analysis of a temperature map.
     1153
     1154     \param<nlmax> : maximum value of the l index
     1155
     1156     \param<cos_theta_cut> : cosinus of the symmetric cut EULER angle theta : cos_theta_cut=0 means no cut ; cos_theta_cut=1 all the sphere is cut.
     1157  */
    8481158template <class T>
    8491159TVector<T>  SphericalTransformServer<T>::DecomposeToCl(const SphericalMap<T>& sph, int_4 nlmax, r_8 cos_theta_cut) const
  • trunk/SophyaLib/Samba/sphericaltransformserver.h

    r866 r1218  
    1111namespace SOPHYA {
    1212
    13 //
    14 /*! Class for performing analysis and synthesis of sky maps using spin-0 or spin-2 spherical harmonics.
    1513
    16 Maps must be SOPHYA SphericalMaps (SphereGorski or SphereThetaPhi).
    17 
    18 Temperature and polarization (Stokes parameters) can be developped on spherical harmonics :
    19 \f[
    20 \frac{\Delta T}{T}(\hat{n})=\sum_{lm}a_{lm}^TY_l^m(\hat{n})
    21 \f]
    22 \f[
    23 Q(\hat{n})=\frac{1}{\sqrt{2}}\sum_{lm}N_l\left(a_{lm}^EW_{lm}(\hat{n})+a_{lm}^BX_{lm}(\hat{n})\right)
    24 \f]
    25 \f[
    26 U(\hat{n})=-\frac{1}{\sqrt{2}}\sum_{lm}N_l\left(a_{lm}^EX_{lm}(\hat{n})-a_{lm}^BW_{lm}(\hat{n})\right)
    27 \f]
    28 \f[
    29 \left(Q \pm iU\right)(\hat{n})=\sum_{lm}a_{\pm 2lm}\, _{\pm 2}Y_l^m(\hat{n})
    30 \f]
    31 
    32 \f[
    33 Y_l^m(\hat{n})=\lambda_l^m(\theta)e^{im\phi}
    34 \f]
    35 \f[
    36 _{\pm}Y_l^m(\hat{n})=_{\pm}\lambda_l^m(\theta)e^{im\phi}
    37 \f]
    38 \f[
    39 W_{lm}(\hat{n})=\frac{1}{N_l}\,_{w}\lambda_l^m(\theta)e^{im\phi}
    40 \f]
    41 \f[
    42 X_{lm}(\hat{n})=\frac{-i}{N_l}\,_{x}\lambda_l^m(\theta)e^{im\phi}
    43 \f]
    44 
    45 (see LambdaLMBuilder, LambdaPMBuilder, LambdaWXBuilder classes)
    46 
    47 power spectra :
    48 
    49 \f[
    50 C_l^T=\frac{1}{2l+1}\sum_{m=0}^{+ \infty }\left|a_{lm}^T\right|^2=\langle\left|a_{lm}^T\right|^2\rangle
    51 \f]
    52 \f[
    53 C_l^E=\frac{1}{2l+1}\sum_{m=0}^{+\infty}\left|a_{lm}^E\right|^2=\langle\left|a_{lm}^E\right|^2\rangle
    54 \f]
    55 \f[
    56 C_l^B=\frac{1}{2l+1}\sum_{m=0}^{+\infty}\left|a_{lm}^B\right|^2=\langle\left|a_{lm}^B\right|^2\rangle
    57 \f]
    58 
    59 \arg
    60 \b Synthesis : Get temperature and polarization maps  from \f$a_{lm}\f$ coefficients or from power spectra, (methods GenerateFrom...).
    61 
    62 \b Temperature:
    63 \f[
    64 \frac{\Delta T}{T}(\hat{n})=\sum_{lm}a_{lm}^TY_l^m(\hat{n}) = \sum_{-\infty}^{+\infty}b_m(\theta)e^{im\phi}
    65 \f]
    66 
    67 with
    68 \f[
    69 b_m(\theta)=\sum_{l=\left|m\right|}^{+\infty}a_{lm}^T\lambda_l^m(\theta)
    70 \f]
    71 
    72 \b Polarisation
    73 \f[
    74 Q \pm iU = \sum_{-\infty}^{+\infty}b_m^{\pm}(\theta)e^{im\phi}
    75 \f]
    76 
    77 where :
    78 \f[
    79 b_m^{\pm}(\theta) = \sum_{l=\left|m\right|}^{+\infty}a_{\pm 2lm}\,_{\pm}\lambda_l^m(\theta)
    80 \f]
    81 
    82 or :
    83 \f[
    84 Q  = \sum_{-\infty}^{+\infty}b_m^{Q}(\theta)e^{im\phi}
    85 \f]
    86 \f[
    87 U  = \sum_{-\infty}^{+\infty}b_m^{U}(\theta)e^{im\phi}
    88 \f]
    89 
    90 where:
    91 \f[
    92 b_m^{Q}(\theta) = \frac{1}{\sqrt{2}}\sum_{l=\left|m\right|}^{+\infty}\left(a_{lm}^E\,_{w}\lambda_l^m(\theta)-ia_{lm}^B\,_{x}\lambda_l^m(\theta)\right)
    93 \f]
    94 \f[
    95 b_m^{U}(\theta) = \frac{1}{\sqrt{2}}\sum_{l=\left|m\right|}^{+\infty}\left(ia_{lm}^E\,_{x}\lambda_l^m(\theta)+a_{lm}^B\,_{w}\lambda_l^m(\theta)\right)
    96 \f]
    97 
    98 Since the pixelization provides "slices" with constant \f$\theta\f$ and \f$\phi\f$ equally distributed  on \f$2\pi\f$  \f$\frac{\Delta T}{T}\f$, \f$Q\f$,\f$U\f$  can be computed by FFT.
    99 
    100 
    101 \arg
    102 \b Analysis :  Get \f$a_{lm}\f$ coefficients or  power spectra from temperature and polarization maps   (methods DecomposeTo...).
    103 
    104 \b Temperature:
    105 \f[
    106 a_{lm}^T=\int\frac{\Delta T}{T}(\hat{n})Y_l^{m*}(\hat{n})d\hat{n}
    107 \f]
    108 
    109 approximated as :
    110 \f[
    111 a_{lm}^T=\sum_{\theta_k}\omega_kC_m(\theta_k)\lambda_l^m(\theta_k)
    112 \f]
    113 where :
    114 \f[
    115 C_m (\theta _k)=\sum_{\phi _{k\prime}}\frac{\Delta T}{T}(\theta _k,\phi_{k\prime})e^{-im\phi _{k\prime}}
    116 \f]
    117 Since the pixelization provides "slices" with constant \f$\theta\f$ and \f$\phi\f$ equally distributed  on \f$2\pi\f$ (\f$\omega_k\f$ is the solid angle of each pixel of the slice \f$\theta_k\f$) \f$C_m\f$ can be computed by FFT.
    118 
    119 \b polarisation:
    120 
    121 \f[
    122 a_{\pm 2lm}=\sum_{\theta_k}\omega_kC_m^{\pm}(\theta_k)\,_{\pm}\lambda_l^m(\theta_k)
    123 \f]
    124 where :
    125 \f[
    126 C_m^{\pm} (\theta _k)=\sum_{\phi _{k\prime}}\left(Q \pm iU\right)(\theta _k,\phi_{k\prime})e^{-im\phi _{k\prime}}
    127 \f]
    128 or :
    129 
    130 \f[
    131 a_{lm}^E=\frac{1}{\sqrt{2}}\sum_{\theta_k}\omega_k\left(C_m^{Q}(\theta_k)\,_{w}\lambda_l^m(\theta_k)-iC_m^{U}(\theta_k)\,_{x}\lambda_l^m(\theta_k)\right)
    132 \f]
    133 \f[
    134 a_{lm}^B=\frac{1}{\sqrt{2}}\sum_{\theta_k}\omega_k\left(iC_m^{Q}(\theta_k)\,_{x}\lambda_l^m(\theta_k)+C_m^{U}(\theta_k)\,_{w}\lambda_l^m(\theta_k)\right)
    135 \f]
    136 
    137 where :
    138 \f[
    139 C_m^{Q} (\theta _k)=\sum_{\phi _{k\prime}}Q(\theta _k,\phi_{k\prime})e^{-im\phi _{k\prime}}
    140 \f]
    141 \f[
    142 C_m^{U} (\theta _k)=\sum_{\phi _{k\prime}}U(\theta _k,\phi_{k\prime})e^{-im\phi _{k\prime}}
    143 \f]
    144 
    145  */
    14614template <class T>
    14715class SphericalTransformServer
     
    15018 public:
    15119
    152  SphericalTransformServer() 
    153 {
    154     fftIntfPtr_=new FFTPackServer;
    155     fftIntfPtr_->setNormalize(false);
    156 };
    157  ~SphericalTransformServer(){ if (fftIntfPtr_!=NULL) delete fftIntfPtr_;};
    158 /*!
     20  SphericalTransformServer() 
     21    {
     22      fftIntfPtr_=new FFTPackServer;
     23      fftIntfPtr_->setNormalize(false);
     24    };
     25  ~SphericalTransformServer(){ if (fftIntfPtr_!=NULL) delete fftIntfPtr_;};
     26 
     27 /*!
    15928 Set a fft server. The constructor sets a default fft server (fft-pack). So it is not necessary to call this method for a standard use.
    16029*/
    161  void SetFFTServer(FFTServerInterface* srv=NULL)
    162 {
    163   if (fftIntfPtr_!=NULL) delete fftIntfPtr_;
    164   fftIntfPtr_=srv;
    165   fftIntfPtr_->setNormalize(false);
    166 }
    167  /*! synthesis of a temperature  map from  Alm coefficients */
    168  void GenerateFromAlm( SphericalMap<T>& map, int_4 pixelSizeIndex, const Alm<T>& alm) const;
    169  /*! synthesis of a polarization map from  Alm coefficients. The spheres mapq and mapu contain respectively the Stokes parameters. */
    170  void GenerateFromAlm(SphericalMap<T>& mapq, SphericalMap<T>& mapu, int_4 pixelSizeIndex, const Alm<T>& alme,    const Alm<T>& almb) const;
     30  void SetFFTServer(FFTServerInterface* srv=NULL)
     31    {
     32      if (fftIntfPtr_!=NULL) delete fftIntfPtr_;
     33      fftIntfPtr_=srv;
     34      fftIntfPtr_->setNormalize(false);
     35    }
    17136
    172  /*! synthesis of a temperature  map from  power spectrum Cl (Alm's are generated randomly, following a gaussian distribution). */
    173  void GenerateFromCl(SphericalMap<T>& sph, int_4 pixelSizeIndex,
     37  void GenerateFromAlm( SphericalMap<T>& map, int_4 pixelSizeIndex, const Alm<T>& alm) const;
     38  void GenerateFromAlm(SphericalMap<T>& mapq, SphericalMap<T>& mapu, int_4 pixelSizeIndex, const Alm<T>& alme,    const Alm<T>& almb) const;
     39
     40  void GenerateFromCl(SphericalMap<T>& sph, int_4 pixelSizeIndex,
    17441                     const TVector<T>& Cl, const r_8 fwhm) const;
    175   /*! synthesis of a polarization  map from  power spectra electric-Cl and magnetic-Cl (Alm's are generated randomly, following a gaussian distribution).
    176   \param fwhm FWHM in arcmin for random generation of Alm's (eg. 5)
    177 
    178 */
    179  void GenerateFromCl(SphericalMap<T>& sphq, SphericalMap<T>& sphu,
     42  void GenerateFromCl(SphericalMap<T>& sphq, SphericalMap<T>& sphu,
    18043                     int_4 pixelSizeIndex,
    18144                     const TVector<T>& Cle, const TVector<T>& Clb,
    18245                    const r_8 fwhm) const;
    183  /*!return the Alm coefficients from analysis of a temperature map.
    184 
    185     \param<nlmax> : maximum value of the l index
    186 
    187      \param<cos_theta_cut> : cosinus of the symmetric cut EULER angle theta : cos_theta_cut=0 means no cut ; cos_theta_cut=1 all the sphere is cut.
    188   */
    18946
    19047
    191 Alm<T> DecomposeToAlm(const SphericalMap<T>& map, int_4 nlmax, r_8 cos_theta_cut) const;
    192  /*!analysis of a polarization map into Alm coefficients.
     48  Alm<T> DecomposeToAlm(const SphericalMap<T>& map, int_4 nlmax, r_8 cos_theta_cut) const;
    19349
    194  The spheres \c mapq and \c mapu contain respectively the Stokes parameters.
    195 
    196  \c a2lme and \c a2lmb will receive respectively electric and magnetic Alm's
    197     nlmax : maximum value of the l index
    198 
    199  \c cos_theta_cut : cosinus of the symmetric cut EULER angle theta : cos_theta_cut=0 means no cut ; cos_theta_cut=1 all the sphere is cut.
    200  */
    201 
    202  void DecomposeToAlm(const SphericalMap<T>& mapq, const SphericalMap<T>& mapu,
     50  void DecomposeToAlm(const SphericalMap<T>& mapq, const SphericalMap<T>& mapu,
    20351                     Alm<T>& a2lme, Alm<T>& a2lmb,
    20452                     int_4 nlmax, r_8 cos_theta_cut) const;
    20553
    206 /*!return power spectrum from analysis of a temperature map.
    207 
    208      \param<nlmax> : maximum value of the l index
    209 
    210      \param<cos_theta_cut> : cosinus of the symmetric cut EULER angle theta : cos_theta_cut=0 means no cut ; cos_theta_cut=1 all the sphere is cut.
    211   */
    212  TVector<T>  DecomposeToCl(const SphericalMap<T>& sph, 
     54  TVector<T>  DecomposeToCl(const SphericalMap<T>& sph, 
    21355                           int_4 nlmax, r_8 cos_theta_cut) const;
    21456
    21557
    216   private:
    217   /*! return a vector with nph elements  which are  sums :\f$\sum_{m=-mmax}^{mmax}b_m(\theta)e^{im\varphi}\f$ for nph values of \f$\varphi\f$ regularly distributed in \f$[0,\pi]\f$ ( calculated by FFT)
    218 
    219   The object b_m (\f$b_m\f$) of the class Bm is a special vector which index goes from -mmax to mmax.
    220   */
    221  TVector< complex<T> >  fourierSynthesisFromB(const Bm<complex<T> >& b_m, 
     58 private:
     59  TVector< complex<T> >  fourierSynthesisFromB(const Bm<complex<T> >& b_m, 
    22260                                  int_4 nph, r_8 phi0) const;
    223 /*! same as fourierSynthesisFromB, but return a real vector, taking into account the fact that b(-m) is conjugate of b(m) */
    224  TVector<T>  RfourierSynthesisFromB(const Bm<complex<T> >& b_m, 
     61  TVector<T>  RfourierSynthesisFromB(const Bm<complex<T> >& b_m, 
    22562                                  int_4 nph, r_8 phi0) const;
    22663
    227   /*! return a vector with mmax elements  which are  sums :
    228 \f$\sum_{k=0}^{nphi}datain(\theta,\varphi_k)e^{im\varphi_k}\f$ for (mmax+1) values of \f$m\f$ from 0 to mmax.
    229    */
    230  TVector< complex<T> > CFromFourierAnalysis(int_4 mmax,
     64  TVector< complex<T> > CFromFourierAnalysis(int_4 mmax,
    23165                                  const TVector<complex<T> > datain,
    23266                                  r_8 phi0) const;
    233 /* same as previous one, but with a "datain" which is real (not complex) */
    234  TVector< complex<T> > CFromFourierAnalysis(int_4 mmax,
     67  TVector< complex<T> > CFromFourierAnalysis(int_4 mmax,
    23568                         const TVector<T> datain, 
    23669                                  r_8 phi0) const;
    23770
    238  /*!
    239 Compute polarized Alm's as :
    240 \f[
    241 a_{lm}^E=\frac{1}{\sqrt{2}}\sum_{slices}{\omega_{pix}\left(\,_{w}\lambda_l^m\tilde{Q}-i\,_{x}\lambda_l^m\tilde{U}\right)}
    242 \f]
    243 \f[
    244 a_{lm}^B=\frac{1}{\sqrt{2}}\sum_{slices}{\omega_{pix}\left(i\,_{x}\lambda_l^m\tilde{Q}+\,_{w}\lambda_l^m\tilde{U}\right)}
    245 \f]
    246 
    247 where \f$\tilde{Q}\f$ and \f$\tilde{U}\f$ are C-coefficients computed by FFT (method CFromFourierAnalysis, called by present method) from the Stokes parameters.
    248 
    249 \f$\omega_{pix}\f$ are solid angle of each pixel.
    250 
    251 dataq, datau : Stokes parameters.
    252 
    253   */
    254 void almFromWX(int_4 nlmax, int_4 nmmax, r_8 phi0,
     71  void almFromWX(int_4 nlmax, int_4 nmmax, r_8 phi0,
    25572               r_8 domega, r_8 theta,
    25673               const TVector<T>& dataq, const TVector<T>& datau,
    25774               Alm<T>& alme, Alm<T>& almb) const;
    258  /*!
    259 Compute polarized Alm's as :
    260 \f[
    261 a_{lm}^E=-\frac{1}{2}\sum_{slices}{\omega_{pix}\left(\,_{+}\lambda_l^m\tilde{P^+}+\,_{-}\lambda_l^m\tilde{P^-}\right)}
    262 \f]
    263 \f[
    264 a_{lm}^B=\frac{i}{2}\sum_{slices}{\omega_{pix}\left(\,_{+}\lambda_l^m\tilde{P^+}-\,_{-}\lambda_l^m\tilde{P^-}\right)}
    265 \f]
    266 
    267 where \f$\tilde{P^{\pm}}=\tilde{Q}\pm\tilde{U}\f$  computed by FFT (method CFromFourierAnalysis, called by present method) from the Stokes parameters,\f$Q\f$ and \f$U\f$ .
    268 
    269 \f$\omega_{pix}\f$ are solid angle of each pixel.
    270 
    271 dataq, datau : Stokes parameters.
    272 
    273   */
    274 void almFromPM(int_4 nph, int_4 nlmax, int_4 nmmax,
     75  void almFromPM(int_4 nph, int_4 nlmax, int_4 nmmax,
    27576               r_8 phi0, r_8 domega, r_8 theta,
    27677               const TVector<T>& dataq, const TVector<T>& datau,
    27778               Alm<T>& alme, Alm<T>& almb) const;
    27879
    279 /*! synthesis of Stokes parameters following formulae :
    280 
    281 \f[
    282 Q=\sum_{m=-mmax}^{mmax}b_m^qe^{im\varphi}
    283 \f]
    284 \f[
    285 U=\sum_{m=-mmax}^{mmax}b_m^ue^{im\varphi}
    286 \f]
    287 
    288 computed by FFT (method fourierSynthesisFromB called by the present one)
    289 
    290 with :
    291 
    292 \f[
    293 b_m^q=-\frac{1}{\sqrt{2}}\sum_{l=|m|}^{lmax}{\left(\,_{w}\lambda_l^ma_{lm}^E-i\,_{x}\lambda_l^ma_{lm}^B\right) }
    294 \f]
    295 \f[
    296 b_m^u=\frac{1}{\sqrt{2}}\sum_{l=|m|}^{lmax}{\left(i\,_{x}\lambda_l^ma_{lm}^E+\,_{w}\lambda_l^ma_{lm}^B\right) }
    297 \f]
    298  */
    299 void mapFromWX(int_4 nlmax, int_4 nmmax,
     80  void mapFromWX(int_4 nlmax, int_4 nmmax,
    30081               SphericalMap<T>& mapq, SphericalMap<T>& mapu,
    30182               const Alm<T>& alme, const Alm<T>& almb) const;
    30283
    303 /*! synthesis of polarizations following formulae :
    30484
    305 \f[
    306 P^+ = \sum_{m=-mmax}^{mmax} {b_m^+e^{im\varphi} }
    307 \f]
    308 \f[
    309 P^- = \sum_{m=-mmax}^{mmax} {b_m^-e^{im\varphi} }
    310 \f]
    311 
    312 computed by FFT (method fourierSynthesisFromB called by the present one)
    313 
    314 with :
    315 
    316 \f[
    317 b_m^+=-\sum_{l=|m|}^{lmax}{\,_{+}\lambda_l^m \left( a_{lm}^E+ia_{lm}^B \right) }
    318 \f]
    319 \f[
    320 b_m^-=-\sum_{l=|m|}^{lmax}{\,_{+}\lambda_l^m \left( a_{lm}^E-ia_{lm}^B \right) }
    321 \f]
    322  */
    323 
    324 void mapFromPM(int_4 nlmax, int_4 nmmax,
     85  void mapFromPM(int_4 nlmax, int_4 nmmax,
    32586               SphericalMap<T>& mapq, SphericalMap<T>& mapu,
    32687               const Alm<T>& alme, const Alm<T>& almb) const;
Note: See TracChangeset for help on using the changeset viewer.