UnnormalisedPower¶
- class hmf.core.transfer.UnnormalisedPower(*, transfer: Transfer, species: str)[source]¶
The shape of the linear power spectrum of one species at z = 0, at kernel level.
\(P(k) \propto k^{n_s} T(k)^2\), with k in h/Mpc, on plain arrays: a
PowerSource, made byTransfer.power_source(). Its amplitude is arbitrary: the normalisation to sigma_8 is applied later, as a scalar. Its methods are pure; it compares and hashes by its transfer stage and species. They check k against the transfer model’s valid domain, and do not warn when they extrapolate a user’s table: a stage built on it warns, withtable_range.Attributes
- rho_mean0¶
- table_range¶
The range of the user’s transfer table, beyond which it is extrapolated.
Noneunless the transfer model is a table the user supplied (seePowerSource).
Methods
- ln_power_kernel(ln_k: ndarray[tuple[Any, ...], dtype[float64]]) ndarray[tuple[Any, ...], dtype[float64]][source]¶
Ln of \(k^{n_s} T(k)^2\) at ln(k / (h/Mpc)).
- Parameters:
ln_k – ln k, with k in h/Mpc: a plain array.
- Returns:
The (dimensionless) ln P, with the shape of
ln_k.- Return type:
- Raises:
DomainError – If a ln k is not finite, or k is outside the model’s valid domain.
- power_kernel(k: ndarray[tuple[Any, ...], dtype[float64]]) ndarray[tuple[Any, ...], dtype[float64]][source]¶
\(k^{n_s} T(k)^2\), dimensionless, at k in h/Mpc (a plain array).
- Parameters:
k – Wavenumbers in h/Mpc: a plain array.
- Returns:
With the shape of
k.- Return type:
- Raises:
DomainError – If a k is not finite, or is outside the model’s valid domain (k > 0).