halomod.tools.power_to_corr

halomod.tools.power_to_corr(power_func: callable, r: numpy.ndarray)numpy.ndarray[source]

Calculate the isotropic 3D correlation function given an isotropic power spectrum.

Parameters
  • power_func (callable) – A callable function which returns the natural log of power given lnk

  • r (array_like) – The values of separation/scale to calculate the correlation at.

Notes

This uses standard Simpson’s Rule integration, but in which the number of subdivisions is chosen with some care to ensure that zeros of the Bessel function are captured.

See also

power_to_corr_ogata

A faster, smarter algorithm for doing the same thing.