![]() |
CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
|
The class ThreePointCorrelation_comoving_connected. More...
#include <ThreePointCorrelation_comoving_connected.h>
Public Member Functions | |
Constructors/destructors | |
ThreePointCorrelation_comoving_connected ()=default | |
default constructor | |
ThreePointCorrelation_comoving_connected (const catalogue::Catalogue data, const catalogue::Catalogue random, const triplets::TripletType tripletType, const double side_s, const double side_u, const double perc_increase, const int nbins) | |
constructor More... | |
ThreePointCorrelation_comoving_connected (const catalogue::Catalogue data, const catalogue::Catalogue random, const triplets::TripletType tripletType, const double r12, const double r12_binSize, const double r13, const double r13_binSize, const int nbins) | |
constructor More... | |
~ThreePointCorrelation_comoving_connected ()=default | |
default destructor | |
Member functions to set the binning parameters | |
void | set_parameters (const triplets::TripletType tripletType, const double side_s, const double side_u, const double perc_increase, const int nbins) |
set the binning parameters More... | |
void | set_parameters (const triplets::TripletType tripletType, const double r12, const double r12_binSize, const double r13, const double r13_binSize, const int nbins) |
set the binning parameters More... | |
Member functions to get protected parameters | |
std::vector< double > | scale () const override |
get the protected member ThreePointCorrelation_comoving_connected::m_scale More... | |
std::vector< double > | zeta () const override |
get the protected member ThreePointCorrelation_comoving_connected::m_zeta More... | |
std::vector< double > | error () const override |
get the protected member ThreePointCorrelation_comoving_connected::m_error More... | |
Member functions to measure the three-point correlation function | |
void | measure (const std::string dir_output_triplets, const std::vector< std::string > dir_input_triplets={}, const bool count_ddd=true, const bool count_rrr=true, const bool count_ddr=true, const bool count_drr=true, const bool tcount=true, const double fact=0.1, const int seed=3213) override |
method to measure the three-point correlation function More... | |
void | measure (const std::vector< std::vector< double >> weight, const bool doJK, const std::string dir_output_triplets=par::defaultString, const std::vector< std::string > dir_input_triplets={}, const bool count_ddd=true, const bool count_rrr=true, const bool count_ddr=true, const bool count_drr=true, const bool tcount=true, const double fact=0.1, const int seed=3213) override |
method to measure the three-point correlation function More... | |
void | measure (const ErrorType errorType, const std::string dir_output_triplets, const std::vector< std::string > dir_input_triplets={}, const int nResamplings=100, const bool count_ddd=true, const bool count_rrr=true, const bool count_ddr=true, const bool count_drr=true, const bool tcount=true, const double fact=0.1, const int seed=3213) override |
method to measure the three-point correlation function More... | |
Input/Output methods | |
void | write (const std::string dir, const std::string file) const override |
write the monopole of the two-point correlation function More... | |
void | write_covariance (const std::string dir, const std::string file) const override |
write the measured three-point correlation covariance More... | |
![]() | |
ThreePType | threePType () const |
get the protected member m_threePType More... | |
std::shared_ptr< catalogue::Catalogue > | data () const |
get the protected member m_data More... | |
std::shared_ptr< catalogue::Catalogue > | random () const |
get the protected member m_random More... | |
std::shared_ptr< triplets::Triplet > | ddd () const |
get the protected member m_ddd More... | |
std::shared_ptr< triplets::Triplet > | rrr () const |
get the protected member m_rrr More... | |
std::shared_ptr< triplets::Triplet > | ddr () const |
get the protected member m_ddr More... | |
std::shared_ptr< triplets::Triplet > | drr () const |
get the protected member m_drr More... | |
virtual std::vector< double > | QQ () const |
get the protected member m_QQ More... | |
void | set_data (const catalogue::Catalogue data) |
add a data catalogue More... | |
void | set_random (const catalogue::Catalogue random) |
add a random catalogue More... | |
virtual void | measure (const std::string dir_output_triplets, const std::string dir_output_2pt, const std::vector< std::string > dir_input_triplets={}, const bool count_ddd=true, const bool count_rrr=true, const bool count_ddr=true, const bool count_drr=true, const bool tcount=false, const double fact=0.1, const int seed=3213) |
method to measure the three-point correlation function More... | |
virtual void | measure (const std::vector< std::vector< double >> weight, const bool doJK, const std::string dir_output_triplets, const std::string dir_output_2pt, const std::vector< std::string > dir_input_triplets={}, const bool count_ddd=true, const bool count_rrr=true, const bool count_ddr=true, const bool count_drr=true, const bool tcount=false, const double fact=0.1, const int seed=3213) |
method to measure the three-point correlation function More... | |
virtual void | measure (const ErrorType errorType, const std::string dir_output_triplets, const std::string dir_output_2pt, const std::vector< std::string > dir_input_triplets={}, const int nResamplings=100, const bool count_ddd=true, const bool count_rrr=true, const bool count_ddr=true, const bool count_drr=true, const bool tcount=false, const double fact=0.1, const int seed=3213) |
method to measure the three-point correlation function More... | |
virtual void | measure (const ErrorType errorType, const std::string dir_output_triplets, const std::vector< std::string > dir_input_triplets, const int nResamplings, const bool count_triplets, const bool tcount, const double fact, const int seed=3213) |
measure the three-point correlation function multipoles More... | |
virtual void | write (const std::string dir, const std::string file, const bool connected) const |
write the measured three-point correlation More... | |
ThreePointCorrelation ()=default | |
default constructor | |
ThreePointCorrelation (const catalogue::Catalogue data, const catalogue::Catalogue random) | |
constructor More... | |
virtual | ~ThreePointCorrelation ()=default |
default destructor | |
![]() | |
Measure ()=default | |
default constructor | |
virtual | ~Measure ()=default |
default destructor | |
virtual std::shared_ptr< data::Data > | dataset () const |
get the protected member dataset More... | |
Protected Attributes | |
Three-point correlation function data | |
std::vector< double > | m_scale |
scale bins | |
std::vector< double > | m_zeta |
binned connected three-point correlation function | |
std::vector< double > | m_error |
error on the binned connected three-point correlation function | |
![]() | |
ThreePType | m_threePType |
three-point correlation function type | |
std::shared_ptr< catalogue::Catalogue > | m_data |
input data catalogue | |
std::shared_ptr< catalogue::Catalogue > | m_random |
output data catalogue | |
std::shared_ptr< triplets::Triplet > | m_ddd |
number of data-data-data triplets | |
std::shared_ptr< triplets::Triplet > | m_rrr |
number of random-random-random triplets | |
std::shared_ptr< triplets::Triplet > | m_ddr |
number of data-data-random triplets | |
std::shared_ptr< triplets::Triplet > | m_drr |
number of data-random-random triplets | |
std::vector< std::shared_ptr< triplets::Triplet > > | m_ddd_regions |
number of data-data-data triplets | |
std::vector< std::shared_ptr< triplets::Triplet > > | m_rrr_regions |
number of random-random-random triplets | |
std::vector< std::shared_ptr< triplets::Triplet > > | m_ddr_regions |
number of data-data-random triplets | |
std::vector< std::shared_ptr< triplets::Triplet > > | m_drr_regions |
number of data-random-random triplets | |
![]() | |
std::shared_ptr< data::Data > | m_dataset |
the dataset of the measure | |
Additional Inherited Members | |
![]() | |
static std::shared_ptr< ThreePointCorrelation > | Create (const ThreePType type, const catalogue::Catalogue data, const catalogue::Catalogue random, const triplets::TripletType tripletType, const double side_s, const double side_u, const double perc_increase, const int nbins) |
static factory used to construct three-point correlation functions of any type More... | |
static std::shared_ptr< ThreePointCorrelation > | Create (const ThreePType type, const catalogue::Catalogue data, const catalogue::Catalogue random, const triplets::TripletType tripletType, const double r12, const double r12_binSize, const double r13, const double r13_binSize, const int nbins) |
static factory used to construct three-point correlation functions of any type More... | |
static std::shared_ptr< ThreePointCorrelation > | Create (const catalogue::Catalogue data, const catalogue::Catalogue random, const double r12Min, const double r12Max, const double r13Min, const double r13Max, const int nOrders, const double split=-1, const int seed=234) |
static factory used to construct three-point correlation functions multipoles More... | |
static std::shared_ptr< ThreePointCorrelation > | Create (const catalogue::Catalogue data, const catalogue::Catalogue random, const double rMin, const double rMax, const double binSize, const int nOrders, const double split=-1, const int seed=234) |
static factory used to construct three-point correlation functions multipoles More... | |
![]() | |
void | count_triplets (const std::shared_ptr< catalogue::Catalogue > cat1, const chainmesh::ChainMesh_Catalogue &ChainMesh_rMAX1, const chainmesh::ChainMesh_Catalogue &ChainMesh_rMAX2, std::shared_ptr< triplets::Triplet > tt, const bool tcount=false) |
method to count the number of triplets More... | |
void | count_allTriplets (const std::string dir_output_triplets=par::defaultString, const std::vector< std::string > dir_input_triplets={}, const bool count_ddd=true, const bool count_rrr=true, const bool count_ddr=true, const bool count_drr=true, const bool tcount=false, const double fact=0.1) |
count the data-data-data, random-random-random, data-data-random and data-random-random triplets, used to construct the estimator of the three-point correlation function More... | |
void | count_triplets_region (const std::shared_ptr< catalogue::Catalogue > cat1, const chainmesh::ChainMesh_Catalogue &ChainMesh_rMAX1, const chainmesh::ChainMesh_Catalogue &ChainMesh_rMAX2, std::shared_ptr< triplets::Triplet > tt, std::vector< std::shared_ptr< triplets::Triplet >> tt_regions, const std::vector< std::vector< double >> weight, const bool tcount=false) |
method to count the number of triplets More... | |
void | count_allTriplets_region (const std::vector< std::vector< double >> weight, const std::string dir_output_triplets=par::defaultString, const std::vector< std::string > dir_input_triplets={}, const bool count_ddd=true, const bool count_rrr=true, const bool count_ddr=true, const bool count_drr=true, const bool tcount=false, const double fact=0.1) |
count the data-data-data, random-random-random, data-data-random and data-random-random triplets, used to construct the estimator of the three-point correlation function More... | |
void | write_triplets (const std::shared_ptr< triplets::Triplet > TT, const std::string dir, const std::string file) const |
write the number of triplets More... | |
void | read_triplets (std::shared_ptr< triplets::Triplet > TT, const std::vector< std::string > dir, const std::string file) |
read the number of triplets More... | |
The class ThreePointCorrelation_comoving_connected.
ThreePointCorrelation_comoving_connected.h "Headers/ThreePointCorrelation_comoving_connected.h"
This is the base class used to measure the connected three-point correlation function in comoving coordinates
Definition at line 64 of file ThreePointCorrelation_comoving_connected.h.
|
inline |
constructor
data | object of class Catalogue containing the input catalogue |
random | of class Catalogue containing the random data catalogue |
tripletType | the triplet type; it can be: TripletType::comoving_theta, TripletType::comoving_side |
side_s | the size of r12 |
side_u | the ratio r13/r12 |
perc_increase | the ratio Δr12/r12=Δr13/r13 |
nbins | number of bins |
Definition at line 111 of file ThreePointCorrelation_comoving_connected.h.
|
inline |
constructor
data | object of class Catalogue containing the input catalogue |
random | of class Catalogue containing the random data catalogue |
tripletType | the triplet type; it can be: TripletType::comoving_theta, TripletType::comoving_side |
r12 | the size of r12 |
r12_binSize | the size of r12 bin |
r13 | the size of r13 |
r13_binSize | the size of r13 bin |
nbins | number of bins |
Definition at line 128 of file ThreePointCorrelation_comoving_connected.h.
|
inlineoverridevirtual |
get the protected member ThreePointCorrelation_comoving_connected::m_error
Reimplemented from cbl::measure::threept::ThreePointCorrelation.
Reimplemented in cbl::measure::threept::ThreePointCorrelation_comoving_reduced.
Definition at line 197 of file ThreePointCorrelation_comoving_connected.h.
|
overridevirtual |
method to measure the three-point correlation function
errorType | type of error |
dir_output_triplets | name of the output directory used to store the number of triplets |
dir_input_triplets | name of the input directories containing the number of triplets |
nResamplings | number of resamplings |
count_ddd | 1 → count the data-data-data triplets; 0 → read the data-data-data triplets from a file |
count_rrr | 1 → count the random-random-random triplets; 0 → read the random-random-random triplets from a file |
count_ddr | 1 → count the data-data-random triplets; 0 → read the data-data-random triplets from a file |
count_drr | 1 → count the data-random-random triplets; 0 → read the data-random-random triplets from a file |
tcount | 1 → activate the CPU time counter; 0 → no time counter |
fact | factor used to compute the cell size of the chain mesh: it is multiplied by the maximum distance considered for the couples and can be setted by the user to optimize the count of the couples |
seed | the seed for random number generation |
Reimplemented from cbl::measure::threept::ThreePointCorrelation.
Definition at line 203 of file ThreePointCorrelation_comoving_connected.cpp.
|
overridevirtual |
method to measure the three-point correlation function
dir_output_triplets | name of the output directory used to store the number of triplets |
dir_input_triplets | name of the input directories containing the number of triplets |
count_ddd | 1 → count the data-data-data triplets; 0 → read the data-data-data triplets from a file |
count_rrr | 1 → count the random-random-random triplets; 0 → read the random-random-random triplets from a file |
count_ddr | 1 → count the data-data-random triplets; 0 → read the data-data-random triplets from a file |
count_drr | 1 → count the data-random-random triplets; 0 → read the data-random-random triplets from a file |
tcount | 1 → activate the CPU time counter; 0 → no time counter |
fact | factor used to compute the cell size of the chain mesh: it is multiplied by the maximum distance considered for the couples and can be setted by the user to optimize the count of the couples |
seed | the seed for random number generation |
Reimplemented from cbl::measure::threept::ThreePointCorrelation.
Definition at line 84 of file ThreePointCorrelation_comoving_connected.cpp.
|
overridevirtual |
method to measure the three-point correlation function
weight | region weights |
doJK | → normalize to 1/(n-1); 1 → normalize to n-1/n (for Jackknife) |
dir_output_triplets | name of the output directory used to store the number of triplets |
dir_input_triplets | name of the input directories containing the number of triplets |
count_ddd | 1 → count the data-data-data triplets; 0 → read the data-data-data triplets from a file |
count_rrr | 1 → count the random-random-random triplets; 0 → read the random-random-random triplets from a file |
count_ddr | 1 → count the data-data-random triplets; 0 → read the data-data-random triplets from a file |
count_drr | 1 → count the data-random-random triplets; 0 → read the data-random-random triplets from a file |
tcount | 1 → activate the CPU time counter; 0 → no time counter |
fact | factor used to compute the cell size of the chain mesh: it is multiplied by the maximum distance considered for the couples and can be setted by the user to optimize the count of the couples |
seed | the seed for random number generation |
Compute resamplings and covariance matrix
Reimplemented from cbl::measure::threept::ThreePointCorrelation.
Definition at line 125 of file ThreePointCorrelation_comoving_connected.cpp.
|
inlineoverridevirtual |
get the protected member ThreePointCorrelation_comoving_connected::m_scale
Reimplemented from cbl::measure::threept::ThreePointCorrelation.
Reimplemented in cbl::measure::threept::ThreePointCorrelation_comoving_reduced.
Definition at line 181 of file ThreePointCorrelation_comoving_connected.h.
void cbl::measure::threept::ThreePointCorrelation_comoving_connected::set_parameters | ( | const triplets::TripletType | tripletType, |
const double | r12, | ||
const double | r12_binSize, | ||
const double | r13, | ||
const double | r13_binSize, | ||
const int | nbins | ||
) |
set the binning parameters
tripletType | the triplet type; it can be: TripletType::comoving_theta, TripletType::comoving_side |
r12 | the size of r12 |
r12_binSize | the size of r12 bin |
r13 | the size of r13 |
r13_binSize | the size of r13 bin |
nbins | number of bins |
Definition at line 72 of file ThreePointCorrelation_comoving_connected.cpp.
void cbl::measure::threept::ThreePointCorrelation_comoving_connected::set_parameters | ( | const triplets::TripletType | tripletType, |
const double | side_s, | ||
const double | side_u, | ||
const double | perc_increase, | ||
const int | nbins | ||
) |
set the binning parameters
tripletType | the triplet type; it can be: TripletType::comoving_theta, TripletType::comoving_side |
side_s | the size of r12 |
side_u | the ratio r13/r12 |
perc_increase | the ratio Δr12/r12=Δr13/r13 |
nbins | number of bins |
Definition at line 55 of file ThreePointCorrelation_comoving_connected.cpp.
|
overridevirtual |
write the monopole of the two-point correlation function
dir | output directory |
file | output file |
Implements cbl::measure::threept::ThreePointCorrelation.
Definition at line 253 of file ThreePointCorrelation_comoving_connected.cpp.
|
overridevirtual |
write the measured three-point correlation covariance
dir | output directory |
file | output file |
Reimplemented from cbl::measure::threept::ThreePointCorrelation.
Reimplemented in cbl::measure::threept::ThreePointCorrelation_comoving_reduced.
Definition at line 274 of file ThreePointCorrelation_comoving_connected.cpp.
|
inlineoverridevirtual |
get the protected member ThreePointCorrelation_comoving_connected::m_zeta
Reimplemented from cbl::measure::threept::ThreePointCorrelation.
Definition at line 189 of file ThreePointCorrelation_comoving_connected.h.