try {
const std::string data_file = path.
DirCosmo()+
"/External/Data/BAO/BAO_Addison2013.dat";
const std::string covariance_file = path.
DirCosmo()+
"/External/Data/BAO/BAO_Addison2013_covariance.dat";
data->set_covariance(covariance_file, 2, 1);
std::vector<std::string> data_type;
std::ifstream fin(data_file.c_str());
std::string line;
getline(fin,line);
while(getline(fin, line)) {
double A;
std::string dt;
std::stringstream ss(line);
ss >> A >> A >> A >> dt;
data_type.push_back(dt);
}
fin.clear(); fin.close();
const int chain_size = 100;
const int nwalkers = 10;
const int seed = 4232;
std::vector<double> starting_parameters = {cosmology.Omega_matter(), cosmology.H0(), 150.};
}
return 0;
}
int main()
main function to create the logo of the CosmoBolognaLib
The class Modelling_Cosmology.
std::string DirCosmo()
get the directory where the CosmoBolognaLbi are stored
const char * what() const noexcept override
the error description
void show_results(const int start=0, const int thin=1, const int nbins=50, const bool show_mode=false, const int ns=-1)
show the results of the MCMC sampling on screen
void set_likelihood(const statistics::LikelihoodType likelihood_type, const std::vector< size_t > x_index={0, 2}, const int w_index=-1, const double prec=1.e-10, const int Nres=-1)
set the likelihood function
void sample_posterior(const int chain_size, const int nwalkers, const int seed=666, const double aa=2, const bool parallel=true)
sample the posterior, initializing the chains by drawing from the prior distributions
void set_fit_range(const double xmin, const double xmax)
set the fit range
The class Modelling_Cosmology.
void set_fiducial_cosmology(const cbl::cosmology::Cosmology cosmology)
set the fiducial cosmology
void set_cosmological_parameters(const std::vector< cbl::cosmology::CosmologicalParameter > cosmoPar_name, const std::vector< cbl::statistics::PriorDistribution > cosmoPar_prior, const std::string distance_prior=par::defaultString, const std::vector< std::string > external_dataset={})
set the cosmological parameters
The class PriorDistribution.
@ _H0_
: the Hubble constant at z=0 [km/sec/Mpc]
@ _Omega_matter_LCDM_
: the density of baryons, cold dark matter and massive neutrinos (in units of the critical density) a...
@ _Planck15_
Planck collaboration 2015, paper XIII: Table 4, TT,TE,EE+lowP+lensing.
@ _Uniform_
Identity function.
@ _Gaussian_
Gaussian function.
@ _Gaussian_Covariance_
Gaussian likelihood covariance.
T Min(const std::vector< T > vect)
minimum element of a std::vector
T Max(const std::vector< T > vect)
maximum element of a std::vector