44 using namespace modelling::numbercounts;
52 m_data_model.Cpar = cosmo_param;
54 const size_t nParams = cosmo_param.size();
55 checkDim(cosmo_param, nParams,
"cosmoPar_prior");
57 vector<statistics::ParameterType> cosmoPar_type(nParams, statistics::ParameterType::_Base_);
58 vector<string> cosmoPar_string(nParams);
60 for (
size_t i=0; i<nParams; i++)
64 auto inputs = make_shared<STR_NC_data_model>(m_data_model);
67 m_set_prior(cosmo_param_prior);
70 switch (m_HistogramType) {
71 case (glob::HistogramType::_N_V_):
74 case (glob::HistogramType::_n_V_):
78 ErrorCBL(
"no such a variable in the list!",
"set_model_NumberCounts_cosmology",
"Modelling_NumberCounts1D_Redshift.cpp");
Global functions to model number counts.
The class Modelling_NumberCounts1D_Redshift.
void set_model_NumberCounts_cosmology(const std::vector< cbl::cosmology::CosmologicalParameter > cosmo_param={}, const std::vector< statistics::PriorDistribution > cosmo_param_prior={})
set the cosmological parameters used to model the mass function
std::string CosmologicalParameter_name(const CosmologicalParameter parameter)
name of the cosmological parameter
std::vector< double > number_counts_redshift(const std::vector< double > redshift, const std::shared_ptr< void > inputs, std::vector< double > ¶meter)
compute the number counts as a function of redshift
std::vector< double > number_density_redshift(const std::vector< double > redshift, const std::shared_ptr< void > inputs, std::vector< double > ¶meter)
compute the number density as a function of the redshift
The global namespace of the CosmoBolognaLib
void checkDim(const std::vector< T > vect, const int val, const std::string vector, bool equal=true)
check if the dimension of a std::vector is equal/lower than an input value
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