CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
cbl::glob::SphericalHarmonics_Coefficients Class Reference

The class SphericalHarmonics_Coefficients. More...

#include "Headers/SphericalHarmonics_Coefficients.h"

Public Member Functions

double real (const int n, const int bin=0)
 return the real part of the n-th coefficient of the expansion for a given separation bin More...
 
double imag (const int n, const int bin=0)
 return the imaginary part of the n-th coefficient of the expansion for a given separation bin More...
 
void initialize (const int norder, const int nbins=1)
 initialize the internal quantities More...
 
void reset ()
 reset the internal quantities
 
std::vector< std::complex< double > > alm (const double xx, const double yy, const double zz)
 compute the \( a_{lm}\) for the normalized coordinates \( \lbrace x, y, z \rbrace \) More...
 
void add (const std::vector< std::complex< double >> alm, const double ww, const int bin=0)
 add the \( a_{lm}\) to a specific separation bin with a weight More...
 
void add (const double xx, const double yy, const double zz, const double ww, const int bin=0)
 compute add the \( a_{lm}\) for the normalized coordinates \( \lbrace x, y, z \rbrace \) to a specific separation bin with a weight More...
 
double power (const int l, const int bin1, const int bin2)
 compute the product of the \( a_{lm} \) in two separation bin More...
 
Constructors/destructors
 SphericalHarmonics_Coefficients ()
 default constructor
 
 SphericalHarmonics_Coefficients (const int norder, const int nbins=1)
 default constructor More...
 
 ~SphericalHarmonics_Coefficients ()
 default descructor
 

Protected Attributes

int m_nbins
 the number of separation bins
 
int m_norder
 the number of multipoles, \( l_{max}+1 \)
 
int m_lmax
 the maximum multipole \( l_{max} \)
 
int m_n_sph
 the total number of spherical harmonics
 
std::vector< int > m_n_sph_l
 the number of spherical harmonics for a given choice of \(l\)
 
std::vector< std::vector< std::complex< double > > > m_alm
 the spherical harmonics expansion coefficients in separation bins
 
std::vector< double > m_normalization
 the normalization
 
std::vector< double > m_Plm
 vector for temporary computation of associated legendre polynomials
 
std::vector< std::complex< double > > m_sph
 vector for temporary computation of spherical harmonics
 

Detailed Description

The class SphericalHarmonics_Coefficients.

This class is used to handle objects of type SphericalHarmonics_Coefficients . It contains all methods to compute coefficients of spherical harmonics expansion \(a_{lm}\) in any position of the unit sphere.

Coefficients can be binned according to the magnitude of the separation vector and accumulated.

Definition at line 57 of file SphericalHarmonics_Coefficients.h.

Constructor & Destructor Documentation

◆ SphericalHarmonics_Coefficients()

cbl::glob::SphericalHarmonics_Coefficients::SphericalHarmonics_Coefficients ( const int  norder,
const int  nbins = 1 
)
inline

default constructor

Parameters
norderthe number of multipoles, \( l_{max}+1 \)
nbinsthe number of separation bins

Definition at line 110 of file SphericalHarmonics_Coefficients.h.

Member Function Documentation

◆ add() [1/2]

void cbl::glob::SphericalHarmonics_Coefficients::add ( const double  xx,
const double  yy,
const double  zz,
const double  ww,
const int  bin = 0 
)

compute add the \( a_{lm}\) for the normalized coordinates \( \lbrace x, y, z \rbrace \) to a specific separation bin with a weight

Parameters
xxthe x coordinate
yythe y coordinate
zzthe z coordinate
wwthe weight
binthe separation bin

Definition at line 192 of file SphericalHarmonics_Coefficients.cpp.

◆ add() [2/2]

void cbl::glob::SphericalHarmonics_Coefficients::add ( const std::vector< std::complex< double >>  alm,
const double  ww,
const int  bin = 0 
)

add the \( a_{lm}\) to a specific separation bin with a weight

Parameters
almthe spherical harmonics expansion coefficients
wwthe weight
binthe separation bin

Definition at line 182 of file SphericalHarmonics_Coefficients.cpp.

◆ alm()

std::vector< std::complex< double > > cbl::glob::SphericalHarmonics_Coefficients::alm ( const double  xx,
const double  yy,
const double  zz 
)

compute the \( a_{lm}\) for the normalized coordinates \( \lbrace x, y, z \rbrace \)

Parameters
xxthe x coordinate
yythe y coordinate
zzthe z coordinate
Returns
vector containing the \( a_{lm}\) for the normalized coordinates \( \lbrace x, y, z \rbrace \)

Definition at line 89 of file SphericalHarmonics_Coefficients.cpp.

◆ imag()

double cbl::glob::SphericalHarmonics_Coefficients::imag ( const int  n,
const int  bin = 0 
)
inline

return the imaginary part of the n-th coefficient of the expansion for a given separation bin

Parameters
nthe n-th coefficient of the spherical harmonics expansion
binthe separation bin
Returns
the imaginary part of the n-th coefficient of the expansion for a given separation bin

Definition at line 147 of file SphericalHarmonics_Coefficients.h.

◆ initialize()

void cbl::glob::SphericalHarmonics_Coefficients::initialize ( const int  norder,
const int  nbins = 1 
)

initialize the internal quantities

Parameters
norderthe number of multipoles, \( l_{max}+1 \)
nbinsthe number of separation bins

Definition at line 46 of file SphericalHarmonics_Coefficients.cpp.

◆ power()

double cbl::glob::SphericalHarmonics_Coefficients::power ( const int  l,
const int  bin1,
const int  bin2 
)

compute the product of the \( a_{lm} \) in two separation bin

This function computes the product of the \( a_{lm} \) in two separation bin:

\[ \zeta_l(r_1, r_2) = \sum_{m=-l}^l a_{lm}(r_1) a^*_{lm} (r_2) \]

Parameters
lthe coefficient order
bin1the first separation bin
bin2the second separation bin
Returns
the product of the \( a_{lm} \) in two separation bin

Definition at line 203 of file SphericalHarmonics_Coefficients.cpp.

◆ real()

double cbl::glob::SphericalHarmonics_Coefficients::real ( const int  n,
const int  bin = 0 
)
inline

return the real part of the n-th coefficient of the expansion for a given separation bin

Parameters
nthe n-th coefficient of the spherical harmonics expansion
binthe separation bin
Returns
the real part of the n-th coefficient of the expansion for a given separation bin

Definition at line 133 of file SphericalHarmonics_Coefficients.h.


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