48 return cosmology.
D_V(redshift);
50 else if (data_type==
"DV/rs")
51 return cosmology.
D_V(redshift)/cosmology.
rs();
53 else if (data_type==
"rs/DV")
54 return cosmology.
rs()/cosmology.
D_V(redshift);
56 else if(data_type==
"DA")
57 return cosmology.
D_A(redshift);
59 else if (data_type==
"DA/rs")
60 return cosmology.
D_A(redshift)/cosmology.
rs();
62 else if (data_type==
"rs/DA")
63 return cosmology.
rs()/cosmology.
D_A(redshift);
65 else if(data_type==
"DM")
66 return cosmology.
D_M(redshift);
68 else if (data_type==
"DM/rs")
69 return cosmology.
D_M(redshift)/cosmology.
rs();
71 else if (data_type==
"rs/DM")
72 return cosmology.
rs()/cosmology.
D_M(redshift);
74 else if(data_type==
"HH")
75 return cosmology.
HH(redshift);
77 else if (data_type==
"HH*rs")
78 return cosmology.
HH(redshift)*cosmology.
rs();
80 else if(data_type==
"DH")
83 else if (data_type==
"DH/rs")
86 else if (data_type==
"rs/DH")
89 else if (data_type==
"DL")
90 return cosmology.
D_L(redshift);
93 ErrorCBL(
"the input data_type is not allowed!",
"cosmological_measurements",
"ModelFunction_Cosmology.cpp");
105 shared_ptr<STR_data_model_cosmology> pp = static_pointer_cast<STR_data_model_cosmology>(inputs);
114 for (
size_t i=0; i<pp->Cpar.size(); ++i)
117 vector<double> output;
119 for(
size_t i=0; i<redshift.size(); i++)
132 shared_ptr<STR_data_model_cosmology> pp = static_pointer_cast<STR_data_model_cosmology>(inputs);
141 for (
size_t i=0; i<pp->Cpar.size(); ++i)
144 vector<double> output;
146 for(
size_t i=0; i<redshift.size()-pp->distance_prior->dataset()->ndata(); i++)
149 vector<double> mm = pp->distance_prior->model(cosmo);
150 for(
size_t i=0; i<mm.size(); i++)
151 output.push_back(mm[i]);
Global functions to model two-point correlation functions of any type.
void set_parameter(const CosmologicalParameter parameter, const double value)
set the value of one cosmological paramter
double D_V(const double redshift) const
the average distance at a given redshift, used to rescale the correlation function
double HH(const double redshift=0.) const
the Hubble function
double rs() const
get the sound horizon at recombination
double D_A(const double redshift) const
the angular diameter distance at a given redshift
double D_L(const double redshift) const
the luminosity distance at a given redshift
double D_M(const double redshift) const
the comoving transverse distance at a given redshift
static const double cc
: the speed of light in vacuum (the value is exact) [km/sec]
std::vector< double > cosmological_measurements_model(const std::vector< double > redshift, const std::shared_ptr< void > inputs, std::vector< double > ¶meter)
model for the generic cosmological measurements
std::vector< double > cosmological_measurements_model_CMB_DistancePrior(const std::vector< double > redshift, const std::shared_ptr< void > inputs, std::vector< double > ¶meter)
model for the generic cosmological measurements plus distance prior from CMB experiments
double cosmological_measurements(const double redshift, const std::string data_type, const cbl::cosmology::Cosmology cosmology)
generic cosmological measurements
The global namespace of the CosmoBolognaLib
int ErrorCBL(const std::string msg, const std::string functionCBL, const std::string fileCBL, const cbl::glob::ExitCode exitCode=cbl::glob::ExitCode::_error_)
throw an exception: it is used for handling exceptions inside the CosmoBolognaLib