using namespace std;
try {
cosmology.set_sigma8(0.83);
std::string file_catalogue = "../input/catalogue.csv";
std::vector<int> column = {1,2,3};
const double mean_boffset = 208.84611;
const double mean_bslope = -175.71603;
const std::string file_measure = "../input/Cl_spherical_harmonic.dat";
const int skipped_lines = 1;
const auto pow_dataset = std::make_shared<cbl::data::Data1D>(
cbl::data::Data1D(file_measure, skipped_lines));
std::vector<cbl::statistics::PriorDistribution> CosmoPriors = {Omega_matter_LCDM_prior, sigma8_prior};
const double xmin = 10., xmax = 30.;
std::vector<double> start= {1.};
const string file_output = "model_bestfit.dat";
}
return 0;
}
int main()
main function to create the logo of the CosmoBolognaLib
Global functions to model the angular power spectrum.
The class Modelling_PowerSpectrum_angular.
const char * what() const noexcept override
the error description
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 set_fit_range(const double xmin, const double xmax)
set the fit range
virtual void write_model_at_bestfit(const std::string output_dir, const std::string output_file, const std::vector< double > xx)
write the model at xx with best-fit parameters obtained from posterior maximization
void maximize_posterior(const std::vector< double > start, const unsigned int max_iter=10000, const double tol=1.e-6, const double epsilon=1.e-3, const int seed=666)
function that maximizes the posterior, finds the best-fit parameters and stores them in the model
The class Modelling_PowerSpectrum_angular.
void set_data_model(const cbl::cosmology::Cosmology cosmology, const double z_min=0., const double z_max=10., const std::string method_Pk="CAMB", const bool NL=false, const int norm=-1, const double k_min=0.001, const double k_max=5., const std::vector< double > dN_par={}, const double fsky=1., std::vector< double > ll={}, std::vector< std::vector< double >> mixing_matrix={}, const bool interpolate_power_spectrum=false)
Set the data used to construct models of the angular power spectrum.
void set_model_limber(const std::vector< cbl::cosmology::CosmologicalParameter > cosmo_param, const std::vector< statistics::PriorDistribution > cosmo_prior, const statistics::PriorDistribution bias_prior)
set the model to fit the angular power spectrum
The class PriorDistribution.
@ _sigma8_
: the power spectrum normalisation
@ _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.
@ _Constant_
Constant function.
@ _Uniform_
Identity function.
@ _Gaussian_Covariance_
Gaussian likelihood covariance.
The global namespace of the CosmoBolognaLib
@ _observed_
observed coordinates (R.A., Dec, redshift)
std::vector< T > linear_bin_vector(const size_t nn, const T min, const T max)
fill a std::vector with linearly spaced values
CoordinateUnits
the coordinate units
@ _radians_
angle in radians