CAMB: Modify k sampling for Scalar Power Spectrum

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
María Pía Piccirilli
Posts: 5
Joined: September 18 2019
Affiliation: Facultad de Ciencias Astronómicas y Geofísicas - Universidad Nacional de La Plata

CAMB: Modify k sampling for Scalar Power Spectrum

Post by María Pía Piccirilli » October 24 2019

Dear all:

I'm looking for some hints to find the place where the values of k which are passed to the function TInitialPowerLaw_ScalarPower (module InitialPower.f90 in CAMB) are being given their respective values . My final goal is to modify the sample density at small values of k in order to increase the primordial power spectra resolution in that range.

Than you very much!

Antony Lewis
Posts: 1941
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: CAMB: Modify k sampling for Scalar Power Spectrum

Post by Antony Lewis » October 25 2019

To change the k sampling for power spectrum integration you can just increase params.Accuracy.IntkAccuracyBoost (e.g. from python). If you want to tinker, search for IntkAccuracyBoost in the Fortran for the relevant code to modify just the low-k spacing.

There's an example of using a custom power primordial spectrum in the example notebook at

https://camb.readthedocs.io/en/latest/CAMBdemo.html

(box 40+)

María Pía Piccirilli
Posts: 5
Joined: September 18 2019
Affiliation: Facultad de Ciencias Astronómicas y Geofísicas - Universidad Nacional de La Plata

Re: CAMB: Modify k sampling for Scalar Power Spectrum

Post by María Pía Piccirilli » October 25 2019

Thank you very much Antony for your reply!
It's been very helpful!

Post Reply