Skip to content

Support for external non-linear P(k) ratio in lensing calculations #190

@adammoss

Description

@adammoss

Motivation:

For non-standard dark matter models, the built-in Halofit/HMcode fitting functions do not accurately capture the non-linear matter power spectrum. Dedicated codes exist for these cosmologies, but there is currently no way to feed their predictions into CAMB for lensed CMB calculations.

Adding support for an external non-linear ratio R(k,z) = sqrt(P_NL/P_L) would enable:

  • Accurate lensed CMB power spectra for non-standard DM models
  • Flexibility to use any external non-linear P(k) code

Proposed interface:

results = camb.CAMBdata()
results.set_nonlin_ratio(k_h, z_array, ratio_array) # ratio = sqrt(P_NL/P_L)
results.calc_power_spectra(params)
cls_lensed = results.get_lensed_scalar_cls(lmax=lmax)

The ratio array would be interpolated internally and used in place of the Halofit calculation when computing the lensing potential.

Disavantages:

May require 2 passes over running CAMB (the first pass to obtain the linear P(k).

Use case:

I have implemented this in a fork (AxiCAMB) for ultralight axion studies with axionHMcode. Happy to contribute the implementation if there is interest.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions