andreufont / LyaCosmoParams

Notes on cosmological parameters and Lyman alpha simulations
2 stars 2 forks source link

Figure out most standard way to get logarithmic growth rate (f) from CAMB #69

Open andreufont opened 4 years ago

andreufont commented 4 years ago

Pablo sent us this snippet from the CAMB documentation:

pars.set_matter_power(redshifts=zs)
results = camb.get_results(pars)
transfer = results.get_matter_transfer_data()
s8 = transfer.sigma_8
fs8 = transfer.sigma2_vdelta_8
f = fs8/s8

However, I have a comment and a question:

We should track this down, probably email Anthony Lewis.

andreufont commented 4 years ago

See discussion with Antony in CosmoCoffee: https://66.39.16.36/viewtopic.php?t=3377

Chris-Pedersen commented 4 years ago

This link isn't working for me, I'm getting a privacy error, is there another way to link the discussion?

andreufont commented 4 years ago

I thought this would be a public link, I guess not? Anyway, I copy paste here the answer from Antony:

You can more directly use https://camb.readthedocs.io/en/latest/results.html?highlight=get_fsigma8#camb.results.CAMBdata.get_fsigma8

(the other doc string should say "growth parameter f*sigma_8"). By default it is using config.transfer_power_var (defaults to baryons+CDM+neutrinos) and the CDM velocity. More generally you can use https://camb.readthedocs.io/en/latest/results.html?highlight=get_sigmaR#camb.results.CAMBdata.get_sigmaR with whatever variables you like.

However, in general it may be best to try to calculate the actual physical quantity being measured rather some rather ill-defined growth parameter.

For mode evolution you can use https://camb.readthedocs.io/en/latest/results.html?highlight=get_redshift_evolution#camb.results.CAMBdata.get_redshift_evolution or use the general matter power spectrum at specific requested redshifts https://camb.readthedocs.io/en/latest/results.html?highlight=get_redshift_evolution#camb.results.CAMBdata.get_linear_matter_power_spectrum