Triumvirate C++ API 0.5.0.post1.dev301+g026f21751
Three-point clustering measurements in large-scale structure analyses.
Loading...
Searching...
No Matches
trv::FieldStats Class Reference

Field (pseudo-two-point) statistics. More...

#include <field.hpp>

+ Collaboration diagram for trv::FieldStats:

Public Member Functions

 FieldStats (trv::ParameterSet &params, bool plan_ini=true)
 Construct pseudo two-point statistics.
 
 ~FieldStats ()
 Destruct two-point statistics.
 
void reset_stats ()
 Reset two-point statistics.
 
void compute_ylm_wgtd_2pt_stats_in_fourier (MeshField &field_a, MeshField &field_b, std::complex< double > shotnoise_amp, int ell, int m, trv::Binning &kbinning)
 Compute binned two-point statistics in Fourier space.
 
void compute_ylm_wgtd_2pt_stats_in_config (MeshField &field_a, MeshField &field_b, std::complex< double > shotnoise_amp, int ell, int m, trv::Binning &rbinning)
 Compute binned two-point statistics in configuration space.
 
void compute_uncoupled_shotnoise_for_3pcf (MeshField &field_a, MeshField &field_b, std::vector< std::complex< double > > &ylm_a, std::vector< std::complex< double > > &ylm_b, std::complex< double > shotnoise_amp, trv::Binning &rbinning)
 Compute binned uncoupled three-point correlation function shot noise.
 
std::complex< double > compute_uncoupled_shotnoise_for_bispec_per_bin (MeshField &field_a, MeshField &field_b, std::vector< std::complex< double > > &ylm_a, std::vector< std::complex< double > > &ylm_b, trvm::SphericalBesselCalculator &sj_a, trvm::SphericalBesselCalculator &sj_b, std::complex< double > shotnoise_amp, double k_a, double k_b)
 Compute unbinned uncoupled bispectrum shot noise on the FFT mesh grid.
 
trv::BinnedVectors record_binned_vectors (trv::Binning &binning, const std::string &save_file)
 Record binned vectors given a binning scheme.
 

Public Attributes

std::vector< int > nmodes
 number of wavevector modes in bins
 
std::vector< int > npairs
 number of separation pairs in bins
 
std::vector< double > k
 average wavenumber in bins
 
std::vector< double > r
 
std::vector< std::complex< double > > sn
 shot-noise power in bins
 
std::vector< std::complex< double > > pk
 pseudo power spectrum in bins
 
std::vector< std::complex< double > > xi
 pseudo two-point correlation function in bins
 

Detailed Description

Field (pseudo-two-point) statistics.

This provides the computation of both binned and unbinned (pseudo) two-point statistiscs that aid the computation of full two- and three-point statistics.

Definition at line 582 of file field.hpp.

Constructor & Destructor Documentation

◆ FieldStats()

trv::FieldStats::FieldStats ( trv::ParameterSet & params,
bool plan_ini = true )
explicit

Construct pseudo two-point statistics.

Parameters
paramsParameter set.
plan_iniFlag for FFTW plan initialisation (default is true).

Definition at line 2076 of file field.cpp.

+ Here is the call graph for this function:

◆ ~FieldStats()

trv::FieldStats::~FieldStats ( )

Destruct two-point statistics.

Definition at line 2193 of file field.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ reset_stats()

void trv::FieldStats::reset_stats ( )

Reset two-point statistics.

Definition at line 2248 of file field.cpp.

+ Here is the caller graph for this function:

◆ compute_ylm_wgtd_2pt_stats_in_fourier()

void trv::FieldStats::compute_ylm_wgtd_2pt_stats_in_fourier ( MeshField & field_a,
MeshField & field_b,
std::complex< double > shotnoise_amp,
int ell,
int m,
trv::Binning & kbinning )

Compute binned two-point statistics in Fourier space.

For a pair of Fourier-space fields \( f_{a,b} \), this computes

\[ \int \frac{\mathrm{d}^2\,\hat{\vec{k}}}{4\pi} y_{LM}(\hat{\vec{k}}) W(\vec{k})^{-2} [ f_a(\vec{k}) f_b(\vec{k}) - P_\mathrm{shot} C_1(\vec{k}) ] \,, \]

where \( W(\vec{k}) \) is the mesh assignment window in Fourier space, \( P_\mathrm{shot} \) is the shot noise amplitude, and \( C_1 \) is the mode-dependent aliasing function.

See also
Eq. (20) in Jing (2004) [astro-ph/0409240].
Parameters
field_aFirst field.
field_bSecond field.
shotnoise_ampShot-noise amplitude.
ellDegree of the spherical harmonic.
mOrder of the spherical harmonic.
kbinningWavenumber binning.
Exceptions
trv::sys::InvalidDataErrorWhen field_a and field_b have incompatible physical properties.
Note
field_a and field_b are Fourier-space fields and their entries are arranged in the FFTW convention (i.e. shifted).

Definition at line 2511 of file field.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compute_ylm_wgtd_2pt_stats_in_config()

void trv::FieldStats::compute_ylm_wgtd_2pt_stats_in_config ( MeshField & field_a,
MeshField & field_b,
std::complex< double > shotnoise_amp,
int ell,
int m,
trv::Binning & rbinning )

Compute binned two-point statistics in configuration space.

This involves an inverse Fourier transform added to the algorithm in trv::FieldStats::compute_ylm_wgtd_2pt_stats_in_fourier before binning.

