This example shows how to measure the monopole of the two-point correlation function and estimate the errors with different methods
try {
const std::string file_catalogue = "../input/cat.dat";
const double N_R = 3.;
std::cout << "I'm constructing the sub-regions used for jackknife and bootstrap..." << std::endl;
const int nx = 3, ny = 3, nz = 3;
const double rMin = 10.;
const double rMax = 30.;
const int nbins = 3;
const double shift = 0.5;
const std::string dir_output = "../output/";
const std::string dir_pairs = dir_output+"pairs/";
TwoP.write(dir_output, "xi_PoissonianErrors.dat");
TwoP.write(dir_output, "xi_JackknifeErrors.dat");
const int nM = 100;
TwoP.write(dir_output, "xi_BootstrapErrors.dat");
}
return 0;
}
Generic functions that use one or more classes of the CosmoBolognaLib.
int main()
main function to create the logo of the CosmoBolognaLib
The class TwoPointCorrelation1D_monopole.
const char * what() const noexcept override
the error description
The class TwoPointCorrelation1D_monopole.
@ _createRandom_box_
random catalogue with cubic geometry (or parallelepiped) in comoving coordinates
@ _Planck15_
Planck collaboration 2015, paper XIII: Table 4, TT,TE,EE+lowP+lensing.
@ _Bootstrap_
Bootstrap resampling.
@ _Poisson_
Poissonian error.
@ _Jackknife_
Jackknife resampling.
void Print(const T value, const int prec, const int ww, const std::string header="", const std::string end="\n", const bool use_coutCBL=true, std::ostream &stream=std::cout, const std::string colour=cbl::par::col_default)
function to print values with a proper homegenised format
@ _observed_
observed coordinates (R.A., Dec, redshift)
void set_ObjectRegion_SubBoxes(catalogue::Catalogue &data, const int nx, const int ny, const int nz)
set the object region in sub-boxes
@ _logarithmic_
logarithmic binning