Hi, I am using CAMB version 1.5.8 and seeing small differences in the matter power spectrum obtained from transfer function `get_matter_transfer_data` (using the formula P_k = A_s*(k/pivot_scalar)^ns*transfer_fn^2)) and `get_matter_power_interpolator`. The difference is on the order of ~1% regardless of the wavenumber. Is this expected or did I miss something?
The code snippet can be found here:
https://gist.github.com/jeonggyukim/73c0006bcbf96436b5efcd32d59647d8
CAMB: matter power spectrum from interpolator and transfer function
-
- Posts: 3
- Joined: October 04 2024
- Affiliation: Korea Institute of Advanced Study
-
- Posts: 1983
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: CAMB: matter power spectrum from interpolator and transfer function
My guess is you want ns-1 not ns, and factor of h somewhere
-
- Posts: 3
- Joined: October 04 2024
- Affiliation: Korea Institute of Advanced Study
Re: CAMB: matter power spectrum from interpolator and transfer function
Thanks very much.
I actually tried adjusting the power-law index and including a factor h without success. I see [math] (with nrun=0 and nrun,run=0) and [math] in the CAMB Notes. (I am not sure if [math] in the CAMB notes is different from [math] in Eq (1) in Hahn & Abel (2011)?)
I don't see how changing ns to ns-1 would help in this situation because the 1% relative difference is independent of k and shows up consistently for different h and other parameter values. Maybe it's my lack of understanding of the equations in the notes. I would appreciate it if you could point me to useful references or example notebooks.
I actually tried adjusting the power-law index and including a factor h without success. I see [math] (with nrun=0 and nrun,run=0) and [math] in the CAMB Notes. (I am not sure if [math] in the CAMB notes is different from [math] in Eq (1) in Hahn & Abel (2011)?)
I don't see how changing ns to ns-1 would help in this situation because the 1% relative difference is independent of k and shows up consistently for different h and other parameter values. Maybe it's my lack of understanding of the equations in the notes. I would appreciate it if you could point me to useful references or example notebooks.
-
- Posts: 1983
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
-
- Posts: 3
- Joined: October 04 2024
- Affiliation: Korea Institute of Advanced Study
Re: CAMB: matter power spectrum from interpolator and transfer function
Everything checks out now. Thank you very much!