Healpix C++  3.82
Public Member Functions | Related Functions | List of all members
Alm< T > Class Template Reference

#include <alm.h>

Inheritance diagram for Alm< T >:
Alm_Base

Public Member Functions

 Alm (int lmax_=0, int mmax_=0)
 
void Set (int lmax_, int mmax_)
 
void Set (arr< T > &data, int lmax_, int mmax_)
 
void SetToZero ()
 
template<typename T2 >
void Scale (const T2 &factor)
 
template<typename T2 >
void ScaleL (const arr< T2 > &factor)
 
template<typename T2 >
void ScaleL (const std::vector< T2 > &factor)
 
template<typename T2 >
void ScaleM (const arr< T2 > &factor)
 
template<typename T2 >
void Add (const T2 &num)
 
T & operator() (int l, int m)
 
const T & operator() (int l, int m) const
 
T * mstart (int m)
 
const T * mstart (int m) const
 
const arr< T > & Alms () const
 
void swap (Alm &other)
 
void Add (const Alm &other)
 
- Public Member Functions inherited from Alm_Base
 Alm_Base (int lmax_=0, int mmax_=0)
 
void Set (int lmax_, int mmax_)
 
int Lmax () const
 
int Mmax () const
 
int index_l0 (int m) const
 
int index (int l, int m) const
 
bool conformable (const Alm_Base &other) const
 
void swap (Alm_Base &other)
 

Related Functions

(Note that these are not member functions.)

template<typename T >
void smoothWithGauss (Alm< xcomplex< T > > &alm, double fwhm)
 
template<typename T >
void smoothWithGauss (Alm< xcomplex< T > > &almT, Alm< xcomplex< T > > &almG, Alm< xcomplex< T > > &almC, double fwhm)
 
template<typename T >
void applyCosineWindow (Alm< xcomplex< T > > &alm, int lmin, int lmax)
 
template<typename T >
void rotate_alm (Alm< xcomplex< T > > &alm, double psi, double theta, double phi)
 
template<typename T >
void rotate_alm (Alm< xcomplex< T > > &almT, Alm< xcomplex< T > > &almG, Alm< xcomplex< T > > &almC, double psi, double theta, double phi)
 
template<typename T >
void rotate_alm (Alm< xcomplex< T > > &alm, const rotmatrix &mat)
 
template<typename T >
void rotate_alm (Alm< xcomplex< T > > &almT, Alm< xcomplex< T > > &almG, Alm< xcomplex< T > > &almC, const rotmatrix &mat)
 

Additional Inherited Members

- Static Public Member Functions inherited from Alm_Base
static tsize Num_Alms (int l, int m)
 

Detailed Description

template<typename T>
class Alm< T >

Class for storing spherical harmonic coefficients.

Definition at line 88 of file alm.h.

Constructor & Destructor Documentation

◆ Alm()

template<typename T>
Alm< T >::Alm ( int  lmax_ = 0,
int  mmax_ = 0 
)
inline

Constructs an Alm object with given lmax and mmax.

Definition at line 95 of file alm.h.

Member Function Documentation

◆ Set() [1/2]

template<typename T>
void Alm< T >::Set ( int  lmax_,
int  mmax_ 
)
inline

Deletes the old coefficients and allocates storage according to lmax and mmax.

Definition at line 100 of file alm.h.

◆ Set() [2/2]

template<typename T>
void Alm< T >::Set ( arr< T > &  data,
int  lmax_,
int  mmax_ 
)
inline

Deallocates the old coefficients and uses the content of data for storage. data is deallocated during the call.

Definition at line 108 of file alm.h.

◆ SetToZero()

template<typename T>
void Alm< T >::SetToZero ( )
inline

Sets all coefficients to zero.

Definition at line 116 of file alm.h.

◆ Scale()

template<typename T>
template<typename T2 >
void Alm< T >::Scale ( const T2 &  factor)
inline

Multiplies all coefficients by factor.

Definition at line 120 of file alm.h.

◆ ScaleL() [1/2]

template<typename T>
template<typename T2 >
void Alm< T >::ScaleL ( const arr< T2 > &  factor)
inline

a(l,m) *= factor[l] for all l,m.

Definition at line 123 of file alm.h.

◆ ScaleL() [2/2]

template<typename T>
template<typename T2 >
void Alm< T >::ScaleL ( const std::vector< T2 > &  factor)
inline

a(l,m) *= factor[l] for all l,m.

Definition at line 132 of file alm.h.

◆ ScaleM()

template<typename T>
template<typename T2 >
void Alm< T >::ScaleM ( const arr< T2 > &  factor)
inline

a(l,m) *= factor[m] for all l,m.

Definition at line 141 of file alm.h.

◆ Add() [1/2]

template<typename T>
template<typename T2 >
void Alm< T >::Add ( const T2 &  num)
inline

