Triumvirate C++ API 0.5.0
Three-point clustering measurements in large-scale structure analyses.
Loading...
Searching...
No Matches
threept.hpp
Go to the documentation of this file.
1// Copyright (C) [GPLv3 Licence]
2//
3// This file is part of the Triumvirate program. See the COPYRIGHT
4// and LICENCE files at the top-level directory of this distribution
5// for details of copyright and licensing.
6//
7// This program is free software: you can redistribute it and/or modify it
8// under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15// See the GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with this program. If not, see <https://www.gnu.org/licenses/>.
19
37#ifndef TRIUMVIRATE_INCLUDE_THREEPT_HPP_INCLUDED_
38#define TRIUMVIRATE_INCLUDE_THREEPT_HPP_INCLUDED_
39
40#include <fftw3.h>
41
42#include <cmath>
43#include <complex>
44#include <cstdio>
45
46#include "monitor.hpp"
47#include "parameters.hpp"
48#include "maths.hpp"
49#include "particles.hpp"
50#include "dataobjs.hpp"
51#include "field.hpp"
52#include "twopt.hpp"
53
54namespace trv {
55
56// ***********************************************************************
57// Spherical orders
58// ***********************************************************************
59
65 int m1, m2, M;
66
72
77 bool is_zeros();
78
83 bool is_inverse(const SphericalOrderTriplet& other);
84};
85
86
87// ***********************************************************************
88// Coupling coefficients
89// ***********************************************************************
90
106 int ell1, int ell2, int ELL, int m1, int m2, int M
107);
108
115
116
117// ***********************************************************************
118// Normalisation
119// ***********************************************************************
120
129 ParticleCatalogue& particles, double alpha = 1.
130);
131
141 ParticleCatalogue& particles, trv::ParameterSet& params, double alpha = 1.
142);
143
144
145// ***********************************************************************
146// Shot noise
147// ***********************************************************************
148
181std::complex<double> calc_ylm_wgtd_shotnoise_amp_for_bispec(
182 ParticleCatalogue& particles_data, ParticleCatalogue& particles_rand,
183 LineOfSight* los_data, LineOfSight* los_rand,
184 double alpha, int ell, int m
185);
186
200std::complex<double> calc_ylm_wgtd_shotnoise_amp_for_bispec(
201 ParticleCatalogue& particles, LineOfSight* los,
202 double alpha, int ell, int m
203);
204
205
206// ***********************************************************************
207// Full statistics
208// ***********************************************************************
209
210// STYLE: Standard naming convention is not always followed for
211// intermediary quantities in the functions below.
212
213// Hereafter 'the Paper' refers to Sugiyama et al. (2019) [1803.02132].
214
228 ParticleCatalogue& catalogue_data, ParticleCatalogue& catalogue_rand,
229 LineOfSight* los_data, LineOfSight* los_rand,
230 trv::ParameterSet& params, trv::Binning& kbinning,
231 double norm_factor
232);
233
248 ParticleCatalogue& catalogue_data, ParticleCatalogue& catalogue_rand,
249 LineOfSight* los_data, LineOfSight* los_rand,
250 trv::ParameterSet& params, trv::Binning& rbinning,
251 double norm_factor
252);
253
265 ParticleCatalogue& catalogue_data,
266 trv::ParameterSet& params, trv::Binning kbinning,
267 double norm_factor
268);
269
281 ParticleCatalogue& catalogue_data,
282 trv::ParameterSet& params, trv::Binning& rbinning,
283 double norm_factor
284);
285
301 ParticleCatalogue& catalogue_rand, LineOfSight* los_rand,
302 trv::ParameterSet& params, trv::Binning& rbinning,
303 double alpha, double norm_factor, bool wide_angle = false
304);
305
306#ifdef TRV_USE_LEGACY_CODE
322trv::BispecMeasurements compute_bispec_for_los_choice(
323 ParticleCatalogue& catalogue_data, ParticleCatalogue& catalogue_rand,
324 LineOfSight* los_data, LineOfSight* los_rand,
325 int los_choice,
326 trv::ParameterSet& params, trv::Binning& kbinning,
327 double norm_factor
328);
329#endif // TRV_USE_LEGACY_CODE
330
331} // namespace trv
332
333#endif // !TRIUMVIRATE_INCLUDE_THREEPT_HPP_INCLUDED_
Isotropic coordinate binning.
Definition dataobjs.hpp:56
Parameter set.
Particle catalogue.
Definition particles.hpp:68
Clustering measurement data objects.
Mesh field (with one-point statistics) and pseudo two-point statistics.
Mathematical calculations.
Provide tracking of program resources and exceptions.
double calc_coupling_coeff_3pt(int ell1, int ell2, int ELL, int m1, int m2, int M)
Calculate the coupling coefficient for spherical-harmonic components of full three-point statistics.
Definition threept.cpp:63
double calc_bispec_normalisation_from_particles(ParticleCatalogue &particles, double alpha=1.)
Calculate particle-based bispectrum normalisation.
Definition threept.cpp:94
std::complex< double > calc_ylm_wgtd_shotnoise_amp_for_bispec(ParticleCatalogue &particles_data, ParticleCatalogue &particles_rand, LineOfSight *los_data, LineOfSight *los_rand, double alpha, int ell, int m)
Calculate bispectrum shot noise amplitude weighted by reduced spherical harmonics.
Definition threept.cpp:154
trv::ThreePCFMeasurements compute_3pcf_in_gpp_box(ParticleCatalogue &catalogue_data, trv::ParameterSet &params, trv::Binning &rbinning, double norm_factor)
Compute three-point correlation function in a periodic box in the global plane-parallel approximation...
Definition threept.cpp:2115
trv::BispecMeasurements compute_bispec_in_gpp_box(ParticleCatalogue &catalogue_data, trv::ParameterSet &params, trv::Binning kbinning, double norm_factor)
Compute bispectrum in a periodic box in the global plane-parallel approximation.
Definition threept.cpp:1423
trv::ThreePCFWindowMeasurements compute_3pcf_window(ParticleCatalogue &catalogue_rand, LineOfSight *los_rand, trv::ParameterSet &params, trv::Binning &rbinning, double alpha, double norm_factor, bool wide_angle=false)
Compute three-point correlation function window from a random catalogue.
Definition threept.cpp:2525
double calc_bispec_normalisation_from_mesh(ParticleCatalogue &particles, trv::ParameterSet &params, double alpha=1.)
Calculate mesh-based bispectrum normalisation.
Definition threept.cpp:136
trv::BispecMeasurements compute_bispec(ParticleCatalogue &catalogue_data, ParticleCatalogue &catalogue_rand, LineOfSight *los_data, LineOfSight *los_rand, trv::ParameterSet &params, trv::Binning &kbinning, double norm_factor)
Compute bispectrum from paired survey-type catalogues.
Definition threept.cpp:246
void validate_multipole_coupling(trv::ParameterSet &params)
Validate three-point correlator multipoles are non-vanishing.
Definition threept.cpp:71
trv::ThreePCFMeasurements compute_3pcf(ParticleCatalogue &catalogue_data, ParticleCatalogue &catalogue_rand, LineOfSight *los_data, LineOfSight *los_rand, trv::ParameterSet &params, trv::Binning &rbinning, double norm_factor)
Compute three-point correlation function from paired survey-type catalogues.
Definition threept.cpp:986
Program parameter configuration.
Particle containers with I/O methods and operations.
Bispectrum measurements.
Definition dataobjs.hpp:247
Line-of-sight vector.
Definition dataobjs.hpp:184
Spherical order triplet .
Definition threept.hpp:64
bool is_zeros()
Check if the spherical orders are all zeros.
Definition threept.cpp:47
SphericalOrderTriplet operator+(const SphericalOrderTriplet &other)
Return the sum with another spherical order triplet.
Definition threept.cpp:38
int M
spherical orders
Definition threept.hpp:65
bool is_inverse(const SphericalOrderTriplet &other)
Check if another triplet is the additive inverse.
Definition threept.cpp:51
Three-point correlation function measurements.
Definition dataobjs.hpp:265
Three-point correlation function window measurements.
Definition dataobjs.hpp:286
Two-point statistic computations.