CAMB: output transferred wavenumbers

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Zhuangfei Wang
Posts: 28
Joined: October 09 2021
Affiliation: Simon Fraser University

CAMB: output transferred wavenumbers

Post by Zhuangfei Wang » August 07 2022

Hello:

I just got a question about the outputted k modes for the matter power spectrum from CAMB. When I tested an old version of CAMB(should be before 2019) and made omch2 or ombh2 decrease by more than 0.01, the outputted number of k modes would be different from the default output in LCDM(basically a few more or less in the end), which is confusing to me because I thought the transferred k modes should be fixed as long as the relevant parameters such as kmax, minkh, and dlnkh are fixed. However, the latest version of CAMB has no such issue and will output the same k modes no matter what values of cosmological parameters to choose in params.ini. Could anyone help to explain why the old version of CAMB doesn't fix k modes but have it to change with the cosmological parameters? Since I am trying to add some modifications to the old CAMB, I'd like to know how it works and how to make the number of k modes fixed here.

Many thanks in advance.

Zhuangfei

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

Re: CAMB: output transferred wavenumbers

Post by Antony Lewis » August 08 2022

The k sampling still change internally for calculating CMB power spectra. Some of the functions export interpolated fixed grids, I'm not sure what function exactly you are using.

Zhuangfei Wang
Posts: 28
Joined: October 09 2021
Affiliation: Simon Fraser University

Re: CAMB: output transferred wavenumbers

Post by Zhuangfei Wang » August 08 2022

Hi Antony,

Thanks for your reply. I set transfer_interp_matterpower = T in params.ini, so I think it should be interpolated grids. And also I was looking at the function Transfer_SaveMatterPower, and when using interp_matterpower, the number of k points should be determined by this line:

points = log(MTrans%TransferData(Transfer_kh,MTrans%num_q_trans,itf)/minkh)/dlnkh+1

Could you explain further why it changes with different inputs of cosmological parameters? Specifically, I just found more or fewer k points than the default input after k /h= 2 Mpc^(-1)h^(-1) in outputted file for matter power spectrum when setting kmax = 2 in params.ini.

Thanks,
Zhuangfei

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

Re: CAMB: output transferred wavenumbers

Post by Antony Lewis » August 08 2022

Sound speed, distances etc all change with cosmological parameters, so the internal sampling changes to appropriately sample the evolution.

Zhuangfei Wang
Posts: 28
Joined: October 09 2021
Affiliation: Simon Fraser University

Re: CAMB: output transferred wavenumbers

Post by Zhuangfei Wang » August 09 2022

I see. Thanks a lot.

Zhuangfei

Post Reply