This example shows how to how to measure the number counts of a catalogue, computing Poissonian errors
try {
const std::string file_catalogue = "../input/cat.dat";
std::cout << "I'm constructing the sub-regions used for jackknife and bootstrap..." << std::endl;
const int nCells_Ra = 3;
const int nCells_Dec = 3;
const int nbin = 10;
const std::string dir = "../output/";
NC.write(dir, "redshift_distribution_Poisson.dat");
NC.write(dir, "redshift_distribution_Jackknife.dat");
NC.write_covariance(dir, "redshift_distribution_Jackknife_covariance.dat");
NC.write(dir, "redshift_distribution_Bootstrap.dat");
NC.write_covariance(dir, "redshift_distribution_Bootstrap_covariance.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 NumberCounts1D_Redshift.
const char * what() const noexcept override
the error description
The class NumberCounts1D_Redshift.
void measure(const ErrorType errorType=ErrorType::_Poisson_, const std::string dir_output_resample=par::defaultString, const int nResamplings=0, const int seed=3213, const bool conv=false, const double sigma=0.) override
measure the number counts
@ _Planck15_
Planck collaboration 2015, paper XIII: Table 4, TT,TE,EE+lowP+lensing.
@ _Bootstrap_
Bootstrap resampling.
@ _Poisson_
Poissonian error.
@ _Jackknife_
Jackknife resampling.
void set_ObjectRegion_RaDec(catalogue::Catalogue &data, const int nCells_Ra, const int nCells_Dec, const bool use_colatitude=true)
set the object region in angular SubBoxes
@ _observed_
observed coordinates (R.A., Dec, redshift)