CAMB: Matter powerspectrum, and number of intervals

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Kate Land
Posts: 29
Joined: September 27 2004
Affiliation: Oxford University
Contact:

CAMB: Matter powerspectrum, and number of intervals

Post by Kate Land » July 31 2007

Hi,
CAMB used to output the matter power spectrum as an array of a fixed length (2000 for example). But the more recent version of CAMB seems to do something clever - and adjusts the number of k intervals depending on k_max and on the cosmology.

I was wondering if there was any way to switch this off and go back to a fixed length (to keep it compatible which a bunch of my codes).
Thanks

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

Re: CAMB: Matter powerspectrum, and number of intervals

Post by Antony Lewis » July 31 2007

Change transfer_k_per_logint - the value zero is the dymanic 'optimized' spacing, any other setting will be fixed.

Kate Land
Posts: 29
Joined: September 27 2004
Affiliation: Oxford University
Contact:

CAMB: Matter powerspectrum, and number of intervals

Post by Kate Land » July 31 2007

I have set transfer_k_per_logint = 5
But I still get a varying number of lines in my *matterpower.dat file, depending on the cosmological parameters... (but only varying by a couple of lines).

I was also wondering how to set transfer_kMIN, if possible.
Thanks

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

Re: CAMB: Matter powerspectrum, and number of intervals

Post by Antony Lewis » July 31 2007

You'd have to edit the code to change k min (e.g. Transfer_SaveMatterPower in modules.f90).

Sorry, transfer_k_per_logint fixes the spacing in the output transfer function file rather than the matter power spectrum file. The output matter power spectrum spacing should be fixed anyway, though possibly the high-k limit depends on the input settings; i.e. can you not just take the first n lines of the file? Alternatively you could edit Transfer_SaveMatterPower to restrict the output range as you like.

Post Reply