hmf.core._kernels.transfer.tabulate_transfer

hmf.core._kernels.transfer.tabulate_transfer(k: ndarray[tuple[Any, ...], dtype[float64]], t: ndarray[tuple[Any, ...], dtype[float64]], scales: EH98Scales, *, n_slope: int = 4, decay_ln_k: float = 1.0) → TabulatedTransfer[source]

Build a TabulatedTransfer from a table of T(k).

Parameters:
  • k – Wavenumbers of the table, in h/Mpc, strictly increasing.

  • t – The transfer function at k, in any normalisation; it must be positive.

  • scales – The EH98 scales of the cosmology (from eh98_scales()), for the no-wiggle reference the table is stored relative to.

  • n_slope – The number of nodes at the high end to fit the slope of the residual to (a straight line in ln k, by least squares). At least 2.

  • decay_ln_k – The e-folding scale, in ln k, of the tilt correction above the table.

Return type:

TabulatedTransfer

Raises:

ValueError – If k is not strictly increasing and positive, t is not positive, or there are fewer than max(n_slope, 4) nodes.