This example shows how to compute the matter power spectrum with CAMB and CLASS at different redshifts
using namespace std;
try {
const vector<double> redshifts = {0., 0.5, 1., 1.5};
const bool do_NL = false;
vector<vector<double>>
Pk_CAMB = cosm.Pk_matter(kk,
"CAMB", do_NL, redshifts);
vector<vector<double>> Pk_CLASS = cosm.Pk_matter(kk, "CLASS", do_NL, redshifts);
for (size_t ii=0; ii<redshifts.size(); ii++)
}
return 0;
}
int main()
main function to create the logo of the CosmoBolognaLib
const char * what() const noexcept override
the error description
static const char fDP2[]
conversion symbol for: double -> std::string
@ _Planck18_
Planck collaboration 2018, Paper VI: Table 2, TT,TE,EE+lowE+lensing.
std::vector< double > Pk_CAMB(const bool nonlinear, const double redshift, const double kmin, const double kmax, const int npoints, const double ombh2, const double omch2, const double omnuh2, const double massless_nu, const int massive_nu, const double omk, const double H0, const double ns, const double As, const double pivot_scalar=0.05, const double w=-1., const double wa=0., const double tau=2.1e-9, const bool accurate_massive_nu=false, const int neutrino_hierarchy=3, const int dark_energy_model=1, const double cs2_lam=1., const double T_cmb=2.7255, const double helium_fraction=0.24)
Get the matter power spectrum from CAMB.
std::string conv(const T val, const char *fact)
convert a number to a std::string
std::vector< T > logarithmic_bin_vector(const size_t nn, const T min, const T max)
fill a std::vector with logarithmically spaced values