Page 1 of 1

CAMB: Modify k sampling for Scalar Power Spectrum

Posted: October 24 2019
by María Pía Piccirilli
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!

Re: CAMB: Modify k sampling for Scalar Power Spectrum

Posted: October 25 2019
by Antony Lewis
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+)

Re: CAMB: Modify k sampling for Scalar Power Spectrum

Posted: October 25 2019
by María Pía Piccirilli
Thank you very much Antony for your reply!
It's been very helpful!