CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
cbl::measure::threept::ThreePointCorrelation_comoving_connected Class Reference

The class ThreePointCorrelation_comoving_connected. More...

#include <ThreePointCorrelation_comoving_connected.h>

Inheritance diagram for cbl::measure::threept::ThreePointCorrelation_comoving_connected:
Collaboration diagram for cbl::measure::threept::ThreePointCorrelation_comoving_connected:

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...
 
- Public Member Functions inherited from cbl::measure::threept::ThreePointCorrelation
ThreePType threePType () const
 get the protected member m_threePType More...
 
std::shared_ptr< catalogue::Cataloguedata () const
 get the protected member m_data More...
 
std::shared_ptr< catalogue::Cataloguerandom () const
 get the protected member m_random More...
 
std::shared_ptr< triplets::Tripletddd () const
 get the protected member m_ddd More...
 
std::shared_ptr< triplets::Tripletrrr () const
 get the protected member m_rrr More...
 
std::shared_ptr< triplets::Tripletddr () const
 get the protected member m_ddr More...
 
std::shared_ptr< triplets::Tripletdrr () 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
 
- Public Member Functions inherited from cbl::measure::Measure
 Measure ()=default
 default constructor
 
virtual ~Measure ()=default
 default destructor
 
virtual std::shared_ptr< data::Datadataset () 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
 
- Protected Attributes inherited from cbl::measure::threept::ThreePointCorrelation
ThreePType m_threePType
 three-point correlation function type
 
std::shared_ptr< catalogue::Cataloguem_data
 input data catalogue
 
std::shared_ptr< catalogue::Cataloguem_random
 output data catalogue
 
std::shared_ptr< triplets::Tripletm_ddd
 number of data-data-data triplets
 
std::shared_ptr< triplets::Tripletm_rrr
 number of random-random-random triplets
 
std::shared_ptr< triplets::Tripletm_ddr
 number of data-data-random triplets
 
std::shared_ptr< triplets::Tripletm_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
 
- Protected Attributes inherited from cbl::measure::Measure
std::shared_ptr< data::Datam_dataset
 the dataset of the measure
 

Additional Inherited Members

- Static Public Member Functions inherited from cbl::measure::threept::ThreePointCorrelation
static std::shared_ptr< ThreePointCorrelationCreate (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< ThreePointCorrelationCreate (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< ThreePointCorrelationCreate (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< ThreePointCorrelationCreate (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...
 
- Protected Member Functions inherited from cbl::measure::threept::ThreePointCorrelation
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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ThreePointCorrelation_comoving_connected() [1/2]

cbl::measure::threept::ThreePointCorrelation_comoving_connected::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 
)
inline

constructor

Parameters
dataobject of class Catalogue containing the input catalogue
randomof class Catalogue containing the random data catalogue
tripletTypethe triplet type; it can be: TripletType::comoving_theta, TripletType::comoving_side
side_sthe size of r12
side_uthe ratio r13/r12
perc_increasethe ratio Δr12/r12=Δr13/r13
nbinsnumber of bins

Definition at line 111 of file ThreePointCorrelation_comoving_connected.h.

◆ ThreePointCorrelation_comoving_connected() [2/2]

cbl::measure::threept::ThreePointCorrelation_comoving_connected::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 
)
inline

constructor

Parameters
dataobject of class Catalogue containing the input catalogue
randomof class Catalogue containing the random data catalogue
tripletTypethe triplet type; it can be: TripletType::comoving_theta, TripletType::comoving_side
r12the size of r12
r12_binSizethe size of r12 bin
r13the size of r13
r13_binSizethe size of r13 bin
nbinsnumber of bins

Definition at line 128 of file ThreePointCorrelation_comoving_connected.h.

Member Function Documentation

◆ error()

std::vector<double> cbl::measure::threept::ThreePointCorrelation_comoving_connected::error ( ) const
inlineoverridevirtual

get the protected member ThreePointCorrelation_comoving_connected::m_error

Returns
the error on the connected three-point correlation function

Reimplemented from cbl::measure::threept::ThreePointCorrelation.

Reimplemented in cbl::measure::threept::ThreePointCorrelation_comoving_reduced.

Definition at line 197 of file ThreePointCorrelation_comoving_connected.h.

◆ measure() [1/3]

void cbl::measure::threept::ThreePointCorrelation_comoving_connected::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 
)
overridevirtual

method to measure the three-point correlation function

Parameters
errorTypetype of error
dir_output_tripletsname of the output directory used to store the number of triplets
dir_input_tripletsname of the input directories containing the number of triplets
nResamplingsnumber of resamplings
count_ddd1 → count the data-data-data triplets; 0 → read the data-data-data triplets from a file
count_rrr1 → count the random-random-random triplets; 0 → read the random-random-random triplets from a file
count_ddr1 → count the data-data-random triplets; 0 → read the data-data-random triplets from a file
count_drr1 → count the data-random-random triplets; 0 → read the data-random-random triplets from a file
tcount1 → activate the CPU time counter; 0 → no time counter
factfactor 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
seedthe seed for random number generation

Reimplemented from cbl::measure::threept::ThreePointCorrelation.

Definition at line 203 of file ThreePointCorrelation_comoving_connected.cpp.

◆ measure() [2/3]

void cbl::measure::threept::ThreePointCorrelation_comoving_connected::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 
)
overridevirtual

