CAMB: Matter powerspectrum, and number of intervals
CAMB: Matter powerspectrum, and number of intervals
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
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
-
- Posts: 1943
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: CAMB: Matter powerspectrum, and number of intervals
Change transfer_k_per_logint - the value zero is the dymanic 'optimized' spacing, any other setting will be fixed.
CAMB: Matter powerspectrum, and number of intervals
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
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
-
- Posts: 1943
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: CAMB: Matter powerspectrum, and number of intervals
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.
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.