![]() |
CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
|
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 | |
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.
|
inline |
default constructor
norder | the number of multipoles, \( l_{max}+1 \) |
nbins | the number of separation bins |
Definition at line 110 of file SphericalHarmonics_Coefficients.h.
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
xx | the x coordinate |
yy | the y coordinate |
zz | the z coordinate |
ww | the weight |
bin | the separation bin |
Definition at line 192 of file SphericalHarmonics_Coefficients.cpp.
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
alm | the spherical harmonics expansion coefficients |
ww | the weight |
bin | the separation bin |
Definition at line 182 of file SphericalHarmonics_Coefficients.cpp.
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 \)
xx | the x coordinate |
yy | the y coordinate |
zz | the z coordinate |
Definition at line 89 of file SphericalHarmonics_Coefficients.cpp.
|
inline |
return the imaginary part of the n-th coefficient of the expansion for a given separation bin
n | the n-th coefficient of the spherical harmonics expansion |
bin | the separation bin |
Definition at line 147 of file SphericalHarmonics_Coefficients.h.
void cbl::glob::SphericalHarmonics_Coefficients::initialize | ( | const int | norder, |
const int | nbins = 1 |
||
) |
initialize the internal quantities
norder | the number of multipoles, \( l_{max}+1 \) |
nbins | the number of separation bins |
Definition at line 46 of file SphericalHarmonics_Coefficients.cpp.
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) \]
l | the coefficient order |
bin1 | the first separation bin |
bin2 | the second separation bin |
Definition at line 203 of file SphericalHarmonics_Coefficients.cpp.
|
inline |
return the real part of the n-th coefficient of the expansion for a given separation bin
n | the n-th coefficient of the spherical harmonics expansion |
bin | the separation bin |
Definition at line 133 of file SphericalHarmonics_Coefficients.h.