Triumvirate C++ API 0.5.0
Three-point clustering measurements in large-scale structure analyses.
Loading...
Searching...
No Matches
twopt.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_TWOPT_HPP_INCLUDED_
38#define TRIUMVIRATE_INCLUDE_TWOPT_HPP_INCLUDED_
39
40#include <algorithm>
41#include <cmath>
42#include <complex>
43#include <cstdio>
44
45#include "monitor.hpp"
46#include "maths.hpp"
47#include "parameters.hpp"
48#include "dataobjs.hpp"
49#include "particles.hpp"
50#include "field.hpp"
51
52namespace trv {
53
54// ***********************************************************************
55// Coupling coefficients
56// ***********************************************************************
57
71double calc_coupling_coeff_2pt(int ell, int ELL, int m, int M);
72
73
74// ***********************************************************************
75// Normalisation
76// ***********************************************************************
77
86 ParticleCatalogue& particles, double alpha = 1.
87);
88
98 trv::ParticleCatalogue& particles,
99 trv::ParameterSet& params, double alpha = 1.
100);
101
119 trv::ParticleCatalogue& particles_data,
120 trv::ParticleCatalogue& particles_rand,
121 trv::ParameterSet& params, double alpha
122);
123
147 trv::ParticleCatalogue& particles_data,
148 trv::ParticleCatalogue& particles_rand,
149 trv::ParameterSet& params, double alpha,
150 double padding, double cellsize, const std::string& assignment
151);
152
153
154// ***********************************************************************
155// Shot noise
156// ***********************************************************************
157
166 ParticleCatalogue& particles, double alpha = 1.
167);
168
198std::complex<double> calc_ylm_wgtd_shotnoise_amp_for_powspec(
199 ParticleCatalogue& particles_data, ParticleCatalogue& particles_rand,
200 LineOfSight* los_data, LineOfSight* los_rand,
201 double alpha, int ell, int m
202);
203
217std::complex<double> calc_ylm_wgtd_shotnoise_amp_for_powspec(
218 ParticleCatalogue& particles, LineOfSight* los,
219 double alpha, int ell, int m
220);
221
222
223// ***********************************************************************
224// Full statistics
225// ***********************************************************************
226
227// STYLE: Standard naming convention is not always followed for
228// intermediary quantities in the functions below.
229
243 ParticleCatalogue& catalogue_data, ParticleCatalogue& catalogue_rand,
244 LineOfSight* los_data, LineOfSight* los_rand,
245 trv::ParameterSet& params, trv::Binning& kbinning,
246 double norm_factor
247);
248
263 ParticleCatalogue& catalogue_data, ParticleCatalogue& catalogue_rand,
264 LineOfSight* los_data, LineOfSight* los_rand,
265 trv::ParameterSet& params, trv::Binning& rbinning,
266 double norm_factor
267);
268
280 ParticleCatalogue& catalogue_data,
281 trv::ParameterSet& params, trv::Binning kbinning,
282 double norm_factor
283);
284
296 ParticleCatalogue& catalogue_data,
297 trv::ParameterSet& params, trv::Binning& rbinning,
298 double norm_factor
299);
300
314 trv::ParticleCatalogue& catalogue_rand, trv::LineOfSight* los_rand,
315 trv::ParameterSet& params, trv::Binning rbinning,
316 double alpha, double norm_factor
317);
318
319} // namespace trv
320
321#endif // !TRIUMVIRATE_INCLUDE_TWOPT_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_powspec_shotnoise_from_particles(ParticleCatalogue &particles, double alpha=1.)
Calculate particle-based power spectrum shot noise level.
Definition twopt.cpp:223
trv::TwoPCFWindowMeasurements compute_corrfunc_window(trv::ParticleCatalogue &catalogue_rand, trv::LineOfSight *los_rand, trv::ParameterSet &params, trv::Binning rbinning, double alpha, double norm_factor)
Compute two-point correlation function window from a random catalogue and optionally save the results...
Definition twopt.cpp:761
trv::TwoPCFMeasurements compute_corrfunc(ParticleCatalogue &catalogue_data, ParticleCatalogue &catalogue_rand, LineOfSight *los_data, LineOfSight *los_rand, trv::ParameterSet &params, trv::Binning &rbinning, double norm_factor)
Compute two-point correlation function from paired survey-type catalogues.
Definition twopt.cpp:454
double calc_coupling_coeff_2pt(int ell, int ELL, int m, int M)
Calculate the coupling coefficient for spherical-harmonic components of full two-point statistics.
Definition twopt.cpp:43
std::complex< double > calc_ylm_wgtd_shotnoise_amp_for_powspec(ParticleCatalogue &particles_data, ParticleCatalogue &particles_rand, LineOfSight *los_data, LineOfSight *los_rand, double alpha, int ell, int m)
Calculate power spectrum shot noise weighted by reduced spherical harmonics.
Definition twopt.cpp:250
trv::PowspecMeasurements compute_powspec_in_gpp_box(ParticleCatalogue &catalogue_data, trv::ParameterSet &params, trv::Binning kbinning, double norm_factor)
Compute power spectrum in a periodic box in the global plane-parallel approximation.
Definition twopt.cpp:568
double calc_powspec_normalisation_from_particles(ParticleCatalogue &particles, double alpha=1.)
Calculate particle-based power spectrum normalisation.
Definition twopt.cpp:54
double calc_powspec_normalisation_from_mesh(trv::ParticleCatalogue &particles, trv::ParameterSet &params, double alpha=1.)
Calculate mesh-based power spectrum normalisation.
Definition twopt.cpp:96
trv::PowspecMeasurements compute_powspec(ParticleCatalogue &catalogue_data, ParticleCatalogue &catalogue_rand, LineOfSight *los_data, LineOfSight *los_rand, trv::ParameterSet &params, trv::Binning &kbinning, double norm_factor)
Compute power spectrum from paired survey-type catalogues.
Definition twopt.cpp:340
trv::TwoPCFMeasurements compute_corrfunc_in_gpp_box(ParticleCatalogue &catalogue_data, trv::ParameterSet &params, trv::Binning &rbinning, double norm_factor)
Compute two-point correlation function in a periodic box in the global plane-parallel approximation.
Definition twopt.cpp:666
double calc_powspec_normalisation_from_meshes(trv::ParticleCatalogue &particles_data, trv::ParticleCatalogue &particles_rand, trv::ParameterSet &params, double alpha)
Calculate power spectrum normalisation from mixed meshes.
Definition twopt.cpp:109
Program parameter configuration.
Particle containers with I/O methods and operations.
Line-of-sight vector.
Definition dataobjs.hpp:184
Power spectrum measurements.
Definition dataobjs.hpp:200
Two-point correlation function measurements.
Definition dataobjs.hpp:215
Two-point correlation function window measurements.
Definition dataobjs.hpp:228