Skip to content

Different non-linear matter power spectra for different variables #91

@alexander-mead

Description

@alexander-mead
# Import CAMB
import camb

# Set parameters
pars = camb.CAMBparams()
pars.set_cosmology(H0=67.5, ombh2=0.022, omch2=0.122, mnu=0.07)
pars.set_matter_power([0.], kmax=100., nonlinear=True)
pars.NonLinearModel.set_params(halofit_version='mead')

# Do the calculation
data = camb.get_results(pars)

# Get the power spectrum at some wavenumber
_, _, Pk_tot = data.get_nonlinear_matter_power_spectrum(params=pars, var1='delta_tot', var2='delta_tot')
_, _, Pk_cdm = data.get_nonlinear_matter_power_spectrum(params=pars, var1='delta_cdm', var2='delta_cdm')
print(Pk_tot[0][160], Pk_cdm[0][160])

If I run the above code I get the following printed out: 810.7663200215078 820.4239789024388

I'm confused by the fact that these numbers are different, since the HMcode model for the non-linear power spectrum only calculates the result for the total matter power spectrum, and has not been calibrated for the non-linear CDM-CDM power spectrum, or anything else like that.

I checked and the two results are also different if halofit_version='takahashi' and HALOFIT was also only calibrated to provide the total matter power spectrum.

In principle, one ought to be able to calculate the non-linear (cross) power for any combination of var1 and var2, but the above models have not been calibrated to do this. I'm not sure what either calculation would be doing when either var1 or var2 is set to delta_cdm. Should an error message be generated instead of a result?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions