This example shows how to clean a cosmic void catalogue, in order to extract cosmological constraints from void counting
using namespace catalogue;
try {
std::string file_voids = "../input/void_catalogue.txt";
std::vector<int> columns_voids = {1, 2, 3, 4};
std::string file_tracers = "../input/halo_catalogue.txt";
std::vector<int> columns_tracers = {1, 2, 3};
double mps = tracers_catalogue.
mps();
auto input_tracersCata = std::make_shared<cbl::catalogue::Catalogue> (
cbl::catalogue::Catalogue(std::move(tracers_catalogue)));
double ratio = 1.5;
bool initial_radius = true;
std::vector<double> delta_r = {17., 150.};
double threshold = 0.3;
std::string mkdir = "mkdir -p ../output/";
if (system(mkdir.c_str())) {}
std::string cata_out = "../output/cleaned_void_catalogue.out";
void_catalogue.
write_data(cata_out, var_names_voids);
}
return 0;
}
int main()
main function to create the logo of the CosmoBolognaLib
double var(const int index, const Var var_name) const
get the value of the i-th object variable
double Max(const Var var_name) const
get the maximum value of a variable of the catalogue objects
double mps(const double boxside=par::defaultDouble) const
compute the catalogue's mean particle separation
void clean_void_catalogue(const bool initial_radius=false, const std::vector< double > delta_r={-1, 1000}, const double threshold=0.205, const bool rescale=true, const std::shared_ptr< Catalogue > tracers_catalogue={}, chainmesh::ChainMesh3D ChM={}, const double ratio=1.5, const bool checkoverlap=true, const Var ol_criterion=Var::_CentralDensity_)
function that modifies a void catalogue according to a set of user selected criteria....
void write_data(const std::string outputFile, const std::vector< Var > var_name={}, const std::string sep=" ", const std::string header="") const
write both the comoving and polar coordinates, and the regions (if present) of the catalogue to an ou...
const char * what() const noexcept override
the error description
@ _CentralDensity_
centralDensity
The global namespace of the CosmoBolognaLib
@ _comoving_
comoving coordinates (x, y, z)