|
Triumvirate C++ API 0.5.0.post1.dev301+g026f21751
Three-point clustering measurements in large-scale structure analyses.
|
Field (pseudo-two-point) statistics. More...
#include <field.hpp>
Collaboration diagram for trv::FieldStats:Public Member Functions | |
| FieldStats (trv::ParameterSet ¶ms, 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 | |
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.
|
explicit |
| trv::FieldStats::~FieldStats | ( | ) |
| void trv::FieldStats::reset_stats | ( | ) |
| 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.
| field_a | First field. |
| field_b | Second field. |
| shotnoise_amp | Shot-noise amplitude. |
| ell | Degree of the spherical harmonic. |
| m | Order of the spherical harmonic. |
| kbinning | Wavenumber binning. |
| trv::sys::InvalidDataError | When field_a and field_b have incompatible physical properties. |
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:| 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.
| field_a | First field. |
| field_b | Second field. |
| shotnoise_amp | Shot-noise amplitude. |
| ell | Degree of the spherical harmonic. |
| m | Order of the spherical harmonic. |
| rbinning | Separation binning. |
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:| 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.
| field_a | First field. |
| field_b | Second field. |
| ylm_a | Reduced spherical harmonics over the first field mesh. |
| ylm_b | Reduced spherical harmonics over the second field mesh. |
| shotnoise_amp | Shot-noise amplitude. |
| rbinning | Separation 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:| 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.
| field_a | First field. |
| field_b | Second field. |
| ylm_a | Reduced spherical harmonics over the first field mesh. |
| ylm_b | Reduced spherical harmonics over the second field mesh. |
| sj_a | First spherical Bessel function. |
| sj_b | Second spherical Bessel function. |
| shotnoise_amp | Shot-noise amplitude. |
| k_a,k_b | Wavenumbers at which the shot noise is evaluated. |
Definition at line 3199 of file field.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| trv::BinnedVectors trv::FieldStats::record_binned_vectors | ( | trv::Binning & | binning, |
| const std::string & | save_file = {} ) |
| std::vector<int> trv::FieldStats::nmodes |
| std::vector<int> trv::FieldStats::npairs |
| std::vector<double> trv::FieldStats::k |
| std::vector<double> trv::FieldStats::r |
| std::vector< std::complex<double> > trv::FieldStats::sn |
| std::vector< std::complex<double> > trv::FieldStats::pk |
| std::vector< std::complex<double> > trv::FieldStats::xi |