![]() |
CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
|
#include "Headers/Catalogue.h"
Inherited by cbl::catalogue::CatalogueChainMesh.
Public Member Functions | |
Constructors/destructors | |
Catalogue ()=default | |
default constructor | |
Catalogue (const Catalogue &obj) | |
Copy constructor for the Catalogue class. More... | |
Catalogue (Catalogue &&obj) | |
move constructor for the Catalogue class More... | |
Catalogue & | operator= (const Catalogue &obj) |
copy assignment for the Catalogue class More... | |
Catalogue & | operator= (Catalogue &&obj) noexcept |
move assignment for the Catalogue class More... | |
Catalogue (const ObjectType objectType, const CoordinateType coordinateType, const std::vector< double > coord1, const std::vector< double > coord2, const std::vector< double > coord3, const std::vector< double > weight={}, const cosmology::Cosmology &cosm={}, const CoordinateUnits inputUnits=CoordinateUnits::_radians_) | |
constructor More... | |
Catalogue (const ObjectType objectType, const CoordinateType coordinateType, const std::vector< double > coord1, const std::vector< double > coord2, const std::vector< double > coord3, const cosmology::Cosmology &cosm, const CoordinateUnits inputUnits=CoordinateUnits::_radians_) | |
constructor More... | |
Catalogue (const ObjectType objectType, const CoordinateType coordinateType, const std::vector< std::string > file, const int col1=1, const int col2=2, const int col3=3, const int colWeight=-1, const int colRegion=-1, const double nSub=1.1, const double fact=1., const cosmology::Cosmology &cosm={}, const CoordinateUnits inputUnits=CoordinateUnits::_radians_, const CharEncode charEncode=CharEncode::_ascii_, const std::string comment="#", const int seed=3213) | |
constructor, reading a file with coordinates More... | |
Catalogue (const ObjectType objectType, const CoordinateType coordinateType, const std::vector< std::string > file, const cosmology::Cosmology &cosm, const CoordinateUnits inputUnits=CoordinateUnits::_radians_) | |
constructor, reading a file with coordinates More... | |
Catalogue (const ObjectType objectType, const CoordinateType coordinateType, const std::vector< Var > attribute, const std::vector< int > column, const std::vector< std::string > file, const int comments=0, const double nSub=1.1, const double fact=1, const cosmology::Cosmology &cosm={}, const CoordinateUnits inputUnits=CoordinateUnits::_radians_, const char delimiter='\t', const int seed=3213) | |
constructor, reading a file with attributes of the catalogue More... | |
Catalogue (const ObjectType objectType, const CoordinateType coordinateType, const std::vector< std::string > file, const std::vector< std::string > column_names, const bool read_weights, const bool read_regions, const double nSub, const double fact, const cosmology::Cosmology &cosm={}, const CoordinateUnits inputUnits=CoordinateUnits::_radians_, const int seed=3213) | |
constructor, reading a file in FITS format More... | |
Catalogue (const ObjectType objectType, const CoordinateType coordinateType, const std::vector< std::string > file, const std::vector< std::string > column_names, const std::vector< Var > attribute, const double nSub, const double fact, const cosmology::Cosmology &cosm={}, const CoordinateUnits inputUnits=CoordinateUnits::_radians_, const int seed=3213) | |
constructor, reading a file in FITS format More... | |
template<typename T > | |
Catalogue (std::vector< T > object) | |
constructor, using vectors of generic objects More... | |
Catalogue (std::vector< std::shared_ptr< Object > > sample) | |
constructor, using vectors of pointers to generic objects More... | |
Catalogue (const ObjectType objectType, const std::vector< Var > attribute, const std::vector< int > column, const std::vector< std::string > file, const int comments=0, const double nSub=1.1, const int seed=3213) | |
constructor, reading a file with attributes of the catalogue More... | |
Catalogue (const Catalogue input_catalogue, const Catalogue target_catalogue, const Var var_name, const int nbin, const int seed=3213) | |
constructor, creating a catalogue by matching the distribution of one quantity from a target catalogue More... | |
Catalogue (const Catalogue input_catalogue, const Catalogue target_catalogue, const cbl::catalogue::Var var_name1, const int nbin1, const cbl::catalogue::Var var_name2, const int nbin2, const int seed=3213) | |
constructor, creating a catalogue by matching the distributions of two quantities from a target catalogue More... | |
Catalogue (const Catalogue halo_catalogue, const cosmology::Cosmology &cosm, const HODType HOD_Type, const double threshold, const bool substructures=true, std::vector< double > parameter={}) | |
constructor that creates a catalogue of galaxies using an HOD model to popolate the haloes More... | |
~Catalogue ()=default | |
default destructor | |
Constructors of random catalogues | |
Catalogue (const RandomType type, const cosmology::Cosmology &real_cosm, const cosmology::Cosmology &test_cosm, const std::string dir_in, const double Zguess_min, const double Zguess_max) | |
constructor that creates a random catalogue in a cubic box, warped by geometric distortions More... | |
Catalogue (const RandomType type, const Catalogue catalogue, const double N_R, const int nbin=10, const cosmology::Cosmology &cosm={}, const bool conv=false, const double sigma=0., const std::vector< double > redshift={}, const std::vector< double > RA={}, const std::vector< double > Dec={}, int z_ndigits=10, const int seed=3213) | |
constructor that creates a random catalogue with either the square geometry or with 'the shuffle' method More... | |
Catalogue (const RandomType type, const int N_R, const double z_step, const Catalogue catalogue, const cosmology::Cosmology &cosm={}, const std::vector< double > RA={}, const std::vector< double > Dec={}, const double sigma_kernel=0.01, const int nbins=100, int z_ndigits=10, const int times_default=5, double times_change=0.5, const double tolerance=0.05, const std::string out_path_nz=par::defaultString, const std::string out_file_nz=par::defaultString, const int seed=3213) | |
constructor that creates a random catalogue with the 'shuffle' method. More... | |
Catalogue (const RandomType type, const Catalogue catalogue, const double N_R, const int nbin, const double Angle, const std::vector< double > redshift, const cosmology::Cosmology &cosm={}, const bool conv=false, const double sigma=0., const int seed=3213) | |
constructor that creates a random catalogue in a cone More... | |
Catalogue (const RandomType type, const std::vector< std::string > mangle_mask, const Catalogue catalogue, const double N_R, const int nbin, const cosmology::Cosmology cosm, const bool conv=false, const double sigma=0., const int seed=3213) | |
constructor that creates a random catalogue using the a mask in the MANGLE format for the angular distribution and taking the redshift distribution from an input catalogue More... | |
Catalogue (const RandomType type, const Catalogue catalogue, const double N_R, const bool dndz_per_stripe, const int nbin, const cosmology::Cosmology cosm, const bool conv=false, const double sigma=0, const int seed=3213) | |
constructor that creates a random catalogue using the SDSS stripes. More... | |
Catalogue (const RandomType type, Catalogue catalogue, const double N_R, const cosmology::Cosmology cosm, const std::vector< double > RA_range, const std::vector< double > DEC_range, const unsigned int nbin, const int seed) | |
constructor that creates a random catalogue for light cones homogeneous in RA and Dec and with redshift dependent density. More... | |
Constructor of Void catalogues | |
Catalogue (const VoidAlgorithm algorithm, Catalogue tracer_catalogue, Catalogue random_catalogue, const std::string dir_output, const std::string output, const double cellsize, const int n_rec=1, const double step_size=2.5/3., const double threshold=0., const std::vector< bool > print={true, true}) | |
constructor that creates a void catalogue extracting cosmic voids from a catalogue of tracers, for COMOVING coordinates. This void finder is based on dynamical criteria: the density field is reconstructed from the displacement field generated by the back-in-time evolution of the tracers. Voids are therefore classified as regions of negative velocity divergence. More... | |
Catalogue (const VoidAlgorithm algorithm, Catalogue tracer_catalogue, Catalogue random_catalogue, const std::string dir_output, const std::string output, const double cellsize, const cbl::cosmology::Cosmology cosm, const std::vector< double > RA_range, const std::vector< double > DEC_range, const int n_rec=1, const double step_size=2.5/3., const double threshold=0.) | |
constructor that creates a void catalogue extracting cosmic voids from a catalogue of tracers for OBSERVED COORDINATES. This void finder is based on dynamical criteria: the density field is reconstructed from the displacement field generated by the back-in-time evolution of the tracers. Voids are therefore classified as regions of negative velocity divergence. More... | |
Constructors used to read catalogues from standard GADGET files | |
Catalogue (const ObjectType objectType, const std::string file_cn=par::defaultString, const bool snapformat=false, const bool swap=false, const double fact=0.001, const bool read_catalogue=true, const double nSub=1.1, const std::string component_to_read="ALL", const std::vector< std::vector< double >> edges={{par::defaultDouble, par::defaultDouble},{par::defaultDouble, par::defaultDouble},{par::defaultDouble, par::defaultDouble}}) | |
constructor that reads object of selected type from Gadget snapshots More... | |
Catalogue (const int snap, const std::string basedir, const bool swap=false, const bool long_ids=false, const double scaleFact=1.0, const double massFact=1.0, const EstimateCriterion estimate_crit=EstimateCriterion::_m200_, const bool veldisp=false, const bool masstab=false, const bool add_satellites=false, const bool verbose=false) | |
constructor that reads objects of class HostHalo with satellite dependencies from group and subgroup files generated by the gadget implementation of the FoF and SUBFIND algorithms (respectively) More... | |
Member functions used to get the private members and their properties | |
std::vector< std::shared_ptr< Object > > | sample () const |
get the private member Catalogue::m_object More... | |
double | xx (const int i) const |
get the private member Catalogue::m_object[i]->m_xx More... | |
double | yy (const int i) const |
get the private member Catalogue::m_object[i]->m_yy More... | |
double | zz (const int i) const |
get the private member Catalogue::m_object[i]->m_zz More... | |
double | vx (const int i) const |
get the private member Catalogue::m_object[i]->m_vx More... | |
double | vy (const int i) const |
get the private member Catalogue::m_object[i]->m_vy More... | |
double | vz (const int i) const |
get the private member Catalogue::m_object[i]->m_vz More... | |
double | dc (const int i) const |
get the private member Catalogue::m_object[i]->m_dc More... | |
double | ra (const int i) const |
get the private member Catalogue::m_object[i]->m_ra More... | |
double | dec (const int i) const |
get the private member Catalogue::m_object[i]->m_dec More... | |
double | ra_tile (const int i) const |
get the private member Catalogue::m_object[i]->m_ra_tile More... | |
double | dec_tile (const int i) const |
get the private member Catalogue::m_object[i]->m_dec_tile More... | |
double | sn (const int i) const |
get the private member Catalogue::m_object[i]->m_sn More... | |
double | redshift (const int i) const |
get the private member Catalogue::m_object[i]->m_redshift More... | |
double | redshiftMin (const int i) const |
get the private member Catalogue::m_object[i]->m_redshiftMin More... | |
double | redshiftMax (const int i) const |
get the private member Catalogue::m_object[i]->m_redshiftMax More... | |
double | shear1 (const int i) const |
get the private member Catalogue::m_object[i]->m_shear1 More... | |
double | shear2 (const int i) const |
get the private member Catalogue::m_object[i]->m_shear2 More... | |
double | odds (const int i) const |
get the private member Catalogue::m_object[i]->m_odds More... | |
double | lensingWeight (const int i) const |
get the private member Catalogue::m_object[i]->m_lensingWeight More... | |
double | lensingCalib (const int i) const |
get the private member Catalogue::m_object[i]->m_lensingCalib More... | |
double | weight (const int i) const |
get the private member Catalogue::m_object[i]->m_weight More... | |
long | region (const int i) const |
get the private member Catalogue::m_object[i]->m_region More... | |
std::string | field (const int i) const |
get the private member Catalogue::m_object[i]->m_field More... | |
double | x_displacement (const int i) const |
get the private member Catalogue::m_object[i]->m_x_displacement More... | |
double | y_displacement (const int i) const |
get the private member Catalogue::m_object[i]->m_y_displacement More... | |
double | z_displacement (const int i) const |
get the private member Catalogue::m_object[i]->m_z_displacement More... | |
size_t | nRegions () |
get the private member m_nRegions More... | |
std::vector< long > | region_list () const |
get the list of regions in which the catalogue is divided More... | |
std::vector< std::string > | field_list () const |
get the list of fields where the objects have been observed More... | |
size_t | nFields () const |
get the total number of fields where the objects have been observed More... | |
double | mass (const int i) const |
get the private member Catalogue::m_object[i]->m_mass More... | |
double | magnitude (const int i) const |
get the private member Catalogue::m_object[i]->m_magnitude More... | |
double | magnitudeU (const int i) const |
get the private member Catalogue::m_object[i]->m_magnitudeU More... | |
double | magnitudeG (const int i) const |
get the private member Catalogue::m_object[i]->m_magnitudeG More... | |
double | magnitudeR (const int i) const |
get the private member Catalogue::m_object[i]->m_magnitudeR More... | |
double | magnitudeI (const int i) const |
get the private member Catalogue::m_object[i]->m_magnitudeI More... | |
double | radius (const int i) const |
get the private member Catalogue::m_object[i]->m_radius More... | |
double | densityContrast (const int i) const |
get the private member Catalogue::m_object[i]->m_densityContrast More... | |
double | centralDensity (const int i) const |
get the private member Catalogue::m_object[i]->m_centralDensity More... | |
int | ID (const int i) const |
get the private member Catalogue::m_object[i]->m_ID More... | |
double | mass_proxy (const int i) const |
get the private member Catalogue::m_object[i]->m_mass_proxy More... | |
double | mass_proxy_error (const int i) const |
get the private member Catalogue::m_object[i]->m_mass_proxy_error More... | |
int | IDHost (const int i) const |
get the private member Catalogue::m_object[i]->m_IDHost More... | |
double | galaxyTag (const int i) const |
get the private member Catalogue::m_object[i]->m_galaxyTag More... | |
double | mstar (const int i) const |
get the private member Catalogue::m_object[i]->m_mstar More... | |
double | massinfall (const int i) const |
get the private member Catalogue::m_object[i]->m_minfall More... | |
double | generic (const int i) const |
get the private member Catalogue::m_object[i]->m_generic More... | |
double | tot_mass (const int i) const |
get the private member Catalogue::m_object[ii]->m_tot_mass More... | |
std::vector< long > | region () const |
get the values of the object regions More... | |
std::vector< std::string > | field () const |
get the values of the object fields More... | |
std::vector< std::shared_ptr< Object > > | satellites (const int index) const |
get the private member Catalogue::m_object[ii]->m_satellites More... | |
std::vector< unsigned int > | part (const int index) const |
get the private member Catalogue::m_object[index]->m_part of ChainMeshCell More... | |
std::vector< std::vector< unsigned int > > | nearCells (const int index) const |
get the private member Catalogue::m_object[index]->m_nearCells of ChainMeshCell More... | |
double | var (const int index, const Var var_name) const |
get the value of the i-th object variable More... | |
int | var_int (const int index, const Var var_name) const |
get the value of the i-th object integer variable More... | |
std::vector< double > | var (const Var var_name) const |
get the values of the object variables More... | |
std::vector< int > | var_int (const Var var_name) const |
get the values of the object integer variables More... | |
bool | isSetVar (const int index, const Var var_name) const |
check if the given variable of the i-th object is set More... | |
bool | isSetVar (const Var var_name) const |
check if the given object variables are set More... | |
std::shared_ptr< Object > | catalogue_object (const int i) const |
get the i-th object of the catalogue More... | |
std::shared_ptr< Object > | operator[] (const size_t i) const |
access the i-th Catalogue object More... | |
std::vector< std::shared_ptr< Object > > | catalogue_object () const |
get the object vector More... | |
std::vector< double > | coordinate (const int i) const |
get the X, Y, Z coordinates of the i-th object of the catalogue More... | |
size_t | nObjects () const |
get the number of objects of the catalogue More... | |
std::vector< size_t > | nObjects_lightCone (const int nbin) const |
get the number of objects of the catalogue for Light Cones More... | |
double | Min (const Var var_name) const |
get the minimum value of a variable of the catalogue objects More... | |
double | Max (const Var var_name) const |
get the maximum value of a variable of the catalogue objects More... | |
std::vector< double > | stats_var (const Var var_name) const |
get the mean, the median, the standard deviation, and the difference between the third and first quartiles of a variable More... | |
std::vector< std::vector< double > > | stats_var (const std::vector< Var > var_name) const |
get the mean, the median, the standard deviation, and the difference between the third and first quartiles of a vector of variables More... | |
void | var_distr (const Var var_name, std::vector< double > &_var, std::vector< double > &dist, std::vector< double > &err, const int nbin, const bool linear=true, const std::string file_out=par::defaultString, const double Volume=1., const bool norm=false, const double V1=par::defaultDouble, const double V2=par::defaultDouble, const std::string bin_type="Linear", const bool convolution=false, const double sigma=0.) const |
get the distribution of a variable More... | |
double | weightedN () const |
get the total weight of the objects of the catalogue More... | |
double | volume (const double boxside=par::defaultDouble) const |
compute the catalogue's comoving volume More... | |
double | numdensity (const double boxside=par::defaultDouble) const |
compute the catalogue's number density More... | |
double | numdensity_error (const double boxside=par::defaultDouble) const |
compute the catalogue's number density error More... | |
double | mps (const double boxside=par::defaultDouble) const |
compute the catalogue's mean particle separation More... | |
double | mps_error (const double boxside=par::defaultDouble) const |
compute the catalogue's mean particle separation error More... | |
std::vector< double > | z_bins (const int nbin) const |
get the catalogue's redshift bins More... | |
Member functions used to set the private members | |
void | set_region (const std::vector< long > region, const int nRegions=-1) |
set a private variable More... | |
void | set_region_number (const size_t nRegions) |
set the private variable m_nRegion More... | |
void | set_ra_dec_tile (const std::vector< double > RA_tile, const std::vector< double > Dec_tile, const CoordinateUnits inputUnits=CoordinateUnits::_degrees_) |
set the central R.A. and Dec of the tiles More... | |
void | set_field (const std::vector< std::string > field) |
set a private variable More... | |
void | set_var (const int index, const Var var_name, const double value, const cosmology::Cosmology cosmology={}, const bool update_coordinates=true) |
set a private variable More... | |
void | set_var (const int index, const Var var_name, const int value, const cosmology::Cosmology cosmology={}) |
set a private variable More... | |
void | set_var (const Var var_name, const std::vector< double > var, const cosmology::Cosmology cosmology={}, const bool update_coordinates=true) |
set a private variable More... | |
void | set_var (const Var var_name, const std::vector< int > var, const cosmology::Cosmology cosmology={}) |
set a private variable More... | |
void | set_satellite (const int index, const std::shared_ptr< Object > satellite={}) |
set the private member HostHalo::m_satellites More... | |
void | set_satellites (const int index, const std::vector< std::shared_ptr< Object >> satellites={}) |
set the private member HostHalo::m_satellites More... | |
void | set_part (const int index, const std::vector< unsigned int > part={}) |
set the private member ChainMeshCell::m_part More... | |
void | set_nearCells (const int index, const std::vector< std::vector< unsigned int >> nearCells={}) |
set the private member ChainMeshCell::m_nearCells More... | |
void | compute_centralDensity (const std::shared_ptr< Catalogue > tracers_catalogue, chainmesh::ChainMesh3D ChM, const double threshold) |
compute the central density of each object in a void catalogue. We define as central density the density contrast computed inside a spherical region grown around the void center, with a radius of \(2\) times the mean particle separation of the tracer catalogue More... | |
void | compute_centralDensity (const std::shared_ptr< Catalogue > tracers_catalogue, chainmesh::ChainMesh3D ChM, const std::vector< double > par_numdensity, const double threshold) |
compute the central density of each object in a void catalogue. We define as central density the density contrast computed inside a spherical region grown around the void center, with a radius of \(2\) times the mean particle separation of the tracer catalogue More... | |
void | compute_centralDensity (const std::shared_ptr< Catalogue > tracers_catalogue, chainmesh::ChainMesh3D ChM, const std::vector< std::vector< double >> data_numdensity, const std::string method_interpolation, const double threshold) |
compute the central density of each object in a void catalogue. We define as central density the density contrast computed inside a spherical region grown around the void center, with a radius of \(2\) times the mean particle separation of the tracer catalogue More... | |
void | compute_densityContrast (const std::shared_ptr< Catalogue > tracers_catalogue, chainmesh::ChainMesh3D ChM, const double ratio=0.1) |
compute density contrast of cosmic voids in catalogue as the ratio between an inner and an outer sphere grown around the void centre More... | |
Member functions used to add or remove ojects to the catalogue | |
void | add_object (std::shared_ptr< Object > object) |
add one single object to the catalogue More... | |
template<typename T > | |
void | add_object (T object) |
add one single object to the catalogue More... | |
void | add_objects (std::vector< std::shared_ptr< Object > > sample) |
add some objects to the catalogue More... | |
template<typename T > | |
void | add_objects (std::vector< T > sample) |
add some objects to the catalogue More... | |
template<typename T > | |
void | replace_objects (std::vector< T > sample) |
replace existing objects with new ones More... | |
void | replace_objects (std::vector< std::shared_ptr< Object > > sample) |
replace existing objects with new ones More... | |
void | remove_objects () |
remove all objects remove all objects of the catalogue | |
void | remove_object (const int index) |
remove an existing object More... | |
void | remove_objects (const std::vector< bool > index) |
remove a set of existing objects More... | |
void | swap_objects (const int ind1, const int ind2) |
swap two existing objects More... | |
void | sort (const Var var_name, const bool increasing=false) |
bubble sort of a catalogue wrt a variable More... | |
void | shuffle (const int seed) |
shuffle objects in the catalogue More... | |
Member functions used to operate on the ojects to the catalogue | |
void | computeComovingCoordinates (const cosmology::Cosmology &cosm, const CoordinateUnits inputUnits=CoordinateUnits::_radians_) |
compute the comoving coordinates (x, y, z) from the observed coordinates (R.A., Dec, redshift) More... | |
void | computePolarCoordinates (const CoordinateUnits outputUnits=CoordinateUnits::_radians_) |
compute the polar coordinates (R.A., Dec, dc) from the comoving coordinates (x, y, z) More... | |
void | computePolarCoordinates (const cosmology::Cosmology &cosmology, const double z1=0., const double z2=10., const CoordinateUnits outputUnits=CoordinateUnits::_radians_) |
compute the polar coordinates (R.A., Dec, dc, redshift) from the comoving (x, y, z), and assuming a cosmological model More... | |
void | normalizeComovingCoordinates () |
normalize comoving coordinates More... | |
void | restoreComovingCoordinates () |
restore comoving coordinates More... | |
void | Order (const std::vector< int > vv) |
order the catalogue according to the input vector More... | |
void | Order () |
restore the original vector (i.e. the opposite of Order(std::vector<int>)) | |
void | write_comoving_coordinates (const std::string outputFile) const |
write the comoving coordinates of the catalogue to an output file More... | |
void | write_obs_coordinates (const std::string outputFile) const |
write the polar coordinates of the catalogue to an output file More... | |
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 output file More... | |
double | distance (const int i, std::shared_ptr< Object > obj) const |
get the distrance between the i-th object of the catalogue and another object More... | |
double | angsep_xyz (const int i, std::shared_ptr< Object > obj) const |
get the angular distrance between the i-th object of the catalogue and another object More... | |
Catalogue | operator+= (std::shared_ptr< Catalogue > cc) |
overloading of the += operator, to sum two catalogues More... | |
Catalogue | operator+= (const Catalogue cc) |
overloading of the += operator, to sum two catalogues More... | |
Catalogue | sub_catalogue (const Var var_name, const double down, const double up, const bool excl=false) const |
create a sub-catalogue More... | |
Catalogue | sub_catalogue (const mask_function mask, const bool excl=false) const |
create a sub-catalogue More... | |
Catalogue | sub_catalogue (const MaskObject &mask, const bool excl=false) const |
create a sub-catalogue More... | |
Catalogue | sub_catalogue (catalogue::Catalogue &data, const double tile_width_RA, const double tile_width_Dec, const bool write_tiles=false, const std::string dir_tiles="./", const std::string file_tiles="tiles_coordinates.txt") |
find the Catalogue objects falling in the tiles of an input data catalogue, given the R.A.-Dec centres of the tiles. More... | |
Catalogue | mangle_cut (const std::string mangle_mask, const bool excl=false) const |
create a sub-catalogue More... | |
Catalogue | diluted_catalogue (const double nSub, const int seed=3213) const |
create a diluted catalogue More... | |
std::shared_ptr< Catalogue > | smooth (const double gridsize, const cosmology::Cosmology cosmology, const std::vector< Var > vars={}, const int SUB=1) |
create a smoothed version of the catalogue averaging quantities on a X, Y, Z grid More... | |
int | nObjects_condition (const Var var_name, const double down, const double up, const bool excl=false) |
return the number of objectes following a condition on the variable VAR More... | |
double | weightedN_condition (const Var var_name, const double down, const double up, const bool excl=false) |
return the weighted number of objectes following a condition on the variable VAR More... | |
std::vector< double > | compute_catalogueProperties_box (const double boxside) |
compute catalogue volume, number density and mean particle separation More... | |
std::vector< std::vector< double > > | compute_catalogueProperties_lightCone (cbl::cosmology::Cosmology cosmology, const std::vector< double > RA_range, const std::vector< double > DEC_range, const unsigned int nbin) |
compute catalogue volume, number density and mean particle separation in light cones More... | |
data::ScalarField3D | counts_in_cell (const double cell_size, const int interpolation_type=0, const bool useMass=false, const double minX=par::defaultDouble, const double maxX=par::defaultDouble, const double minY=par::defaultDouble, const double maxY=par::defaultDouble, const double minZ=par::defaultDouble, const double maxZ=par::defaultDouble) const |
return the density field from object positions More... | |
data::ScalarField3D | density_field (const double cell_size, const Catalogue mask_catalogue, const int interpolation_type=0, const double kernel_radius=0., const bool useMass=false) const |
return the density field from object position More... | |
void | equalize_random_lightCone (cbl::catalogue::Catalogue tracer_catalogue, cbl::cosmology::Cosmology cosm, const std::vector< double > RA_range, const std::vector< double > DEC_range, const int seed) |
equalize the number of objects in two Light Cones catalogues More... | |
void | equalize_random_box (cbl::catalogue::Catalogue tracer_catalogue, const int seed) |
equalize the number of objects in two Box catalogues More... | |
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. If all the steps are selected the final result is a catalogue of spherical, not-overlapped voids. More... | |
void | clean_void_catalogue (const std::vector< double > par_numdensity, 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. If all the steps are selected the final result is a catalogue of spherical, not-overlapped voids. More... | |
void | clean_void_catalogue (const std::vector< std::vector< double >> data_numdensity, const std::string method_interpolation, 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. If all the steps are selected the final result is a catalogue of spherical, not-overlapped voids. More... | |
Private Attributes | |
std::vector< std::shared_ptr< Object > > | m_object |
vector containing the objects of the catalogue | |
std::vector< int > | m_index |
vector containing the object indexes | |
size_t | m_nRegions = 0 |
number of regions | |
private variables and functions used to read catalogues from standard GADGET files | |
int | m_blockheader |
contains the block-header temporary value | |
SubFindTab_Header | m_read_header (std::ifstream &finh, const bool swap=false) |
read the GADGET subfind table header More... | |
Gadget_Header | m_swap_header (Gadget_Header header) |
swap endianism of the GADGET snapshot header More... | |
SubFindTab_Header | m_swap_header (SubFindTab_Header header) |
swap endianism of the GADGET subfind table header More... | |
void | m_check_it_in (std::ifstream &finr, const bool swap) |
Input function to check consistency in reading block-headers in binary GADGET snapshots. More... | |
void | m_check_it_out (std::ifstream &finr, const bool swap) |
Ouput function to check consistency in reading block-headers in binary GADGET snapshots. More... | |
The class Catalogue.
This class is used to handle objects of type Catalogue
Definition at line 654 of file Catalogue.h.
|
inline |
Copy constructor for the Catalogue class.
obj | catalogue to be copied |
Definition at line 746 of file Catalogue.h.
|
inline |
move constructor for the Catalogue class
obj | catalogue to be moved |
Definition at line 765 of file Catalogue.h.
cbl::catalogue::Catalogue::Catalogue | ( | const ObjectType | objectType, |
const CoordinateType | coordinateType, | ||
const std::vector< double > | coord1, | ||
const std::vector< double > | coord2, | ||
const std::vector< double > | coord3, | ||
const std::vector< double > | weight = {} , |
||
const cosmology::Cosmology & | cosm = {} , |
||
const CoordinateUnits | inputUnits = CoordinateUnits::_radians_ |
||
) |
constructor
objectType | the object type, specified in the cbl::catalogue::ObjectType enumeration |
coordinateType | the coordinate type, specified in the cbl::CoordinateType enumeration |
coord1 | vector containing the first coordinates, that can be either the x comoving coordinates, or the Right Ascensions (depending on coordtype) |
coord2 | vector containing the second coordinates, that can be either the y comoving coordinates, or the Declinations (depending on coordtype) |
coord3 | vector containing the third coordinates, that can be either the z comoving coordinates, or the redshits (depending on coordtype) |
weight | vector containing the weights |
cosm | object of class Cosmology |
inputUnits | the units of the input coordinates |
Definition at line 91 of file Catalogue.cpp.
|
inline |
constructor
objectType | the object type, specified in the cbl::catalogue::ObjectType enumeration |
coordinateType | the coordinate type, specified in the cbl::CoordinateType enumeration |
coord1 | vector containing the first coordinates, that can be either the x comoving coordinates, or the Right Ascensions (depending on coordtype) |
coord2 | vector containing the second coordinates, that can be either the y comoving coordinates, or the Declinations (depending on coordtype) |
coord3 | vector containing the third coordinates, that can be either the z comoving coordinates, or the redshits (depending on coordtype) |
cosm | object of class Cosmology |
inputUnits | the units of the input coordinates |
Definition at line 881 of file Catalogue.h.
cbl::catalogue::Catalogue::Catalogue | ( | const ObjectType | objectType, |
const CoordinateType | coordinateType, | ||
const std::vector< std::string > | file, | ||
const int | col1 = 1 , |
||
const int | col2 = 2 , |
||
const int | col3 = 3 , |
||
const int | colWeight = -1 , |
||
const int | colRegion = -1 , |
||
const double | nSub = 1.1 , |
||
const double | fact = 1. , |
||
const cosmology::Cosmology & | cosm = {} , |
||
const CoordinateUnits | inputUnits = CoordinateUnits::_radians_ , |
||
const CharEncode | charEncode = CharEncode::_ascii_ , |
||
const std::string | comment = "#" , |
||
const int | seed = 3213 |
||
) |
constructor, reading a file with coordinates
objectType | the object type, specified in the cbl::catalogue::ObjectType enumeration |
coordinateType | the coordinate type, specified in the cbl::CoordinateType enumeration |
file | vector containing the files where the input catalogues are stored |
col1 | column of the input file containing the first coordinates, that can be either the x comoving coordinates, or the Right Ascensions (depending on coordtype) |
col2 | column of the input file containing the second coordinates, that can be either the y comoving coordinates, or the Declinations (depending on coordtype) |
col3 | column of the input file containing the third coordinates, that can be either the z comoving coordinates, or the redshits (depending on coordtype) |
colWeight | column of the input file containing the weights |
colRegion | column of the input file containing the regions (used for jackknife or bootstrap) |
nSub | the fracton of objects that will be randomly selected (nSub=1 \( \rightarrow \) all objects are selected) |
fact | a factor used to multiply the coordinates, i.e. coordinate_i=coordinate_i*fact |
cosm | object of class Cosmology |
inputUnits | the units of the input coordinates |
charEncode | character encoding of input file, ascii or binary |
comment | the string used to indicate a comment in the input file; all the data occurring on a line after a comment are discarded |
seed | the seed for random number generation |
Definition at line 124 of file Catalogue.cpp.
|
inline |
constructor, reading a file with coordinates
objectType | the object type, specified in the cbl::catalogue::ObjectType enumeration |
coordinateType | the coordinate type, specified in the cbl::CoordinateType enumeration |
file | vector containing the files where the input catalogues are stored |
cosm | object of class Cosmology |
inputUnits | the units of the input coordinates |
Definition at line 955 of file Catalogue.h.
cbl::catalogue::Catalogue::Catalogue | ( | const ObjectType | objectType, |
const CoordinateType | coordinateType, | ||
const std::vector< Var > | attribute, | ||
const std::vector< int > | column, | ||
const std::vector< std::string > | file, | ||
const int | comments = 0 , |
||
const double | nSub = 1.1 , |
||
const double | fact = 1 , |
||
const cosmology::Cosmology & | cosm = {} , |
||
const CoordinateUnits | inputUnits = CoordinateUnits::_radians_ , |
||
const char | delimiter = '\t' , |
||
const int | seed = 3213 |
||
) |
constructor, reading a file with attributes of the catalogue
objectType | the object type, specified in the cbl::catalogue::ObjectType enumeration |
coordinateType | the coordinate type, specified in the cbl::CoordinateType enumeration |
attribute | vector containing the list of attributes contained in the file, used to construct the catalogue |
column | vector containing the column number which correspond to each element of the vector 'attributes', to be provided in ascending order; the column number corresponding to the first column is 1 |
file | vector containing the files where the input catalogues are stored |
comments | number of rows to ignore at the beginning of the input file if its character encoding is ascii |
nSub | the fracton of objects that will be randomly selected (nSub=1 \( \rightarrow \) all objects are selected) |
fact | a factor used to multiply the coordinates, i.e. coordinate_i=coordinate_i*fact |
cosm | object of class Cosmology |
inputUnits | the units of the input coordinates |
seed | the seed for random number generation |
delimiter | the delimiter between the columns |
Definition at line 245 of file Catalogue.cpp.
cbl::catalogue::Catalogue::Catalogue | ( | const ObjectType | objectType, |
const CoordinateType | coordinateType, | ||
const std::vector< std::string > | file, | ||
const std::vector< std::string > | column_names, | ||
const bool | read_weights, | ||
const bool | read_regions, | ||
const double | nSub, | ||
const double | fact, | ||
const cosmology::Cosmology & | cosm = {} , |
||
const CoordinateUnits | inputUnits = CoordinateUnits::_radians_ , |
||
const int | seed = 3213 |
||
) |
constructor, reading a file in FITS format
This constructor reads a FITS file that should contain at least the three object coordinates, and possibly also weights and regions
objectType | the object type, specified in the cbl::catalogue::ObjectType enumeration |
coordinateType | the coordinate type, specified in the cbl::CoordinateType enumeration |
file | vector containing the files where the input catalogues are stored |
column_names | vector containing the column names to read, i.e. at least the three coordinates, and possibly the weights and regions, in this order |
read_weights | if true, read also the object weights from the FITS file |
read_regions | if true, read also the object regions from the FITS file |
nSub | the fracton of objects that will be randomly selected (nSub=1 \( \rightarrow \) all objects are selected) |
fact | a factor used to multiply the coordinates, i.e. coordinate_i=coordinate_i*fact |
cosm | object of class Cosmology |
inputUnits | the units of the input coordinates |
seed | the seed for random number generation |
Definition at line 46 of file FITSCatalogue.cpp.
cbl::catalogue::Catalogue::Catalogue | ( | const ObjectType | objectType, |
const CoordinateType | coordinateType, | ||
const std::vector< std::string > | file, | ||
const std::vector< std::string > | column_names, | ||
const std::vector< Var > | attribute, | ||
const double | nSub, | ||
const double | fact, | ||
const cosmology::Cosmology & | cosm = {} , |
||
const CoordinateUnits | inputUnits = CoordinateUnits::_radians_ , |
||
const int | seed = 3213 |
||
) |
constructor, reading a file in FITS format
This constructor reads a FITS file and associates each column name to a specific Catalogue variable
objectType | the object type, specified in the cbl::catalogue::ObjectType enumeration |
coordinateType | the coordinate type, specified in the cbl::CoordinateType enumeration |
file | vector containing the files where the input catalogues are stored |
column_names | vector containing the column names to read |
attribute | vector containing the list of attributes contained in the file, which corresponds to each element of the vector 'column_names' (in the same order) and is specified in the cbl::catalogue::Var enumeration |
nSub | the fracton of objects that will be randomly selected (nSub=1 \( \rightarrow \) all objects are selected) |
fact | a factor used to multiply the coordinates, i.e. coordinate_i=coordinate_i*fact |
cosm | object of class Cosmology |
inputUnits | the units of the input coordinates |
seed | the seed for random number generation |
Definition at line 94 of file FITSCatalogue.cpp.
|
inline |
constructor, using vectors of generic objects
object | objects of class T, specified in the cbl::catalogue::ObjectType enumeration |
Definition at line 1091 of file Catalogue.h.
|
inline |
constructor, using vectors of pointers to generic objects
sample | vector of objects of type Object, specified in the cbl::catalogue::ObjectType enumeration |
Definition at line 1103 of file Catalogue.h.
cbl::catalogue::Catalogue::Catalogue | ( | const ObjectType | objectType, |
const std::vector< Var > | attribute, | ||
const std::vector< int > | column, | ||
const std::vector< std::string > | file, | ||
const int | comments = 0 , |
||
const double | nSub = 1.1 , |
||
const int | seed = 3213 |
||
) |
constructor, reading a file with attributes of the catalogue
objectType | the object type, specified in the cbl::catalogue::ObjectType enumeration |
attribute | vector containing the list of attributes contained in the file, used to construct the catalogue |
column | vector containing the column number which correspond to each element of the vector 'attributes' |
file | vector containing the files where the input catalogues are stored |
comments | number of rows to ignore at the beginning of the input file if its character encoding is ascii |
nSub | the fracton of objects that will be randomly selected (nSub=1 \( \rightarrow \) all objects are selected) |
seed | the seed for random number generation |
Definition at line 347 of file Catalogue.cpp.
cbl::catalogue::Catalogue::Catalogue | ( | const Catalogue | input_catalogue, |
const Catalogue | target_catalogue, | ||
const Var | var_name, | ||
const int | nbin, | ||
const int | seed = 3213 |
||
) |
constructor, creating a catalogue by matching the distribution of one quantity from a target catalogue
input_catalogue | the input catalogue |
target_catalogue | the target catalogue |
var_name | the type of variable, specified cbl::catalogue::Var enumeration |
nbin | the binning for the variable |
seed | the seed for random number generation |
Definition at line 2405 of file Catalogue.cpp.
cbl::catalogue::Catalogue::Catalogue | ( | const Catalogue | input_catalogue, |
const Catalogue | target_catalogue, | ||
const cbl::catalogue::Var | var_name1, | ||
const int | nbin1, | ||
const cbl::catalogue::Var | var_name2, | ||
const int | nbin2, | ||
const int | seed = 3213 |
||
) |
constructor, creating a catalogue by matching the distributions of two quantities from a target catalogue
input_catalogue | the input catalogue |
target_catalogue | the target catalogue |
var_name1 | the type of variable, specified cbl::catalogue::Var enumeration |
nbin1 | the binning for the variable |
var_name2 | the type of variable, specified cbl::catalogue::Var enumeration |
nbin2 | the binning for the variable |
seed | the seed for random number generation |
Definition at line 2444 of file Catalogue.cpp.
cbl::catalogue::Catalogue::Catalogue | ( | const Catalogue | halo_catalogue, |
const cosmology::Cosmology & | cosm, | ||
const HODType | HOD_Type, | ||
const double | threshold, | ||
const bool | substructures = true , |
||
std::vector< double > | parameter = {} |
||
) |
constructor that creates a catalogue of galaxies using an HOD model to popolate the haloes
halo_catalogue | the halo catalogue |
cosm | the cosmology used to convert redshifts into coordinates |
HOD_Type | the HOD model used to populate haloes with galaxies |
threshold | the threshold above which the haloes are populated with galaxies. It is espressed in stellar mass if HODType is Moster10, or in magnitude if HODType is Zehavi05 or Zehavi11, the available magnitude threshold are \({-18,-18.5,-19,-19.5,-20,-20.5,-21,-21.5,-22}\) . |
substructures | if true the halo catalogue is populated with galaxies and substructures; if false only with galaxies |
parameter | vector of double which contains the parameters for the HOD. An empty vector takes the defaul values of the HOD model considered adopted. When HODType is Moster10 only the first 11 parameters are used, that are referrend to mean occupation numbers and to the conditional stellar mass function. The first five refer to the central galaxies, while the other refer to the satellite galaxies. They are respectively \({k_c,M_{1c}, \beta_c, \gamma_c, k_s, M_{1s}, \beta_s, \gamma_s, \phi_s, \alpha_s}\). The mean occupation numbers are: |
\[\bigl \langle N_{c} (>M_{*,min},M)\bigl \rangle = \frac{1}{2}\left[1-erf\left(\frac{\log M_{*,min}/\bar M_{*,c}}{\sqrt{2}\sigma_c}\right)\right] \]
\[ \bigl \langle N_{s} (>M_{*,min},M)\bigl \rangle = \frac{\phi_s^*}{2}\Gamma\left[\frac{\alpha_s}{2} + \frac{1}{2},\left(\frac{M_{*,min}}{\bar M_{*,s}}\right)^2\right]\]
where the subscripts "c" and "s" refer to central and satellite galaxies, respectively, and \(\bar M_{*} \) is the mean stellar mass for galaxies inside an halo of mass \(M\)
\[\bar M_{*} = 2Mk\left[\left(\frac{M}{M_{1}}\right)^{-\beta}+\left(\frac{M}{M_{1}}\right)^{\gamma}\right]^{-1}\]
When HODType is Zehavi05 or Zehavi11 the length of the parameters vector is 14 and 16 respectively. In Zehavi05 the first 3 are referred to the mean occupation numbers, while with Zehavi11 the first five are referred to the mean occupation number. While the other parameters are used to extract the stellar mass of each galaxy. The parameters vector with Zehavi05 is: \({M_{min},M_1,\alpha,k_c, M_{1c}, \beta_c, \gamma_c,k_s,M_{1s},\beta_s,\gamma_s,\phi_s,\alpha_s}\). The mean occupation number for central and satellite galaxies respectively are the follow:
\[\bigl \langle N_c(M) \bigl \rangle = \begin{cases} 0 \ \ \ \text{if $M<M_{min}$} \\ 1 \ \ \ \hfill \text{if $M>M_{min}$} \\ \end{cases}\]
\[\bigl \langle N_s (M)\bigl \rangle =\begin{cases} 0 \ \ \ \text{if $M<M_{min}$} \\ (\frac{M-M_{min}}{M_1})^{\alpha} \ \ \ \text{if $M>M_{min}$} \\ \end{cases}\]
The parameters vector with Zehavi11 is: \({logM_{min},\sigma_{logM},M_0,M_1,\alpha,k_c,M_{1c}, \beta_c,\gamma_c,k_s,M_{1s},\beta_s,\gamma_s,\phi_s,\alpha_s}\) The mean occupation number for central and satellite galaxies respectively are the follow:
\[\bigl \langle N_c (M)\bigl \rangle =\frac{1}{2}\left[1+erf \left(\frac{\log M-\log M_{min}}{\sigma_{logM}}\right)\right] \]
\[\bigl \langle N_s (M)\bigl \rangle= \frac{1}{2}\left[1+\left(\frac{M-M_0}{M'_1}\right)^\alpha\right]\]
The stellar masses for central and satellite galaxies are extracted from the following conditional stellar mass function:
\[\Phi_{c}(M_*|M)=\frac{1}{\sqrt{2\pi}\ln10 M_* \sigma_c}\exp\left[-\frac{\log^2\left(M_* /\bar M_{*,c}\right)}{2\sigma_c^2}\right] \]
\[ \Phi_{s}(M_*|M)=\frac{\phi^*_s}{\bar M_{*,s}}\left(\frac{m_*}{m_{*,s}}\right)^{\alpha_s} \exp\left[-\left(\frac{M_*}{\bar M_{*,s}}\right)^2\right] \]
Definition at line 84 of file HODCatalogue.cpp.
cbl::catalogue::Catalogue::Catalogue | ( | const RandomType | type, |
const cosmology::Cosmology & | real_cosm, | ||
const cosmology::Cosmology & | test_cosm, | ||
const std::string | dir_in, | ||
const double | Zguess_min, | ||
const double | Zguess_max | ||
) |
constructor that creates a random catalogue in a cubic box, warped by geometric distortions
this function reads a cubic random catalogue from a file, generated in a given cosmology, and trasforms it into a new one in a different cosmology
type | the type of random catalogue, that must be set to _createRandom_box_ |
real_cosm | object of class Cosmology representing the real (or assumed) cosmology |
test_cosm | object of class Cosmology representing the test cosmology |
dir_in | the input directory where the original random catalogue is stored |
Zguess_min | minimum redshift used to search the redshift |
Zguess_max | maximum redshift used to search the redshift |
Definition at line 45 of file RandomCatalogue.cpp.
cbl::catalogue::Catalogue::Catalogue | ( | const RandomType | type, |
const Catalogue | catalogue, | ||
const double | N_R, | ||
const int | nbin = 10 , |
||
const cosmology::Cosmology & | cosm = {} , |
||
const bool | conv = false , |
||
const double | sigma = 0. , |
||
const std::vector< double > | redshift = {} , |
||
const std::vector< double > | RA = {} , |
||
const std::vector< double > | Dec = {} , |
||
int | z_ndigits = 10 , |
||
const int | seed = 3213 |
||
) |
constructor that creates a random catalogue with either the square geometry or with 'the shuffle' method
constructor that creates a random catalogue with either the square geometry in observed coordinates (R.A., Dec), or with the 'shuffle' method, i.e. using the R.A. and Dec coordinates of the input catalogue
type | the type of random catalogue, that must be set to either _createRandom_box_, _createRandom_square_, _createRandom_shuffle_ or _createRandom_shuffleTOT_ |
catalogue | object of class Catalogue |
N_R | fraction of random objects, i.e. NR=Nrandom/Nobjects |
nbin | number of redshift bins used to compute the redshift distribution |
cosm | object of class Cosmology |
conv | true → compute the Gaussian convolvolution of the distribution; false → do not convolve |
sigma | the standard deviation, σ, of the Gaussian kernel |
redshift | vector containg the redshifts used to computed the redshift distribution for the random catalogue; if it is not provided, the redshifts of the input catalogue will be used |
RA | vector containg the right ascensions of the random objects; if it is not provided, it will be created by the function |
Dec | vector containg the declinations of the random objects; if it is not provided, it will be created by the function |
z_ndigits | the number of digit figures used for the redshifts |
seed | the seed for random number generation |
Definition at line 88 of file RandomCatalogue.cpp.
cbl::catalogue::Catalogue::Catalogue | ( | const RandomType | type, |
const int | N_R, | ||
const double | z_step, | ||
const Catalogue | catalogue, | ||
const cosmology::Cosmology & | cosm = {} , |
||
const std::vector< double > | RA = {} , |
||
const std::vector< double > | Dec = {} , |
||
const double | sigma_kernel = 0.01 , |
||
const int | nbins = 100 , |
||
int | z_ndigits = 10 , |
||
const int | times_default = 5 , |
||
double | times_change = 0.5 , |
||
const double | tolerance = 0.05 , |
||
const std::string | out_path_nz = par::defaultString , |
||
const std::string | out_file_nz = par::defaultString , |
||
const int | seed = 3213 |
||
) |
constructor that creates a random catalogue with the 'shuffle' method.
Only two random types are allowed:
If R.A., Dec or redshift are provided in input the code won't create them.
In the case of _createRandom_shuffle_, the code will extract (times_default \(\times\) the requested number of random objects) redshift values from the smoothed \(n(z)\). Then only those extractions falling in the good redshift bins are selected. The difference between the number of such good extractions and the requested number of random objects must be lower than the tolerance parameter, and higher than the requested number of random objects. If not, the code re-performs the extraction from \(n(z)\) by multiplying times_default by \((1+times\_change)\) or by \((1-times\_change)\). Then, for example, the new variable \(times = times\_default (1+times\_change)\) is used. The aim is obtaining a number of good extractions which is higher than the requested number of random objects, and then the extracitons in excess are uniformly excluded from the good redshift bins.
type | the type of random catalogue, that must be set to either _createRandom_shuffle_ or _createRandom_shuffleTOT_ |
N_R | fraction of random objects, i.e. NR=Nrandom/Nobjects |
z_step | \(\Delta_z\): step in redshift used to find the redshift intervals where the random objects have to be extracted, in the case of _createRandom_shuffle_ |
catalogue | object of class Catalogue |
cosm | object of class Cosmology |
RA | vector containg the right ascensions of the random objects; if it is not provided, it will be created by the function |
Dec | vector containg the declinations of the random objects; if it is not provided, it will be created by the function |
sigma_kernel | \(\sigma_{\rm kernel}\), used only in the case of _createRandom_shuffle_ |
nbins | number of redshift bins used to compute the redshift distribution, used only in the case of _createRandom_shuffle_ |
z_ndigits | the number of digit figures used for the redshifts |
times_default | number defining the random extractions from the smoothed \(n(z)\), which is multiplied by the number of requested random objects. Used only if _createRandom_shuffle_ is selected |
times_change | in case the number of extractions from \(n(z)\) is too low or too high, this parameter regulates the change of times_default. Default is 50% |
tolerance | tolerance for the difference between good random redshifts and requested number of random objects. Default is 5% |
out_path_nz | used only if _createRandom_shuffle_ is selected. If provided the code writes a file containing, in the 0th column, the bin centres which depend on the input parameter nbins, while in the 1st colum there is the original smoothed redshift distribution (without holes), in the 2nd column the extracted distribution (still without holes), and in the 3rd column the final \(n(z)\) |
out_file_nz | the file located at out_path_nz |
seed | the seed for random number generation |
Definition at line 225 of file RandomCatalogue.cpp.
cbl::catalogue::Catalogue::Catalogue | ( | const RandomType | type, |
const Catalogue | catalogue, | ||
const double | N_R, | ||
const int | nbin, | ||
const double | Angle, | ||
const std::vector< double > | redshift, | ||
const cosmology::Cosmology & | cosm = {} , |
||
const bool | conv = false , |
||
const double | sigma = 0. , |
||
const int | seed = 3213 |
||
) |
constructor that creates a random catalogue in a cone
type | the type of random catalogue, that must be set to _createRandom_cone_ |
catalogue | object of class Catalogue |
N_R | fraction of random objects, i.e. NR=Nrandom/Nobjects |
nbin | number of redshift bins used to compute the redshift distribution |
Angle | angle of the cone |
redshift | vector containing the redshift of the objects in the catalogue |
cosm | object of class Cosmology |
conv | true → compute the Gaussian convolvolution of the distribution; false → do not convolve |
sigma | the standard deviation, σ, of the Gaussian kernel |
seed | the seed for random number generation |
Definition at line 425 of file RandomCatalogue.cpp.
cbl::catalogue::Catalogue::Catalogue | ( | const RandomType | type, |
const std::vector< std::string > | mangle_mask, | ||
const Catalogue | catalogue, | ||
const double | N_R, | ||
const int | nbin, | ||
const cosmology::Cosmology | cosm, | ||
const bool | conv = false , |
||
const double | sigma = 0. , |
||
const int | seed = 3213 |
||
) |
constructor that creates a random catalogue using the a mask in the MANGLE format for the angular distribution and taking the redshift distribution from an input catalogue
type | the type of random catalogue, that must be set to _createRandom_MANGLE_ |
mangle_mask | vector containing the input masks in MANGLE format |
catalogue | object of class Catalogue |
N_R | fraction of random objects, i.e. NR=Nrandom/Nobjects |
nbin | number of redshift bins used to compute the redshift distribution |
cosm | object of class Cosmology |
conv | true → compute the Gaussian convolvolution of the distribution; false → do not convolve |
sigma | the standard deviation, σ, of the Gaussian kernel |
seed | the seed for random number generation |
Definition at line 481 of file RandomCatalogue.cpp.
cbl::catalogue::Catalogue::Catalogue | ( | const RandomType | type, |
const Catalogue | catalogue, | ||
const double | N_R, | ||
const bool | dndz_per_stripe, | ||
const int | nbin, | ||
const cosmology::Cosmology | cosm, | ||
const bool | conv = false , |
||
const double | sigma = 0 , |
||
const int | seed = 3213 |
||
) |
constructor that creates a random catalogue using the SDSS stripes.
type | the type of random catalogue, that must be set to _createRandom_SDSS_stripes_ |
catalogue | object of class Catalogue |
N_R | fraction of random objects, i.e. NR=Nrandom/Nobjects |
dndz_per_stripe | true → set the redshift for the random sample shuffling redshift of data catalogue in each stripe; false → set the redshift for the random sample extracting from the total \( dn/dz\). |
nbin | number of redshift bins used to compute the redshift distribution |
cosm | object of class Cosmology |
conv | true → compute the Gaussian convolvolution of the distribution; false → do not convolve |
sigma | the standard deviation, σ, of the Gaussian kernel |
seed | the seed for random number generation |
Definition at line 546 of file RandomCatalogue.cpp.
cbl::catalogue::Catalogue::Catalogue | ( | const RandomType | type, |
Catalogue | catalogue, | ||
const double | N_R, | ||
const cosmology::Cosmology | cosm, | ||
const std::vector< double > | RA_range, | ||
const std::vector< double > | DEC_range, | ||
const unsigned int | nbin, | ||
const int | seed | ||
) |
constructor that creates a random catalogue for light cones homogeneous in RA and Dec and with redshift dependent density.
type | the type of random catalogue, that must be set to _createRandom_homogeneous_LC_ |
catalogue | object of class Catalogue |
N_R | fraction of random objects, i.e. NR=Nrandom/Nobjects |
cosm | object of class Cosmology |
RA_range | range in RA [RA_min, RA_max] |
DEC_range | range in DEC [DEC_min, DEC_max] |
nbin | number of redshift bins used to compute the redshift distribution |
seed | the seed for random number generation |
Definition at line 623 of file RandomCatalogue.cpp.
cbl::catalogue::Catalogue::Catalogue | ( | const VoidAlgorithm | algorithm, |
Catalogue | tracer_catalogue, | ||
Catalogue | random_catalogue, | ||
const std::string | dir_output, | ||
const std::string | output, | ||
const double | cellsize, | ||
const int | n_rec = 1 , |
||
const double | step_size = 2.5/3. , |
||
const double | threshold = 0. , |
||
const std::vector< bool > | print = {true, true} |
||
) |
constructor that creates a void catalogue extracting cosmic voids from a catalogue of tracers, for COMOVING coordinates. This void finder is based on dynamical criteria: the density field is reconstructed from the displacement field generated by the back-in-time evolution of the tracers. Voids are therefore classified as regions of negative velocity divergence.
algorithm | the type of algorithm on which the reconstruction of the density field is based (LaZeVo or Exact) |
tracer_catalogue | the input tracer catalogue |
random_catalogue | Random catalogues. Simply declears as empty (={}) if the random catalogue is not available: a new random catalogue will be created with the same objects and geometry of the tracer catalogue |
dir_output | path of the output directory where to store the different reconstructions, the divergence field, the subvoid and void catalogues |
output | name of the output files |
cellsize | minimum radius used for the chain mesh |
n_rec | number of reconstructions of the density field: number of random catalogue used or generated |
step_size | dimension of the grid cells used for the identification of subvoids, in units of the mean interparticle separation of the tracer catalogue. It is strongly recommended to keep this value greater than 0.75 (cell sizes too small compared to the resolution of the catalogue) |
threshold | number of minimum couplings between a certain halo and a certain random particle necessary to couple them in a definitive way |
boolean vector of two elements. If print[0] == true, the displacement field will be saved in a file. If print[1] == true, the divergence field will be saved in a file |
Definition at line 56 of file VoidCatalogue.cpp.
cbl::catalogue::Catalogue::Catalogue | ( | const VoidAlgorithm | algorithm, |
Catalogue | tracer_catalogue, | ||
Catalogue | random_catalogue, | ||
const std::string | dir_output, | ||
const std::string | output, | ||
const double | cellsize, | ||
const cbl::cosmology::Cosmology | cosm, | ||
const std::vector< double > | RA_range, | ||
const std::vector< double > | DEC_range, | ||
const int | n_rec = 1 , |
||
const double | step_size = 2.5/3. , |
||
const double | threshold = 0. |
||
) |
constructor that creates a void catalogue extracting cosmic voids from a catalogue of tracers for OBSERVED COORDINATES. This void finder is based on dynamical criteria: the density field is reconstructed from the displacement field generated by the back-in-time evolution of the tracers. Voids are therefore classified as regions of negative velocity divergence.
========================================================================================
algorithm | the type of algorithm on which the reconstruction of the density field is based (LaZeVo or Exact) |
tracer_catalogue | the input tracer catalogue |
random_catalogue | Random catalogue. Simply declears as void (={}) if the random catalogue is not available: a new random catalogue will be created with the same objects and geometry of the tracer catalogue |
dir_output | path of the output directory where to store the different reconstructions, the divergence field, the subvoid and void catalogues |
output | name of the output files |
cellsize | minimum radius used for the chain mesh |
cosm | cosmology |
RA_range | range of coordinate RA of the catalogue (from -pi/2 to pi/2) |
DEC_range | range of coordinate Dec of the catalogue (from 0 to 2pi). if the catalog is located across the zero meridian, the minimum must be negative (e.g. [1.5pi, 0.5pi] -> [-0.5pi, 0.5pi]). |
n_rec | number of reconstructions of the density field: number of random catalogue used or generated |
step_size | dimension of the grid cells used for the identification of subvoids, in units of the mean interparticle separation of the tracer catalogue. It is strongly recommended to keep this value greater than 0.75 (cell sizes too small compared to the resolution of the catalogue) |
threshold | number of minimum couplings between a certain halo and a certain random particle necessary to couple them in a definitive way |
Definition at line 561 of file VoidCatalogue.cpp.
cbl::catalogue::Catalogue::Catalogue | ( | const ObjectType | objectType, |
const std::string | file_cn = par::defaultString , |
||
const bool | snapformat = false , |
||
const bool | swap = false , |
||
const double | fact = 0.001 , |
||
const bool | read_catalogue = true , |
||
const double | nSub = 1.1 , |
||
const std::string | component_to_read = "ALL" , |
||
const std::vector< std::vector< double >> | edges = {{par::defaultDouble,par::defaultDouble},{par::defaultDouble,par::defaultDouble},{par::defaultDouble,par::defaultDouble}} |
||
) |
constructor that reads object of selected type from Gadget snapshots
objectType | the object type, specified in the cbl::catalogue::ObjectType enumeration |
file_cn | the the name common to all the files in which the gadget snapshot is divided (path/to/file/common_name) |
snapformat | false -> gadget snapformat 1; true -> gadget snapformat 2; else -> wrong |
swap | true = swap endianism, false = do not swap endianism |
fact | a factor used to multiply the coordinates, i.e. coordinate_i=coordinate_i*fact |
read_catalogue | true = the constructor actually reads the GADGET snapshot false = the constructor only reads the snapshot header and prints it on the screan |
nSub | the fraction of objects that will be randomly selected (nSub=1 ⇒ all objects are selected) |
component_to_read | which component to be read from the snapshot. "ALL" = read all the components positions, else select one of the following: "Gas", "Halo", "Disk", "Bulge", "Stars", "Boundary". |
edges | edges of the subcatalogue, format: [ [x_min, x_max], [y_min, y_max], [z_min, z_max] ] |
Definition at line 126 of file GadgetCatalogue.cpp.
cbl::catalogue::Catalogue::Catalogue | ( | const int | snap, |
const std::string | basedir, | ||
const bool | swap = false , |
||
const bool | long_ids = false , |
||
const double | scaleFact = 1.0 , |
||
const double | massFact = 1.0 , |
||
const EstimateCriterion | estimate_crit = EstimateCriterion::_m200_ , |
||
const bool | veldisp = false , |
||
const bool | masstab = false , |
||
const bool | add_satellites = false , |
||
const bool | verbose = false |
||
) |
constructor that reads objects of class HostHalo with satellite dependencies from group and subgroup files generated by the gadget implementation of the FoF and SUBFIND algorithms (respectively)
snap | the snapshot number |
basedir | the directory in which all the GADGET outputs are stored |
swap | true = swap endianism, false = do not swap endianism |
long_ids | true = IDs are stored in double precision, false = IDs are stored in single precision |
scaleFact | a factor used to multiply the coordinates, i.e. coordinate_i=coordinate_i*scaleFact |
massFact | a factor used to multiply the masses, i.e. mass_i=mass_i*scaleFact |
estimate_crit | the criterion used to estimate mass, radius and velocity dispersion of the group |
veldisp | whether the average velocity dispersion within the estimated radius has been computed or not in the GADGET run considered |
masstab | whether the mass table is present or not |
add_satellites | whether to add the satellites identified by the SUBFIND algorithm to the catalogue |
verbose | true = build the catalogue verbosely, false = keep it quiet.. |
Definition at line 274 of file GadgetCatalogue.cpp.
|
inline |
add one single object to the catalogue
object | pointer to an object of type Object |
Definition at line 2641 of file Catalogue.h.
|
inline |
add one single object to the catalogue
object | object of type T |
Definition at line 2648 of file Catalogue.h.
|
inline |
add some objects to the catalogue
sample | vector of pointers to objects of type Object |
Definition at line 2654 of file Catalogue.h.
|
inline |
add some objects to the catalogue
sample | vector of objects of type T |
Definition at line 2664 of file Catalogue.h.
double cbl::catalogue::Catalogue::angsep_xyz | ( | const int | i, |
std::shared_ptr< Object > | obj | ||
) | const |
get the angular distrance between the i-th object of the catalogue and another object
i | the object index |
obj | pointer to an object |
Definition at line 2114 of file Catalogue.cpp.
|
inline |
get the object vector
Definition at line 2249 of file Catalogue.h.
|
inline |
get the i-th object of the catalogue
i | the object index |
Definition at line 2236 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_centralDensity
i | the object index |
Definition at line 2079 of file Catalogue.h.
void cbl::catalogue::Catalogue::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. If all the steps are selected the final result is a catalogue of spherical, not-overlapped voids.
initial_radius | erase voids outside a given interval delta_r of initial radius; |
delta_r | the interval of accepted radii |
threshold | the density threshold |
rescale | true = for each void finds the larger radius enclosing density = threshold, false = skip the step |
tracers_catalogue | object of class Catalogue with the tracers defining the void distribution (necessary if rescale = true) |
ChM | object of ChainMesh3D class |
ratio | distance from the void centre at which the density contrast is evaluated in units of the void radius. Ex: ratio = 0.1 \(\rightarrow\) 10% of the void radius lenght |
checkoverlap | true \(\rightarrow\) erase all the voids wrt a given criterion, false \(\rightarrow\) skip the step |
ol_criterion | the criterion for the overlap step (valid criteria: Var::DensityContrast, Var::CentralDensity) |
Definition at line 1328 of file VoidCatalogue.cpp.
void cbl::catalogue::Catalogue::clean_void_catalogue | ( | const std::vector< double > | par_numdensity, |
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. If all the steps are selected the final result is a catalogue of spherical, not-overlapped voids.
par_numdensity | coefficients of the polynomial describing the variation of the number density as a function of the redshift, from the highest to the lowest order. Ex.: par_density = {-0.001, 0.005, -0.01} \(\rightarrow\) numdensity = \( -0.001 \cdot z^2 + 0.005 \cdot z -0.01 \) |
initial_radius | erase voids outside a given interval delta_r of initial radius; |
delta_r | the interval of accepted radii |
threshold | the density threshold |
rescale | true = for each void finds the larger radius enclosing density = threshold, false = skip the step |
tracers_catalogue | object of class Catalogue with the tracers defining the void distribution (necessary if rescale = true) |
ChM | object of ChainMesh3D class |
ratio | distance from the void centre at which the density contrast is evaluated in units of the void radius. Ex: ratio = 0.1 \(\rightarrow\) 10% of the void radius lenght |
checkoverlap | true \(\rightarrow\) erase all the voids wrt a given criterion, false \(\rightarrow\) skip the step |
ol_criterion | the criterion for the overlap step (valid criteria: Var::DensityContrast, Var::CentralDensity) |
Definition at line 1605 of file VoidCatalogue.cpp.
void cbl::catalogue::Catalogue::clean_void_catalogue | ( | const std::vector< std::vector< double >> | data_numdensity, |
const std::string | method_interpolation, | ||
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. If all the steps are selected the final result is a catalogue of spherical, not-overlapped voids.
data_numdensity | 2D matrix containing the sampled values of the mean number density as a function of redshift. These data will be interpolated to finf the value of the number desnity of the tracers at a specific redshift |
method_interpolation | the type of method used for the interpolation: "Linear" → linear interpolation; "Poly" → polynomial interpolation; "Spline" → cubic spline interpolation; "Rat" → diagonal rational function interpolation; "BaryRat" → barycentric rational interpolation |
initial_radius | erase voids outside a given interval delta_r of initial radius; |
delta_r | the interval of accepted radii |
threshold | the density threshold |
rescale | true = for each void finds the larger radius enclosing density = threshold, false = skip the step |
tracers_catalogue | object of class Catalogue with the tracers defining the void distribution (necessary if rescale = true) |
ChM | object of ChainMesh3D class |
ratio | distance from the void centre at which the density contrast is evaluated in units of the void radius. Ex: ratio = 0.1 \(\rightarrow\) 10% of the void radius lenght |
checkoverlap | true \(\rightarrow\) erase all the voids wrt a given criterion, false \(\rightarrow\) skip the step |
ol_criterion | the criterion for the overlap step (valid criteria: Var::DensityContrast, Var::CentralDensity) |
Definition at line 1878 of file VoidCatalogue.cpp.
std::vector< double > cbl::catalogue::Catalogue::compute_catalogueProperties_box | ( | const double | boxside | ) |
compute catalogue volume, number density and mean particle separation
boxside | side lenght of the cubic catalogue box |
Definition at line 2571 of file Catalogue.cpp.
std::vector< std::vector< double > > cbl::catalogue::Catalogue::compute_catalogueProperties_lightCone | ( | cbl::cosmology::Cosmology | cosmology, |
const std::vector< double > | RA_range, | ||
const std::vector< double > | DEC_range, | ||
const unsigned int | nbin | ||
) |
compute catalogue volume, number density and mean particle separation in light cones
cosmology | the cosmology used to compute the comoving distances |
RA_range | range of coordinate RA of the catalogue (from -pi/2 to pi/2) |
DEC_range | range of coordinate Dec of the catalogue (from 0 to 2pi). if the catalog is located across the zero meridian, the minimum must be negative (e.g. [1.5pi, 0.5pi] -> [-0.5pi, 0.5pi]). |
nbin | number of bin in redshift |
Definition at line 2595 of file Catalogue.cpp.
void cbl::catalogue::Catalogue::compute_centralDensity | ( | const std::shared_ptr< Catalogue > | tracers_catalogue, |
chainmesh::ChainMesh3D | ChM, | ||
const double | threshold | ||
) |
compute the central density of each object in a void catalogue. We define as central density the density contrast computed inside a spherical region grown around the void center, with a radius of \(2\) times the mean particle separation of the tracer catalogue
tracers_catalogue | the density field tracers catalogue |
ChM | a 3D chain mesh object, used to speed-up the search of close pairs |
threshold | the central density threshold |
Definition at line 2150 of file VoidCatalogue.cpp.
void cbl::catalogue::Catalogue::compute_centralDensity | ( | const std::shared_ptr< Catalogue > | tracers_catalogue, |
chainmesh::ChainMesh3D | ChM, | ||
const std::vector< double > | par_numdensity, | ||
const double | threshold | ||
) |
compute the central density of each object in a void catalogue. We define as central density the density contrast computed inside a spherical region grown around the void center, with a radius of \(2\) times the mean particle separation of the tracer catalogue
tracers_catalogue | the density field tracers catalogue |
ChM | a 3D chain mesh object, used to speed-up the search of close pairs |
par_numdensity | coefficients of the polynomial describing the variation of the number density as a function of the redshift, from the highest to the lowest order. Ex.: par_density = {-0.001, 0.005, -0.01} \(\rightarrow\) numdensity = \( -0.001 \cdot z^2 + 0.005 \cdot z -0.01 \) |
threshold | the central density threshold |
Definition at line 2176 of file VoidCatalogue.cpp.
void cbl::catalogue::Catalogue::compute_centralDensity | ( | const std::shared_ptr< Catalogue > | tracers_catalogue, |
chainmesh::ChainMesh3D | ChM, | ||
const std::vector< std::vector< double >> | data_numdensity, | ||
const std::string | method_interpolation, | ||
const double | threshold | ||
) |
compute the central density of each object in a void catalogue. We define as central density the density contrast computed inside a spherical region grown around the void center, with a radius of \(2\) times the mean particle separation of the tracer catalogue
tracers_catalogue | the density field tracers catalogue |
ChM | a 3D chain mesh object, used to speed-up the search of close pairs |
data_numdensity | 2D matrix containing the sampled values of the mean number density as a function of redshift. These data will be interpolated to finf the value of the number desnity of the tracers at a specific redshift |
method_interpolation | the type of method used for the interpolation: "Linear" → linear interpolation; "Poly" → polynomial interpolation; "Spline" → cubic spline interpolation; "Rat" → diagonal rational function interpolation; "BaryRat" → barycentric rational interpolation |
threshold | the central density threshold |
Definition at line 2204 of file VoidCatalogue.cpp.
void cbl::catalogue::Catalogue::compute_densityContrast | ( | const std::shared_ptr< Catalogue > | tracers_catalogue, |
chainmesh::ChainMesh3D | ChM, | ||
const double | ratio = 0.1 |
||
) |
compute density contrast of cosmic voids in catalogue as the ratio between an inner and an outer sphere grown around the void centre
tracers_catalogue | the density field tracers catalogue |
ChM | a 3D chain mesh object, used to speed-up the search of close pairs |
ratio | the ratio \(r\) used to compute the central density |
Definition at line 2233 of file VoidCatalogue.cpp.
void cbl::catalogue::Catalogue::computeComovingCoordinates | ( | const cosmology::Cosmology & | cosm, |
const CoordinateUnits | inputUnits = CoordinateUnits::_radians_ |
||
) |
compute the comoving coordinates (x, y, z) from the observed coordinates (R.A., Dec, redshift)
cosm | object of class Cosmology |
inputUnits | the units of the input coordinates |
Definition at line 1553 of file Catalogue.cpp.
void cbl::catalogue::Catalogue::computePolarCoordinates | ( | const CoordinateUnits | outputUnits = CoordinateUnits::_radians_ | ) |
compute the polar coordinates (R.A., Dec, dc) from the comoving coordinates (x, y, z)
outputUnits | the units of the output coordinates |
Definition at line 1587 of file Catalogue.cpp.
void cbl::catalogue::Catalogue::computePolarCoordinates | ( | const cosmology::Cosmology & | cosmology, |
const double | z1 = 0. , |
||
const double | z2 = 10. , |
||
const CoordinateUnits | outputUnits = CoordinateUnits::_radians_ |
||
) |
compute the polar coordinates (R.A., Dec, dc, redshift) from the comoving (x, y, z), and assuming a cosmological model
cosmology | object of class Cosmology |
z1 | the minimum redshift used in the computation |
z2 | the maximum redshift used in the computation |
outputUnits | the units of the output coordinates |
Definition at line 1638 of file Catalogue.cpp.
|
inline |
get the X, Y, Z coordinates of the i-th object of the catalogue
i | the object index |
Definition at line 2258 of file Catalogue.h.
data::ScalarField3D cbl::catalogue::Catalogue::counts_in_cell | ( | const double | cell_size, |
const int | interpolation_type = 0 , |
||
const bool | useMass = false , |
||
const double | minX = par::defaultDouble , |
||
const double | maxX = par::defaultDouble , |
||
const double | minY = par::defaultDouble , |
||
const double | maxY = par::defaultDouble , |
||
const double | minZ = par::defaultDouble , |
||
const double | maxZ = par::defaultDouble |
||
) | const |
return the density field from object positions
cell_size | the minimum size of the density field |
interpolation_type | the type of interpolation false → nearest-grid-point; true → cloud-in-cell |
useMass | generate the density field using the mass information |
minX | minimum value of the x coordinate |
maxX | maximum value of the x coordinate |
minY | minimum value of the y coordinate |
maxY | maximum value of the y coordinate |
minZ | minimum value of the z coordinate |
maxZ | maximum value of the z coordinate |
Definition at line 2266 of file Catalogue.cpp.
|
inline |
get the private member Catalogue::m_object[i]->m_dc
i | the object index |
Definition at line 1849 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_dec
i | the object index |
Definition at line 1863 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_dec_tile
i | the object index |
Definition at line 1877 of file Catalogue.h.
data::ScalarField3D cbl::catalogue::Catalogue::density_field | ( | const double | cell_size, |
const Catalogue | mask_catalogue, | ||
const int | interpolation_type = 0 , |
||
const double | kernel_radius = 0. , |
||
const bool | useMass = false |
||
) | const |
return the density field from object position
cell_size | the minimum size of the density field |
mask_catalogue | catalogue containing points sampling the selecion function of the catalogue |
interpolation_type | the type of interpolation false → nearest-grid-point; true → cloud-in-cell |
kernel_radius | size of the kernel for the gaussian smoothing |
useMass | generate the density field using the mass information |
Definition at line 2341 of file Catalogue.cpp.
|
inline |
get the private member Catalogue::m_object[i]->m_densityContrast
i | the object index |
Definition at line 2072 of file Catalogue.h.
Catalogue cbl::catalogue::Catalogue::diluted_catalogue | ( | const double | nSub, |
const int | seed = 3213 |
||
) | const |
create a diluted catalogue
nSub | the fracton of objects that will be randomly selected (nSub=1 \( \rightarrow \) all objects are selected) |
seed | the seed for random number generation |
Definition at line 2076 of file Catalogue.cpp.
double cbl::catalogue::Catalogue::distance | ( | const int | i, |
std::shared_ptr< Object > | obj | ||
) | const |
get the distrance between the i-th object of the catalogue and another object
i | the object index |
obj | pointer to an object |
Definition at line 2103 of file Catalogue.cpp.
void cbl::catalogue::Catalogue::equalize_random_box | ( | cbl::catalogue::Catalogue | tracer_catalogue, |
const int | seed | ||
) |
equalize the number of objects in two Box catalogues
tracer_catalogue | input catalogue |
seed | seed for generating random numbers |
Definition at line 694 of file RandomCatalogue.cpp.
void cbl::catalogue::Catalogue::equalize_random_lightCone | ( | cbl::catalogue::Catalogue | tracer_catalogue, |
cbl::cosmology::Cosmology | cosm, | ||
const std::vector< double > | RA_range, | ||
const std::vector< double > | DEC_range, | ||
const int | seed | ||
) |
equalize the number of objects in two Light Cones catalogues
tracer_catalogue | input catalogue |
cosm | the cosmology |
RA_range | range of coordinate RA of the catalogue (from -pi/2 to pi/2) |
DEC_range | range of coordinate Dec of the catalogue (from 0 to 2pi). |
seed | seed for generating random numbers |
Definition at line 650 of file RandomCatalogue.cpp.
std::vector< std::string > cbl::catalogue::Catalogue::field | ( | ) | const |
get the values of the object fields
Definition at line 436 of file Catalogue.cpp.
|
inline |
get the private member Catalogue::m_object[i]->m_field
i | the object index |
Definition at line 1961 of file Catalogue.h.
|
inline |
get the list of fields where the objects have been observed
Definition at line 2008 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_galaxyTag
i | the object index |
Definition at line 2116 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_generic
i | the object index |
Definition at line 2137 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_ID
i | the object index |
Definition at line 2086 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_IDHost
i | the object index |
Definition at line 2109 of file Catalogue.h.
bool cbl::catalogue::Catalogue::isSetVar | ( | const int | index, |
const Var | var_name | ||
) | const |
check if the given variable of the i-th object is set
index | the index of the object |
var_name | the variable name |
Definition at line 740 of file Catalogue.cpp.
bool cbl::catalogue::Catalogue::isSetVar | ( | const Var | var_name | ) | const |
check if the given object variables are set
var_name | the variable name |
Definition at line 918 of file Catalogue.cpp.
|
inline |
get the private member Catalogue::m_object[i]->m_lensingCalib
i | the object index |
Definition at line 1940 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_lensingWeight
i | the object index |
Definition at line 1933 of file Catalogue.h.
|
private |
Input function to check consistency in reading block-headers in binary GADGET snapshots.
finr | a pointer to an input stream class object |
swap | true \(\rightarrow\) swap endianism, false \(\rightarrow\) do not swap endianism |
Definition at line 110 of file GadgetCatalogue.cpp.
|
private |
Ouput function to check consistency in reading block-headers in binary GADGET snapshots.
finr | a pointer to an input stream class object |
swap | true \(\rightarrow\) swap endianism, false \(\rightarrow\) do not swap endianism |
Definition at line 116 of file GadgetCatalogue.cpp.
|
private |
read the GADGET subfind table header
finh | an object of class std::ifstream |
swap | whether to swap or not the header |
Definition at line 40 of file GadgetCatalogue.cpp.
|
private |
swap endianism of the GADGET snapshot header
header | the un-swapped header |
Definition at line 67 of file GadgetCatalogue.cpp.
|
private |
swap endianism of the GADGET subfind table header
header | the un-swapped header |
Definition at line 94 of file GadgetCatalogue.cpp.
|
inline |
get the private member Catalogue::m_object[i]->m_magnitude
i | the object index |
Definition at line 2030 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_magnitudeG
i | the object index |
Definition at line 2044 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_magnitudeI
i | the object index |
Definition at line 2058 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_magnitudeR
i | the object index |
Definition at line 2051 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_magnitudeU
i | the object index |
Definition at line 2037 of file Catalogue.h.
Catalogue cbl::catalogue::Catalogue::mangle_cut | ( | const std::string | mangle_mask, |
const bool | excl = false |
||
) | const |
create a sub-catalogue
mangle_mask | name of the mangle polygon file |
excl | false → create a subcatalogue with objects inside the mask; true → create a subcatalogue outside the mask |
Definition at line 2027 of file Catalogue.cpp.
|
inline |
get the private member Catalogue::m_object[i]->m_mass
i | the object index |
Definition at line 2023 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_mass_proxy
i | the object index |
Definition at line 2094 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_mass_proxy_error
i | the object index |
Definition at line 2102 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_minfall
i | the object index |
Definition at line 2130 of file Catalogue.h.
|
inline |
get the maximum value of a variable of the catalogue objects
var_name | the variable name |
Definition at line 2295 of file Catalogue.h.
|
inline |
get the minimum value of a variable of the catalogue objects
var_name | the variable name |
Definition at line 2287 of file Catalogue.h.
|
inline |
compute the catalogue's mean particle separation
boxside | length of the side of the box |
Definition at line 2392 of file Catalogue.h.
|
inline |
compute the catalogue's mean particle separation error
boxside | length of the side of the box |
Definition at line 2402 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_mstar
i | the object index |
Definition at line 2123 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[index]->m_nearCells of ChainMeshCell
index | the object index |
Definition at line 2177 of file Catalogue.h.
|
inline |
get the total number of fields where the objects have been observed
Definition at line 2016 of file Catalogue.h.
|
inline |
get the number of objects of the catalogue
Definition at line 2264 of file Catalogue.h.
int cbl::catalogue::Catalogue::nObjects_condition | ( | const Var | var_name, |
const double | down, | ||
const double | up, | ||
const bool | excl = false |
||
) |
return the number of objectes following a condition on the variable VAR
var_name | the variable name |
down | minimum variable used to cut the catalogue |
up | maximum variable used to cut the catalogue |
excl | false → count objects inside down-up; true → count objects outside down-up; |
Definition at line 2229 of file Catalogue.cpp.
|
inline |
get the number of objects of the catalogue for Light Cones
nbin | bins in redshift (number of centres: so, if 100 bins are requested, insert 100) |
Definition at line 2271 of file Catalogue.h.
void cbl::catalogue::Catalogue::normalizeComovingCoordinates | ( | ) |
normalize comoving coordinates
function to normalize comoving coordinates, that is it transforms (x, y, z) into (x/dc, y/dc, z/dc))
Definition at line 1684 of file Catalogue.cpp.
size_t cbl::catalogue::Catalogue::nRegions | ( | ) |
get the private member m_nRegions
Definition at line 396 of file Catalogue.cpp.
|
inline |
compute the catalogue's number density
boxside | length of the side of the box |
Definition at line 2372 of file Catalogue.h.
|
inline |
compute the catalogue's number density error
boxside | length of the side of the box |
Definition at line 2382 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_odds
i | the object index |
Definition at line 1926 of file Catalogue.h.
overloading of the += operator, to sum two catalogues
cc | object of class Catalogue |
Definition at line 2864 of file Catalogue.h.
overloading of the += operator, to sum two catalogues
cc | object of class Catalogue |
Definition at line 2852 of file Catalogue.h.
move assignment for the Catalogue class
obj | catalogue to be moved |
Definition at line 805 of file Catalogue.h.
copy assignment for the Catalogue class
obj | catalogue to be copied |
Definition at line 786 of file Catalogue.h.
|
inline |
access the i-th Catalogue object
i | object index |
Definition at line 2243 of file Catalogue.h.
void cbl::catalogue::Catalogue::Order | ( | const std::vector< int > | vv | ) |
order the catalogue according to the input vector
vv | vector used to order the catalogue |
Definition at line 1710 of file Catalogue.cpp.
|
inline |
get the private member Catalogue::m_object[index]->m_part of ChainMeshCell
index | the object index |
Definition at line 2170 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_ra
i | the object index |
Definition at line 1856 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_ra_tile
i | the object index |
Definition at line 1870 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_radius
i | the object index |
Definition at line 2065 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_redshift
i | the object index |
Definition at line 1891 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_redshiftMax
i | the object index |
Definition at line 1905 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_redshiftMin
i | the object index |
Definition at line 1898 of file Catalogue.h.
std::vector< long > cbl::catalogue::Catalogue::region | ( | ) | const |
get the values of the object regions
Definition at line 423 of file Catalogue.cpp.
|
inline |
get the private member Catalogue::m_object[i]->m_region
i | the object index |
Definition at line 1954 of file Catalogue.h.
std::vector< long > cbl::catalogue::Catalogue::region_list | ( | ) | const |
get the list of regions in which the catalogue is divided
Definition at line 411 of file Catalogue.cpp.
|
inline |
remove an existing object
index | the index of the object to be removed |
Definition at line 2699 of file Catalogue.h.
void cbl::catalogue::Catalogue::remove_objects | ( | const std::vector< bool > | index | ) |
remove a set of existing objects
index | vector of boolean variables |
Definition at line 2494 of file Catalogue.cpp.
|
inline |
replace existing objects with new ones
sample | vector of pointers to objects of type Object |
Definition at line 2683 of file Catalogue.h.
|
inline |
replace existing objects with new ones
sample | vector of objects of type T |
Definition at line 2674 of file Catalogue.h.
void cbl::catalogue::Catalogue::restoreComovingCoordinates | ( | ) |
restore comoving coordinates
function to normalize comoving coordinates, that is it transforms (x/dc, y/dc, z/dc)) into (x, y, z)
Definition at line 1697 of file Catalogue.cpp.
|
inline |
get the private member Catalogue::m_object
Definition at line 1800 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[ii]->m_satellites
index | the object index |
Definition at line 2163 of file Catalogue.h.
void cbl::catalogue::Catalogue::set_field | ( | const std::vector< std::string > | field | ) |
set a private variable
field | vector containing the object fields |
Definition at line 969 of file Catalogue.cpp.
|
inline |
set the private member ChainMeshCell::m_nearCells
index | index of the variable to set |
nearCells | the matrix of the cells near the i-th object |
Definition at line 2537 of file Catalogue.h.
|
inline |
set the private member ChainMeshCell::m_part
index | index of the variable to set |
part | the vector of particles of the i-th object |
Definition at line 2529 of file Catalogue.h.
void cbl::catalogue::Catalogue::set_ra_dec_tile | ( | const std::vector< double > | RA_tile, |
const std::vector< double > | Dec_tile, | ||
const CoordinateUnits | inputUnits = CoordinateUnits::_degrees_ |
||
) |
set the central R.A. and Dec of the tiles
RA_tile | tile central R.A. |
Dec_tile | tile central Dec |
inputUnits | input units of R.A. and Dec |
Definition at line 957 of file Catalogue.cpp.
void cbl::catalogue::Catalogue::set_region | ( | const std::vector< long > | region, |
const int | nRegions = -1 |
||
) |
set a private variable
region | vector containing the object regions |
nRegions | the total number of regions; if this parameter is \(<0\), its value will be set to the size of the region vector |
Definition at line 933 of file Catalogue.cpp.
void cbl::catalogue::Catalogue::set_region_number | ( | const size_t | nRegions | ) |
set the private variable m_nRegion
nRegions | the total number of regions |
Definition at line 944 of file Catalogue.cpp.
|
inline |
set the private member HostHalo::m_satellites
index | index of the variable to set |
satellite | the vector of shared pointers to satellite objects |
Definition at line 2509 of file Catalogue.h.
|
inline |
set the private member HostHalo::m_satellites
index | index of the variable to set |
satellites | the vector of shared pointers to satellite objects |
Definition at line 2519 of file Catalogue.h.
void cbl::catalogue::Catalogue::set_var | ( | const int | index, |
const Var | var_name, | ||
const double | value, | ||
const cosmology::Cosmology | cosmology = {} , |
||
const bool | update_coordinates = true |
||
) |
set a private variable
index | index of the variable to set |
var_name | name of the variable |
value | variable value |
cosmology | object of class Cosmology, used to estimate the comoving distance from the given redshift |
update_coordinates | if true the function cbl::catalogue::Object::set_redshift update the coordinates according to the redshift value |
Definition at line 978 of file Catalogue.cpp.
void cbl::catalogue::Catalogue::set_var | ( | const int | index, |
const Var | var_name, | ||
const int | value, | ||
const cosmology::Cosmology | cosmology = {} |
||
) |
set a private variable
index | index of the variable to set |
var_name | name of the variable |
value | variable value |
cosmology | object of class Cosmology |
Definition at line 1204 of file Catalogue.cpp.
void cbl::catalogue::Catalogue::set_var | ( | const Var | var_name, |
const std::vector< double > | var, | ||
const cosmology::Cosmology | cosmology = {} , |
||
const bool | update_coordinates = true |
||
) |
set a private variable
var_name | name of the variable |
var | vector of variables |
cosmology | object of class Cosmology, used to estimate the comoving distance from the given redshift |
update_coordinates | if true the function cbl::catalogue::Object::set_redshift update the coordinates according to the redshift value |
Definition at line 1246 of file Catalogue.cpp.
void cbl::catalogue::Catalogue::set_var | ( | const Var | var_name, |
const std::vector< int > | var, | ||
const cosmology::Cosmology | cosmology = {} |
||
) |
set a private variable
var_name | name of the variable |
var | vector of variables |
cosmology | object of class Cosmology |
Definition at line 1477 of file Catalogue.cpp.
|
inline |
get the private member Catalogue::m_object[i]->m_shear1
i | the object index |
Definition at line 1912 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_shear2
i | the object index |
Definition at line 1919 of file Catalogue.h.
void cbl::catalogue::Catalogue::shuffle | ( | const int | seed | ) |
shuffle objects in the catalogue
seed | the seed for random number generation |
pseudo-random numbers generator
Definition at line 2556 of file Catalogue.cpp.
shared_ptr< Catalogue > cbl::catalogue::Catalogue::smooth | ( | const double | gridsize, |
const cosmology::Cosmology | cosmology, | ||
const std::vector< Var > | vars = {} , |
||
const int | SUB = 1 |
||
) |
create a smoothed version of the catalogue averaging quantities on a X, Y, Z grid
defalut averaged quantities are X, Y, Z, RA, DEC, REDSHIFT, WEIGHT; others quantities must be passed trough a vector
gridsize | the cell size |
cosmology | object of class Cosmology, used to estimate the comoving distance from the given redshift |
vars | the vector of variable to average on |
SUB | the number of sub-catalogue used to create the chain-mesh (use SUB>1 when there could be memory problems) |
Definition at line 2125 of file Catalogue.cpp.
|
inline |
get the private member Catalogue::m_object[i]->m_sn
i | the object index |
Definition at line 1884 of file Catalogue.h.
void cbl::catalogue::Catalogue::sort | ( | const Var | var_name, |
const bool | increasing = false |
||
) |
bubble sort of a catalogue wrt a variable
var_name | the name of the variable to use in order to sort the catalogue |
increasing | if true order from lower to higher, if false from higher to lower |
Definition at line 2521 of file Catalogue.cpp.
std::vector< std::vector< double > > cbl::catalogue::Catalogue::stats_var | ( | const std::vector< Var > | var_name | ) | const |
get the mean, the median, the standard deviation, and the difference between the third and first quartiles of a vector of variables
var_name | the variable name |
Definition at line 1530 of file Catalogue.cpp.
std::vector< double > cbl::catalogue::Catalogue::stats_var | ( | const Var | var_name | ) | const |
get the mean, the median, the standard deviation, and the difference between the third and first quartiles of a variable
var_name | the variable name |
Definition at line 1521 of file Catalogue.cpp.
Catalogue cbl::catalogue::Catalogue::sub_catalogue | ( | catalogue::Catalogue & | data, |
const double | tile_width_RA, | ||
const double | tile_width_Dec, | ||
const bool | write_tiles = false , |
||
const std::string | dir_tiles = "./" , |
||
const std::string | file_tiles = "tiles_coordinates.txt" |
||
) |
find the Catalogue objects falling in the tiles of an input data catalogue, given the R.A.-Dec centres of the tiles.
The user must set in the input data catalogue the identification number of the tiles (cbl::catalogue::Var::_Region_) with cbl::catalogue::Catalogue::set_region() and the central R.A. and Dec (cbl::catalogue::Var::_TileRA_ / _TileDec_) of the tiles with cbl::catalogue::Catalogue::set_ra_dec_tile().
If requested, this function writes on file the coordinates of the edges of the tiles (in degrees). The tiles can be easily plotted with the plot function of matplotlib, e.g.:
data | input catalogue |
tile_width_RA | the width of each tile, in degrees (from side to side), along R.A. direction |
tile_width_Dec | the width of each tile, in degrees (from side to side), along Dec direction |
write_tiles | if true, write RA and Dec edges of the tiles on file (in degrees) |
dir_tiles | directory of the tile edges file |
file_tiles | tile edges file |
Definition at line 1913 of file Catalogue.cpp.
Catalogue cbl::catalogue::Catalogue::sub_catalogue | ( | const mask_function | mask, |
const bool | excl = false |
||
) | const |
create a sub-catalogue
mask | function of type std::function<bool(shared_ptr<Object>)> to flag objects |
excl | false → create a subcatalogue inside down-up; true → create a subcatalogue outside down-up |
Definition at line 1848 of file Catalogue.cpp.
Catalogue cbl::catalogue::Catalogue::sub_catalogue | ( | const MaskObject & | mask, |
const bool | excl = false |
||
) | const |
create a sub-catalogue
mask | object of type cbl::catalogue::MaskObject |
excl | false → create a subcatalogue inside down-up; true → create a subcatalogue outside down-up |
Definition at line 1869 of file Catalogue.cpp.
Catalogue cbl::catalogue::Catalogue::sub_catalogue | ( | const Var | var_name, |
const double | down, | ||
const double | up, | ||
const bool | excl = false |
||
) | const |
create a sub-catalogue
var_name | the variable name |
down | minimum variable used to cut the catalogue |
up | maximum variable used to cut the catalogue |
excl | false → create a subcatalogue inside down-up; true → create a subcatalogue outside down-up |
Definition at line 1890 of file Catalogue.cpp.
void cbl::catalogue::Catalogue::swap_objects | ( | const int | ind1, |
const int | ind2 | ||
) |
swap two existing objects
ind1 | the index of the first object to swap |
ind2 | the index of the second object to swap |
Definition at line 2510 of file Catalogue.cpp.
|
inline |
get the private member Catalogue::m_object[ii]->m_tot_mass
i | the object index |
Definition at line 2144 of file Catalogue.h.
double cbl::catalogue::Catalogue::var | ( | const int | index, |
const Var | var_name | ||
) | const |
get the value of the i-th object variable
index | the index of the object |
var_name | the variable name |
Definition at line 449 of file Catalogue.cpp.
std::vector< double > cbl::catalogue::Catalogue::var | ( | const Var | var_name | ) | const |
get the values of the object variables
var_name | the variable name |
Definition at line 727 of file Catalogue.cpp.
void cbl::catalogue::Catalogue::var_distr | ( | const Var | var_name, |
std::vector< double > & | _var, | ||
std::vector< double > & | dist, | ||
std::vector< double > & | err, | ||
const int | nbin, | ||
const bool | linear = true , |
||
const std::string | file_out = par::defaultString , |
||
const double | Volume = 1. , |
||
const bool | norm = false , |
||
const double | V1 = par::defaultDouble , |
||
const double | V2 = par::defaultDouble , |
||
const std::string | bin_type = "Linear" , |
||
const bool | convolution = false , |
||
const double | sigma = 0. |
||
) | const |
get the distribution of a variable
[in] | var_name | the variable name |
[out] | _var | vector of variables |
[out] | dist | vector of values of f(varibles) |
[out] | err | vector of Poissonian errors of f(varibles) |
[in] | nbin | number of bins |
[in] | linear | true → linear binning; false → logarithmic binning |
[in] | file_out | the output file where the distribution is stored |
[in] | Volume | the volume of the catalogue |
[in] | norm | true → normalize to the number of objects; false → do not normalize |
[in] | V1 | the minimum limit of the distribution |
[in] | V2 | the maximum limit of the distribution |
[in] | bin_type | "Linear" → dn/dvar; "Log10" → dn/dlog(var); "Log" → dn/dln(var) |
[in] | convolution | false → don't convolve the distribution; true → convolve the distribution with a gaussian function |
[in] | sigma | σ: the standard deviation of the gaussian function used to convolve the distribution |
Definition at line 1544 of file Catalogue.cpp.
int cbl::catalogue::Catalogue::var_int | ( | const int | index, |
const Var | var_name | ||
) | const |
get the value of the i-th object integer variable
index | the index of the object |
var_name | the variable name |
Definition at line 697 of file Catalogue.cpp.
std::vector< int > cbl::catalogue::Catalogue::var_int | ( | const Var | var_name | ) | const |
get the values of the object integer variables
var_name | the variable name |
Definition at line 716 of file Catalogue.cpp.
|
inline |
compute the catalogue's comoving volume
boxside | length of the side of the box |
Definition at line 2359 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_vx
i | the object index |
Definition at line 1828 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_vy
i | the object index |
Definition at line 1835 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_vz
i | the object index |
Definition at line 1842 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_weight
i | the object index |
Definition at line 1947 of file Catalogue.h.
double cbl::catalogue::Catalogue::weightedN | ( | ) | const |
get the total weight of the objects of the catalogue
Definition at line 1753 of file Catalogue.cpp.
double cbl::catalogue::Catalogue::weightedN_condition | ( | const Var | var_name, |
const double | down, | ||
const double | up, | ||
const bool | excl = false |
||
) |
return the weighted number of objectes following a condition on the variable VAR
var_name | the variable name |
down | minimum variable used to cut the catalogue |
up | maximum variable used to cut the catalogue |
excl | false → count objects inside down-up; true → count objects outside down-up; |
Definition at line 2248 of file Catalogue.cpp.
void cbl::catalogue::Catalogue::write_comoving_coordinates | ( | const std::string | outputFile | ) | const |
write the comoving coordinates of the catalogue to an output file
outputFile | the name of the output file |
Definition at line 1765 of file Catalogue.cpp.
void cbl::catalogue::Catalogue::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 output file
outputFile | the name of the output file |
var_name | vector containing the variable names to be written |
sep | [optional parameter] specifies the file separator, default is " " for retrocompatibility. Is strongly raccomanded to use standard values like: "\t" or ",". |
header | [optional parameter] string with the header of the file. Default is "". |
Definition at line 1804 of file Catalogue.cpp.
void cbl::catalogue::Catalogue::write_obs_coordinates | ( | const std::string | outputFile | ) | const |
write the polar coordinates of the catalogue to an output file
outputFile | the name of the output file |
Definition at line 1783 of file Catalogue.cpp.
|
inline |
get the private member Catalogue::m_object[i]->m_x_displacement
i | the object index |
Definition at line 1969 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_xx
i | the object index |
Definition at line 1807 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_y_displacement
i | the object index |
Definition at line 1977 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_yy
i | the object index |
Definition at line 1814 of file Catalogue.h.
|
inline |
get the catalogue's redshift bins
nbin | number of bins on which to fit the redshift |
Definition at line 2412 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_z_displacement
i | the object index |
Definition at line 1985 of file Catalogue.h.
|
inline |
get the private member Catalogue::m_object[i]->m_zz
i | the object index |
Definition at line 1821 of file Catalogue.h.