Adds num to a_00.

Definition at line 150 of file alm.h.

◆ operator()() [1/2]

template<typename T>
T& Alm< T >::operator() ( int  l,
int  m 
)
inline

Returns a reference to the specified coefficient.

Definition at line 154 of file alm.h.

◆ operator()() [2/2]

template<typename T>
const T& Alm< T >::operator() ( int  l,
int  m 
) const
inline

Returns a constant reference to the specified coefficient.

Definition at line 157 of file alm.h.

◆ mstart() [1/2]

template<typename T>
T* Alm< T >::mstart ( int  m)
inline

Returns a pointer for a given m, from which the address of a_lm can be obtained by adding l.

Definition at line 162 of file alm.h.

◆ mstart() [2/2]

template<typename T>
const T* Alm< T >::mstart ( int  m) const
inline

Returns a pointer for a given m, from which the address of a_lm can be obtained by adding l.

Definition at line 166 of file alm.h.

◆ Alms()

template<typename T>
const arr<T>& Alm< T >::Alms ( ) const
inline

Returns a constant reference to the a_lm data.

Definition at line 170 of file alm.h.

◆ swap()

template<typename T>
void Alm< T >::swap ( Alm< T > &  other)
inline

Swaps the contents of two Alm objects.

Definition at line 173 of file alm.h.

◆ Add() [2/2]

template<typename T>
void Alm< T >::Add ( const Alm< T > &  other)
inline

Adds all coefficients from other to the own coefficients.

Definition at line 180 of file alm.h.

Friends And Related Function Documentation

◆ smoothWithGauss() [1/2]

template<typename T >
void smoothWithGauss ( Alm< xcomplex< T > > &  alm,
double  fwhm 
)
related

Applies a convolution with a Gaussian beam with an FWHM of fwhm (in radian) to alm.

Note
If fwhm<0, a deconvolution with -fwhm is performed.

Definition at line 277 of file alm_powspec_tools.cc.

◆ smoothWithGauss() [2/2]

template<typename T >
void smoothWithGauss ( Alm< xcomplex< T > > &  almT,
Alm< xcomplex< T > > &  almG,
Alm< xcomplex< T > > &  almC,
double  fwhm 
)
related

Applies a convolution with a Gaussian beam with an FWHM of fwhm (in radian) to almT, almG and almC.

Note
If fwhm<0, a deconvolution with -fwhm is performed.

Definition at line 294 of file alm_powspec_tools.cc.

◆ applyCosineWindow()

template<typename T >
void applyCosineWindow ( Alm< xcomplex< T > > &  alm,
int  lmin,
int  lmax 
)
related

Applies a function to alm that is 1 for all l<=lmin, 0 for all l>=lmax, and 0.5*(1+cos((l-lmin)/(lmax-lmin)*pi)) in between.

Definition at line 312 of file alm_powspec_tools.cc.

◆ rotate_alm() [1/4]

template<typename T >
void rotate_alm ( Alm< xcomplex< T > > &  alm,
double  psi,
double  theta,
double  phi 
)
related

Rotates alm through the Euler angles psi, theta and phi. The Euler angle convention is right handed, rotations are active.

  • psi is the first rotation about the z-axis (vertical)
  • then theta about the ORIGINAL (unrotated) y-axis
  • then phi about the ORIGINAL (unrotated) z-axis (vertical)

Definition at line 343 of file alm_powspec_tools.cc.

◆ rotate_alm() [2/4]

template<typename T >
void rotate_alm ( Alm< xcomplex< T > > &  almT,
Alm< xcomplex< T > > &  almG,
Alm< xcomplex< T > > &  almC,
double  psi,
double  theta,
double  phi 
)
related

Rotates almT, almG and almC through the Euler angles psi, theta and phi. The Euler angle convention is right handed, rotations are active.

  • psi is the first rotation about the z-axis (vertical)
  • then theta about the ORIGINAL (unrotated) y-axis
  • then phi about the ORIGINAL (unrotated) z-axis (vertical)

Definition at line 399 of file alm_powspec_tools.cc.

◆ rotate_alm() [3/4]

template<typename T >
void rotate_alm ( Alm< xcomplex< T > > &  alm,
const rotmatrix &  mat 
)
related

Rotates alm through the rotation matrix mat.

Definition at line 473 of file alm_powspec_tools.cc.

◆ rotate_alm() [4/4]

template<typename T >
void rotate_alm ( Alm< xcomplex< T > > &  almT,
Alm< xcomplex< T > > &  almG,
Alm< xcomplex< T > > &  almC,
const rotmatrix &  mat 
)
related

Rotates almT, almG and almC through the rotation matrix mat.

Definition at line 484 of file alm_powspec_tools.cc.


The documentation for this class was generated from the following files:

Generated on Thu Jul 28 2022 17:32:07 for Healpix C++