method to measure the three-point correlation function

Parameters
dir_output_tripletsname of the output directory used to store the number of triplets
dir_input_tripletsname of the input directories containing the number of triplets
count_ddd1 → count the data-data-data triplets; 0 → read the data-data-data triplets from a file
count_rrr1 → count the random-random-random triplets; 0 → read the random-random-random triplets from a file
count_ddr1 → count the data-data-random triplets; 0 → read the data-data-random triplets from a file
count_drr1 → count the data-random-random triplets; 0 → read the data-random-random triplets from a file
tcount1 → activate the CPU time counter; 0 → no time counter
factfactor 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
seedthe seed for random number generation

Reimplemented from cbl::measure::threept::ThreePointCorrelation.

Definition at line 84 of file ThreePointCorrelation_comoving_connected.cpp.

◆ measure() [3/3]

void cbl::measure::threept::ThreePointCorrelation_comoving_connected::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 
)
overridevirtual

method to measure the three-point correlation function

Parameters
weightregion weights
doJK→ normalize to 1/(n-1); 1 → normalize to n-1/n (for Jackknife)
dir_output_tripletsname of the output directory used to store the number of triplets
dir_input_tripletsname of the input directories containing the number of triplets
count_ddd1 → count the data-data-data triplets; 0 → read the data-data-data triplets from a file
count_rrr1 → count the random-random-random triplets; 0 → read the random-random-random triplets from a file
count_ddr1 → count the data-data-random triplets; 0 → read the data-data-random triplets from a file
count_drr1 → count the data-random-random triplets; 0 → read the data-random-random triplets from a file
tcount1 → activate the CPU time counter; 0 → no time counter
factfactor 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
seedthe 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.

◆ scale()

std::vector<double> cbl::measure::threept::ThreePointCorrelation_comoving_connected::scale ( ) const
inlineoverridevirtual

◆ set_parameters() [1/2]

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

Parameters
tripletTypethe triplet type; it can be: TripletType::comoving_theta, TripletType::comoving_side
r12the size of r12
r12_binSizethe size of r12 bin
r13the size of r13
r13_binSizethe size of r13 bin
nbinsnumber of bins

Definition at line 72 of file ThreePointCorrelation_comoving_connected.cpp.

◆ set_parameters() [2/2]

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

Parameters
tripletTypethe triplet type; it can be: TripletType::comoving_theta, TripletType::comoving_side
side_sthe size of r12
side_uthe ratio r13/r12
perc_increasethe ratio Δr12/r12=Δr13/r13
nbinsnumber of bins

Definition at line 55 of file ThreePointCorrelation_comoving_connected.cpp.

◆ write()

void cbl::measure::threept::ThreePointCorrelation_comoving_connected::write ( const std::string  dir,
const std::string  file 
) const
overridevirtual

write the monopole of the two-point correlation function

Parameters
diroutput directory
fileoutput file

Implements cbl::measure::threept::ThreePointCorrelation.

Definition at line 253 of file ThreePointCorrelation_comoving_connected.cpp.

◆ write_covariance()

void cbl::measure::threept::ThreePointCorrelation_comoving_connected::write_covariance ( const std::string  dir,
const std::string  file 
) const
overridevirtual

write the measured three-point correlation covariance

Parameters
diroutput directory
fileoutput 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.

◆ zeta()

std::vector<double> cbl::measure::threept::ThreePointCorrelation_comoving_connected::zeta ( ) const
inlineoverridevirtual

get the protected member ThreePointCorrelation_comoving_connected::m_zeta

Returns
the binned connected three-point correlation function

Reimplemented from cbl::measure::threept::ThreePointCorrelation.

Definition at line 189 of file ThreePointCorrelation_comoving_connected.h.


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