41 using namespace cosmology;
47 double cbl::cosmology::Cosmology::Am (
const string method_Pk,
const bool store_output,
const string output_root,
const int norm,
const double k_min,
const double k_max,
const double prec,
const string file_par)
52 return Pk_matter({kk}, method_Pk, NL, redshift, store_output, output_root, norm, k_min, k_max, prec, file_par)[0] / pow(kk, m_n_spec);
61 return 2.78548e-14 * gsl_pow_2(m_Omega_matter) * Am(method_Pk, store_output, output_root, norm, k_min, k_max, prec, file_par);
68 double cbl::cosmology::Cosmology::bispectrum (
const vector<double> kk,
const string method_Pk,
const bool store_output,
const string output_root,
const int norm,
const double k_min,
const double k_max,
const double prec,
const string file_par)
72 double bm = potential_spectral_amplitude(method_Pk, store_output, output_root, norm, k_min, k_max, prec, file_par);
77 bs = (pow(kk[0]*kk[1],m_n_spec-4.0)+pow(kk[0]*kk[2],m_n_spec-4.0)+pow(kk[1]*kk[2],m_n_spec-4.0));
78 bs *= 2.0*gsl_pow_2(bm);
82 bs = pow(kk[0],(m_n_spec-4.0)/3.0)*pow(kk[1],2.0*(m_n_spec-4.0)/3.0)*pow(kk[2],m_n_spec-4.0)+pow(kk[2],(m_n_spec-4.0)/3.0)*pow(kk[0],2.0*(m_n_spec-4.0)/3.0)*pow(kk[1],m_n_spec-4.0)+
83 pow(kk[1],(m_n_spec-4.0)/3.0)*pow(kk[2],2.0*(m_n_spec-4.0)/3.0)*pow(kk[0],m_n_spec-4.0)+pow(kk[1],(m_n_spec-4.0)/3.0)*pow(kk[0],2.0*(m_n_spec-4.0)/3.0)*pow(kk[2],m_n_spec-4.0)+
84 pow(kk[2],(m_n_spec-4.0)/3.0)*pow(kk[1],2.0*(m_n_spec-4.0)/3.0)*pow(kk[0],m_n_spec-4.0)+pow(kk[0],(m_n_spec-4.0)/3.0)*pow(kk[2],2.0*(m_n_spec-4.0)/3.0)*pow(kk[1],m_n_spec-4.0)-
85 pow(kk[0]*kk[1],m_n_spec-4.0)-pow(kk[0]*kk[2],m_n_spec-4.0)-pow(kk[1]*kk[2],m_n_spec-4.0)-2.0*pow(kk[0]*kk[1]*kk[2],2.0*(m_n_spec-4.0)/3.0);
86 bs *= 6.0*gsl_pow_2(bm);
90 bs = pow(kk[0]*kk[1],m_n_spec-4.0)+pow(kk[0]*kk[2],m_n_spec-4.0)+pow(kk[1]*kk[2],m_n_spec-4.0)+3.0*pow(kk[0]*kk[1]*kk[2],2.0*(m_n_spec-4.0)/3.0)-
91 pow(kk[0],(m_n_spec-4.0)/3.0)*pow(kk[1],2.0*(m_n_spec-4.0)/3.0)*pow(kk[2],m_n_spec-4.0)-pow(kk[2],(m_n_spec-4.0)/3.0)*pow(kk[0],2.0*(m_n_spec-4.0)/3.0)*pow(kk[1],m_n_spec-4.0)-
92 pow(kk[1],(m_n_spec-4.0)/3.0)*pow(kk[2],2.0*(m_n_spec-4.0)/3.0)*pow(kk[0],m_n_spec-4.0)-pow(kk[1],(m_n_spec-4.0)/3.0)*pow(kk[0],2.0*(m_n_spec-4.0)/3.0)*pow(kk[2],m_n_spec-4.0)-
93 pow(kk[2],(m_n_spec-4.0)/3.0)*pow(kk[1],2.0*(m_n_spec-4.0)/3.0)*pow(kk[0],m_n_spec-4.0)-pow(kk[0],(m_n_spec-4.0)/3.0)*pow(kk[2],2.0*(m_n_spec-4.0)/3.0)*pow(kk[1],m_n_spec-4.0);
94 bs *= 6.0*gsl_pow_2(bm);
98 bs = 3.0*pow(kk[0],(m_n_spec-4.0)/3.0)*pow(kk[1],2.0*(m_n_spec-4.0)/3.0)*pow(kk[2],m_n_spec-4.0)+3.0*pow(kk[2],(m_n_spec-4.0)/3.0)*pow(kk[0],2.0*(m_n_spec-4.0)/3.0)*pow(kk[1],m_n_spec-4.0)+
99 3.0*pow(kk[1],(m_n_spec-4.0)/3.0)*pow(kk[2],2.0*(m_n_spec-4.0)/3.0)*pow(kk[0],m_n_spec-4.0)+3.0*pow(kk[1],(m_n_spec-4.0)/3.0)*pow(kk[0],2.0*(m_n_spec-4.0)/3.0)*pow(kk[2],m_n_spec-4.0)+
100 3.0*pow(kk[2],(m_n_spec-4.0)/3.0)*pow(kk[1],2.0*(m_n_spec-4.0)/3.0)*pow(kk[0],m_n_spec-4.0)+3.0*pow(kk[0],(m_n_spec-4.0)/3.0)*pow(kk[2],2.0*(m_n_spec-4.0)/3.0)*pow(kk[1],m_n_spec-4.0)-
101 3.0*pow(kk[0]*kk[1],m_n_spec-4.0)-3.0*pow(kk[1]*kk[2],m_n_spec-4.0)-3.0*pow(kk[0]*kk[2],m_n_spec-4.0)-8.0*pow(kk[0]*kk[1]*kk[2],2.0*(m_n_spec-4)/3.0);
102 bs *= 6.0*gsl_pow_2(bm);
106 ErrorCBL(
"",
"bispectrum",
"NG.cpp");
116 double cbl::cosmology::Cosmology::mrk (
const double kk,
const double mass,
const string method_Pk,
const bool store_output,
const string output_root,
const int norm,
const double k_min,
const double k_max,
const double prec,
const string file_par)
118 double xx = kk *
Radius(mass, m_RhoZero);
120 double AA = Am(method_Pk, store_output, output_root, norm, k_min, k_max, prec, file_par);
122 double TT = sqrt(Pk_matter({kk}, method_Pk,
false, 0., store_output, output_root, norm, k_min, k_max, prec, file_par)[0] / AA / pow(kk,m_n_spec));
124 return 5.99170e6 * gsl_pow_2(kk) *
TopHat_WF(xx) * TT / m_Omega_matter;
132 double cbl::cosmology::Cosmology::bias_kernel (
double xx,
void *params)
134 cbl::glob::GSL_f_pars *pp = (cbl::glob::GSL_f_pars *)params;
137 double *XX =
new double[ni];
138 double *Weight =
new double[ni];
139 gauleg (0., 1., XX, Weight, ni);
141 vector<double> km(3);
145 double mass = pp->mass;
146 string method_Pk = pp->method_Pk;
147 bool store_output = pp->store_output;
148 string output_root = pp->output_root;
150 double k_min = pp->k_min;
151 double k_max = pp->k_max;
152 double prec = pp->prec;
153 string file_par = pp->file_par;
156 const double xi1 = -1.0, xi2 = 1.0;
159 for (
int i=0; i<ni; i++) {
160 double xi = xi1+(xi2-xi1)*XX[i];
161 km[1] = sqrt(gsl_pow_2(xx)+gsl_pow_2(pp->kt)+2.0*xx*pp->kt*xi);
162 yi += bispectrum(km, method_Pk, store_output, output_root, norm, k_min, k_max, prec, file_par)*mrk(km[1], mass, method_Pk, store_output, output_root, norm, k_min, k_max, prec, file_par)*Weight[i];
165 yi *= (xi2-xi1)*gsl_pow_2(xx)*mrk(xx, mass, method_Pk, store_output, output_root, norm, k_min, k_max, prec, file_par);
174 double cbl::cosmology::Cosmology::frk_test (
const double kk,
const double mass,
const string method_Pk,
const bool store_output,
const string output_root,
const string interpType,
const int norm,
const double k_min,
const double k_max,
const double prec,
const string input_file,
const bool is_parameter_file)
176 cbl::glob::GSL_f_pars pp;
177 struct cbl::glob::GSL_f_pars *ppp = &pp;
181 ppp->method_Pk = method_Pk;
182 ppp->output_root = output_root;
187 ppp->file_par = input_file;
188 ppp->pt_Cosmology =
this;
194 Func.function = &glob::GSL_bias_kernel_wrapper;
196 double ibs = -1., err = -1.;
198 gsl_integration_workspace *ww = gsl_integration_workspace_alloc(1000);
199 gsl_integration_qagiu (&Func, 0., 1.e-8, 1e-3, 1000, ww, &ibs, &err);
201 gsl_integration_workspace_free(ww);
203 double bm = potential_spectral_amplitude(method_Pk, store_output, output_root, norm, k_min, k_max, prec, input_file);
205 double var = sigma2M(mass, method_Pk, 0., store_output, output_root, interpType, k_max, input_file, is_parameter_file);
207 ibs /= 8.0*gsl_pow_2(
par::pi)*var;
208 ibs /= bm*pow(kk, m_n_spec-4.0);
219 double cbl::glob::bias_kernel2 (
const double xx,
void *params)
221 struct cbl::glob::STR_NG *pp = (
struct cbl::glob::STR_NG *) params;
223 Cosmology cosm (pp->Omega_matter, pp->Omega_baryon, pp->Omega_neutrinos, pp->massless_neutrinos, pp->massive_neutrinos, pp->Omega_DE, pp->Omega_radiation, pp->hh, pp->scalar_amp, pp->scalar_pivot, pp->n_spec, pp->w0, pp->wa, pp->fNL, pp->type_NG, pp->tau, pp->model, pp->unit);
226 double *XX =
new double[ni];
227 double *Weight =
new double[ni];
228 gauleg (0., 1., XX, Weight, ni);
230 vector<double> km(3);
234 double mass = pp->mass;
235 string method_Pk = pp->method_Pk;
236 bool store_output = pp->store_output;
237 string output_root = pp->output_root;
239 double k_min = pp->k_min;
240 double k_max = pp->k_max;
241 double prec = pp->prec;
242 string file_par = pp->file_par;
245 const double xi1 = -1.0, xi2 = 1.0;
248 for (
int i=0; i<ni; i++)
250 double xi = xi1+(xi2-xi1)*XX[i];
251 km[1] = sqrt(gsl_pow_2(xx)+gsl_pow_2(pp->kt)+2.0*xx*pp->kt*xi);
252 yi += cosm.bispectrum(km, method_Pk, store_output, output_root, norm, k_min, k_max, prec, file_par)*cosm.mrk(km[1], mass, method_Pk, store_output, output_root, norm, k_min, k_max, prec, file_par)*Weight[i];
255 yi *= (xi2-xi1)*gsl_pow_2(xx)*cosm.mrk(xx, mass, method_Pk, store_output, output_root, norm, k_min, k_max, prec, file_par);
266 double cbl::cosmology::Cosmology::frk (
const double kk,
const double mass,
const string method_Pk,
const bool store_output,
const string output_root,
const string interpType,
const int norm,
const double k_min,
const double k_max,
const double prec,
const string input_file,
const bool is_parameter_file)
269 string dir_grid = path.
DirCosmo()+
"/Cosmology/Tables/grid_NG/bias_kernel/unit"+
conv(m_unit,
par::fINT)+
"/";
270 string MK =
"mkdir -p "+dir_grid;
if (system (MK.c_str())) {};
276 double x_min = 1.e-3;
278 vector<double> xx, yy;
280 cbl::glob::STR_NG str;
281 str.Omega_matter = m_Omega_matter;
282 str.Omega_baryon = m_Omega_baryon;
283 str.Omega_neutrinos = m_Omega_neutrinos;
284 str.massless_neutrinos = m_massless_neutrinos;
285 str.massive_neutrinos = m_massive_neutrinos;
286 str.Omega_DE = m_Omega_DE;
287 str.Omega_radiation = m_Omega_radiation;
289 str.scalar_amp = m_scalar_amp;
290 str.scalar_pivot = m_scalar_pivot;
291 str.n_spec = m_n_spec;
295 str.type_NG = m_type_NG;
301 str.method_Pk = method_Pk;
302 str.store_output = store_output;
303 str.output_root = output_root;
308 str.file_par = input_file;
310 bin_function(file_grid, glob::bias_kernel2, &str, bin, x_min, x_max,
"loglin", xx, yy);
313 cbl::glob::STR_grid str_grid;
319 Func.function = func_grid_loglin;
320 Func.params = &str_grid;
322 double ibs = -1., err = -1.;
324 gsl_integration_workspace *ww = gsl_integration_workspace_alloc(1000);
326 gsl_integration_qag(&Func, 1.e-3, 1.e3, 0., 1.e-3, 1000, 6, ww, &ibs, &err);
328 gsl_integration_workspace_free(ww);
330 double bm = potential_spectral_amplitude(method_Pk, store_output, output_root, norm, k_min, k_max, prec, input_file);
332 double var = sigma2M(mass, method_Pk, 0., store_output, output_root, interpType, k_max, input_file, is_parameter_file);
334 ibs /= 8.0*gsl_pow_2(
par::pi)*var;
335 ibs /= bm*pow(kk,m_n_spec-4.0);
345 double cbl::glob::GSL_bias_kernel_wrapper (
const double xx,
void *params)
347 cbl::glob::GSL_f_pars *pp = (cbl::glob::GSL_f_pars *)params;
348 return pp->pt_Cosmology->bias_kernel(xx,params);
356 double cbl::cosmology::Cosmology::bias_correction (
const double kk,
const double mass,
const string method_Pk,
const bool store_output,
const string output_root,
const string interpType,
const int norm,
const double k_min,
const double k_max,
const double prec,
const string input_file,
const bool is_parameter_file)
358 return m_fNL * 0.8 * frk(kk, mass, method_Pk, store_output, output_root, interpType, norm, k_min, k_max, prec, input_file, is_parameter_file) / mrk(kk, mass, method_Pk, store_output, output_root, norm, k_min, k_max, prec, input_file);
366 double cbl::glob::skewness_kernel (
double *kk,
size_t dim,
void *params)
370 struct cbl::glob::STR_NG *pp = (
struct cbl::glob::STR_NG *) params;
372 Cosmology cosm (pp->Omega_matter, pp->Omega_baryon, pp->Omega_neutrinos, pp->massless_neutrinos, pp->massive_neutrinos, pp->Omega_DE, pp->Omega_radiation, pp->hh, pp->scalar_amp, pp->scalar_pivot, pp->n_spec, pp->w0, pp->wa, pp->fNL, pp->type_NG, pp->tau, pp->output_root, pp->unit);
375 double *XX =
new double[ni];
376 double *Weight =
new double[ni];
377 gauleg (0., 1., XX, Weight, ni);
379 vector<double> km(3);
383 double mass = pp->mass;
384 string method_Pk = pp->method_Pk;
385 bool store_output = pp->store_output;
386 string output_root = pp->output_root;
388 double k_min = pp->k_min;
389 double k_max = pp->k_max;
390 double prec = pp->prec;
391 string file_par = pp->file_par;
394 const double xi1 = -1.0, xi2 = 1.0;
397 for (
int i=0; i<ni; i++) {
398 xi = xi1+(xi2-xi1)*XX[i];
399 km[1] = sqrt(gsl_pow_2(kk[0])+gsl_pow_2(kk[1])+2.0*kk[0]*kk[1]*xi);
400 yi += cosm.bispectrum(km, method_Pk, store_output, output_root, norm, k_min, k_max, prec, file_par)*cosm.mrk(km[1], mass, method_Pk, store_output, output_root, norm, k_min, k_max, prec, file_par)*Weight[i];
405 return cosm.mrk(kk[0], mass, method_Pk, store_output, output_root, norm, k_min, k_max, prec, file_par)*cosm.mrk(kk[1], mass, method_Pk, store_output, output_root, norm, k_min, k_max, prec, file_par)*yi*gsl_pow_2(kk[0]*kk[1]);
414 double cbl::cosmology::Cosmology::skewness (
const double mass,
const string method_Pk,
const bool store_output,
const string output_root,
const string interpType,
const int norm,
const double k_min,
const double k_max,
const double prec,
const string input_file,
const bool is_parameter_file)
417 string dir_grid = path.
DirCosmo()+
"/Cosmology/Tables/grid_NG/skewness_kernel/unit"+
conv(m_unit,
par::fINT)+
"/";
418 string MK =
"mkdir -p "+dir_grid;
if (system (MK.c_str())) {};
425 double x1_min = 1.e-5;
426 double x1_max = 1.e2;
427 double x2_min = 1.e-5;
428 double x2_max = 1.e2;
429 vector<double> xx1, xx2;
430 vector< vector<double> > yy;
432 cbl::glob::STR_NG str;
433 str.Omega_matter = m_Omega_matter;
434 str.Omega_baryon = m_Omega_baryon;
435 str.Omega_neutrinos = m_Omega_neutrinos;
436 str.massless_neutrinos = m_massless_neutrinos;
437 str.massive_neutrinos = m_massive_neutrinos;
438 str.Omega_DE = m_Omega_DE;
439 str.Omega_radiation = m_Omega_radiation;
441 str.scalar_amp = m_scalar_amp;
442 str.scalar_pivot = m_scalar_pivot;
443 str.n_spec = m_n_spec;
447 str.type_NG = m_type_NG;
452 str.method_Pk = method_Pk;
453 str.store_output = store_output;
454 str.output_root = output_root;
459 str.file_par = input_file;
461 bin_function_2D(file_grid, glob::skewness_kernel, &str, bin, x1_min, x1_max, x2_min, x2_max,
"loglin", xx1, xx2, yy);
463 cbl::glob::STR_grid_2D str_grid_2D;
464 str_grid_2D._xx1 = xx1;
465 str_grid_2D._xx2 = xx2;
466 str_grid_2D._yy = yy;
470 double *kl =
new double[dim];
471 double *kh =
new double[dim];
473 for (
int i=0; i<dim; i++) {
475 kh[i] = 30.0/pow(
Radius(mass,m_RhoZero),0.7);
479 gsl_monte_function Func;
480 Func.f = func_grid_loglin_2D;
482 Func.params = &str_grid_2D;
485 double ibs = -1., err = -1.;
487 const size_t cl = 75000;
490 const gsl_rng_type *TT = gsl_rng_default;
491 gsl_rng *rn = gsl_rng_alloc (TT);
493 coutCBL <<
"Please wait, I'm computing the Monte Carlo integral..."<<endl;
495 gsl_monte_vegas_state *st = gsl_monte_vegas_alloc (dim);
496 gsl_monte_vegas_integrate(&Func, kl, kh, dim, cl/100, rn, st, &ibs, &err);
498 gsl_monte_vegas_free(st);
500 double var = sigma2M(mass, method_Pk, 0., store_output, output_root, interpType, k_max, input_file, is_parameter_file);
502 return ibs/(8.0*gsl_pow_4(
par::pi))/gsl_pow_2(var)*m_fNL;
509 double cbl::cosmology::Cosmology::dskewnessdM (
const double mass,
const string method_Pk,
const bool store_output,
const string output_root,
const string interpType,
const int norm,
const double k_min,
const double k_max,
const double prec,
const string input_file,
const bool is_parameter_file)
512 double mInf = 6.0, mSup = 16.0;
514 if (log10(mass) < mInf)
ErrorCBL(
"mass should be > 10^6 Msun/h",
"dskewnessdM",
"NG.cpp");
516 if (log10(mass) > mSup)
ErrorCBL(
"mass should be < 10^16 Msun/h",
"dskewnessdM",
"NG.cpp");
519 double logm1 = log10(mass)-dlogm;
520 double logm2 = log10(mass)+dlogm;
522 if (logm1 < mInf) logm1 = mInf;
523 if (logm2 > mSup) logm2 = mSup;
525 double sk = skewness(mass, method_Pk, store_output, output_root, interpType, norm, k_min, k_max, prec, input_file, is_parameter_file);
529 double M1 = pow(10.0,logm1);
530 double M2 = pow(10.0,logm2);
535 logsk1 = log10(skewness(M1, method_Pk, store_output, output_root, interpType, norm, k_min, k_max, prec, input_file, is_parameter_file)/m_fNL);
536 logsk2 = log10(skewness(M2, method_Pk, store_output, output_root, interpType, norm, k_min, k_max, prec, input_file, is_parameter_file)/m_fNL);
539 logsk1 = log10(-skewness(M1, method_Pk, store_output, output_root, interpType, norm, k_min, k_max, prec, input_file, is_parameter_file)/m_fNL);
540 logsk2 = log10(-skewness(M2, method_Pk, store_output, output_root, interpType, norm, k_min, k_max, prec, input_file, is_parameter_file)/m_fNL);
545 return sk*(logsk2-logsk1)/(logm2-logm1)/mass;
552 double cbl::cosmology::Cosmology::MF_correction (
const double mass,
const double redshift,
const string method_Pk,
const bool store_output,
const string output_root,
const string interpType,
const int norm,
const double k_min,
const double k_max,
const double prec,
const string input_file,
const bool is_parameter_file)
554 double dc = deltac(redshift)*sqrt(0.8);
555 double gf = DN(redshift);
557 double SSS = sigma2M(mass, method_Pk, 0., store_output, output_root, interpType, k_max, input_file, is_parameter_file);
558 double sm = sqrt(SSS);
560 double DlnSigmaDlnM = dnsigma2M(1, mass, method_Pk, 0., store_output, output_root, interpType, k_max, input_file, is_parameter_file)*(mass/(2.*SSS));
562 double sk = skewness(mass, method_Pk, store_output, output_root, interpType, norm, k_min, k_max, prec, input_file, is_parameter_file);
564 double dsk = dskewnessdM(mass, method_Pk, store_output, output_root, interpType, norm, k_min, k_max, prec, input_file, is_parameter_file);
566 double mfc1 = DlnSigmaDlnM*(dc/gf/sm+sk*sm/6.0*(gsl_pow_4(dc/gf/sm)-2.0*gsl_pow_2(dc/gf/sm)-1.0))/mass;
567 double mfc2 = dsk*sm/6.0*(gsl_pow_2(dc/gf/sm)-1.0);
568 double mfc = mfc1+mfc2;
571 if (mfc > 0.0) mfc = 0.0;
572 else psg = DlnSigmaDlnM*(dc/gf/sm)/mass;
#define coutCBL
CBL print message.
std::string DirCosmo()
get the directory where the CosmoBolognaLbi are stored
double MF_correction(const double mass, const double redshift, const std::string method_Pk, const bool store_output=true, const std::string output_root="test", const std::string interpType="Linear", const int norm=-1, const double k_min=0.001, const double k_max=100., const double prec=1.e-2, const std::string input_file=par::defaultString, const bool is_parameter_file=true)
correction to the halo mass in non-Gaussian cosmologies
double dskewnessdM(const double mass, const std::string method_Pk, const bool store_output=true, const std::string output_root="test", const std::string interpType="Linear", const int norm=-1, const double k_min=0.001, const double k_max=100., const double prec=1.e-2, const std::string input_file=par::defaultString, const bool is_parameter_file=true)
the derivative of the skewness, ds/dM
double bispectrum(const std::vector< double > kk, const std::string method_Pk, const bool store_output=true, const std::string output_root="test", const int norm=-1, const double k_min=0.001, const double k_max=100., const double prec=1.e-2, const std::string file_par=par::defaultString)
the bispectrum
double potential_spectral_amplitude(const std::string method_Pk, const bool store_output=true, const std::string output_root="test", const int norm=-1, const double k_min=0.001, const double k_max=100., const double prec=1.e-2, const std::string file_par=par::defaultString)
the potential spectral amplitude
double bias_correction(const double kk, const double mass, const std::string method_Pk, const bool store_output=true, const std::string output_root="test", const std::string interpType="Linear", const int norm=-1, const double k_min=0.001, const double k_max=100., const double prec=1.e-2, const std::string input_file=par::defaultString, const bool is_parameter_file=true)
correction to the halo bias in non-Gaussian cosmologies
double frk(const double kk, const double mass, const std::string method_Pk, const bool store_output=true, const std::string output_root="test", const std::string interpType="Linear", const int norm=-1, const double k_min=0.001, const double k_max=100., const double prec=1.e-2, const std::string input_file=par::defaultString, const bool is_parameter_file=true)
auxiliary function to estimate cosmological quantities in non-Gaussian cosmologies
double skewness(const double mass, const std::string method_Pk, const bool store_output=true, const std::string output_root="test", const std::string interpType="Linear", const int norm=-1, const double k_min=0.001, const double k_max=100., const double prec=1.e-2, const std::string input_file=par::defaultString, const bool is_parameter_file=true)
the skewness
double mrk(const double kk, const double mass, const std::string method_Pk, const bool store_output=true, const std::string output_root="test", const int norm=-1, const double k_min=0.001, const double k_max=100., const double prec=1.e-2, const std::string file_par=par::defaultString)
auxiliary function to estimate cosmological quantities in non-Gaussian cosmologies
double Am(const std::string method_Pk, const bool store_output=true, const std::string output_root="test", const int norm=-1, const double k_min=0.001, const double k_max=100., const double prec=1.e-2, const std::string file_par=par::defaultString)
the amplitude of the matter power spectrum
static const char fDP2[]
conversion symbol for: double -> std::string
static const char ee3[]
conversion symbol for: double -> std::string
static const char fDP3[]
conversion symbol for: double -> std::string
static const char fDP5[]
conversion symbol for: double -> std::string
static const char fINT[]
conversion symbol for: int -> std::string
static const double pi
: the ratio of a circle's circumference to its diameter
The global namespace of the CosmoBolognaLib
std::string conv(const T val, const char *fact)
convert a number to a std::string
T Radius(const T Mass, const T Rho)
the radius of a sphere of a given mass and density
T TopHat_WF(const T kR)
the top-hat window function
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
void bin_function_2D(const std::string file_grid, double func(double *, size_t, void *), void *par, const int bin, const double x1_min, const double x1_max, const double x2_min, const double x2_max, const std::string binning, std::vector< double > &xx1, std::vector< double > &xx2, std::vector< std::vector< double >> &yy)
create a 2D grid given an input function
void bin_function(const std::string file_grid, double func(double, void *), void *par, const int bin, const double x_min, const double x_max, const std::string binning, std::vector< double > &xx, std::vector< double > &yy)
create a 1D grid given an input function