Parameters
field_aFirst field.
field_bSecond field.
shotnoise_ampShot-noise amplitude.
ellDegree of the spherical harmonic.
mOrder of the spherical harmonic.
rbinningSeparation binning.
Note
field_a and field_b are Fourier-space fields and their entries are arranged in the FFTW convention (i.e. shifted).

Definition at line 2705 of file field.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compute_uncoupled_shotnoise_for_3pcf()

void trv::FieldStats::compute_uncoupled_shotnoise_for_3pcf ( MeshField & field_a,
MeshField & field_b,
std::vector< std::complex< double > > & ylm_a,
std::vector< std::complex< double > > & ylm_b,
std::complex< double > shotnoise_amp,
trv::Binning & rbinning )

Compute binned uncoupled three-point correlation function shot noise.

This computes the quantity

\[ \frac{(-1)^{\ell_a + \ell_b}}{N_\mathrm{mode}(r) V_\mathrm{cell}} \int \frac{\mathrm{d}^2\,\hat{\vec{r}}}{4\pi} y^*_{\ell_a m_a}(\hat{\vec{r}}) y^*_{\ell_b m_b}(\hat{\vec{r}}) \int \frac{\mathrm{d}^3\,\vec{k}}{(2\pi)^3} \mathrm{e}^{\mathrm{i} \vec{k} \cdot \vec{r}} W(\vec{k})^{-2} [f_a(\vec{k}) f_b(\vec{k}) - S C_1(\vec{k})] \,, \]

where \( S \) is the shot noise amplitude (see trv::FieldStats::compute_ylm_wgtd_2pt_stats_in_fourier for other notations).

This method involves additional reduced spherical-harmonic weights after the inverse Fourier transform as in trv::FieldStats::compute_ylm_wgtd_2pt_stats_in_config before binning and additional normalisation.

See also
Eq. (51) in Sugiyama et al. (2019) [1803.02132].
Parameters
field_aFirst field.
field_bSecond field.
ylm_aReduced spherical harmonics over the first field mesh.
ylm_bReduced spherical harmonics over the second field mesh.
shotnoise_ampShot-noise amplitude.
rbinningSeparation binning.

Definition at line 2947 of file field.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compute_uncoupled_shotnoise_for_bispec_per_bin()

std::complex< double > trv::FieldStats::compute_uncoupled_shotnoise_for_bispec_per_bin ( MeshField & field_a,
MeshField & field_b,
std::vector< std::complex< double > > & ylm_a,
std::vector< std::complex< double > > & ylm_b,
trvm::SphericalBesselCalculator & sj_a,
trvm::SphericalBesselCalculator & sj_b,
std::complex< double > shotnoise_amp,
double k_a,
double k_b )

Compute unbinned uncoupled bispectrum shot noise on the FFT mesh grid.

This computes the quantity

\[ \int \mathrm{d}^3\,\vec{r} j_{\ell_a}(k_a r) j_{\ell_b}(k_b r) y^*_{\ell_a m_a}(\hat{\vec{x}}) y^*_{\ell_b m_b}(\hat{\vec{x}}) \int \frac{\mathrm{d}^3\,\vec{k}}{(2\pi)^3} \mathrm{e}^{\mathrm{i} \vec{k} \cdot \vec{r}} W(\vec{k})^{-2} [f_a(\vec{k}) f_b(\vec{k}) - S C_1(\vec{k})] \]

(see trv::FieldStats::compute_ylm_wgtd_2pt_stats_in_fourier for other notations).

This method involves additional reduced spherical-harmonic weights after the inverse Fourier transform as in trv::FieldStats::compute_ylm_wgtd_2pt_stats_in_config before binning and additional normalisation.

See also
Eq. (45) in Sugiyama et al. (2019) [1803.02132].
Parameters
field_aFirst field.
field_bSecond field.
ylm_aReduced spherical harmonics over the first field mesh.
ylm_bReduced spherical harmonics over the second field mesh.
sj_aFirst spherical Bessel function.
sj_bSecond spherical Bessel function.
shotnoise_ampShot-noise amplitude.
k_a,k_bWavenumbers at which the shot noise is evaluated.
Returns
Unbinned uncoupled bispectrum shot noise.

Definition at line 3199 of file field.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ record_binned_vectors()

trv::BinnedVectors trv::FieldStats::record_binned_vectors ( trv::Binning & binning,
const std::string & save_file = {} )

Record binned vectors given a binning scheme.

Parameters
binningBinning.
save_fileSaved filename if non-empty.

Definition at line 2317 of file field.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ nmodes

std::vector<int> trv::FieldStats::nmodes

number of wavevector modes in bins

Definition at line 584 of file field.hpp.

◆ npairs

std::vector<int> trv::FieldStats::npairs

number of separation pairs in bins

Definition at line 585 of file field.hpp.

◆ k

std::vector<double> trv::FieldStats::k

average wavenumber in bins

Definition at line 586 of file field.hpp.

◆ r

std::vector<double> trv::FieldStats::r

average separation in bins

Definition at line 587 of file field.hpp.

◆ sn

std::vector< std::complex<double> > trv::FieldStats::sn

shot-noise power in bins

Definition at line 589 of file field.hpp.

◆ pk

std::vector< std::complex<double> > trv::FieldStats::pk

pseudo power spectrum in bins

Definition at line 591 of file field.hpp.

◆ xi

std::vector< std::complex<double> > trv::FieldStats::xi

pseudo two-point correlation function in bins

Definition at line 593 of file field.hpp.


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