hmf.core.transfer¶
The Transfer stage: the transfer function and unnormalised P(k) at z = 0.
The stage holds a cosmology, a transfer model and the wavenumber accuracy
(k_accuracy). It solves the model once (one Boltzmann run, for a CAMB or CLASS
model) and gives, for each matter species ("cb", CDM + baryons; "tot", total matter):
Transfer.transfer_function(): T(k), normalised to 1 as k -> 0;Transfer.unnormalised_power(): \(k^{n_s} T(k)^2\), the shape of the linear power spectrum at z = 0. It is a plain (dimensionless) array, with k in h/Mpc and an arbitrary amplitude: normalising it, e.g. to sigma_8, and giving it the units of a power spectrum, is the job ofLinearPower;Transfer.power_source(): the same at kernel level, for later stages: anUnnormalisedPower, aPowerSourcewhose methods are pure functions of plain arrays in canonical units, with the mean density of CDM + baryons, which sets the mass of a filter radius whatever the species (seehmf.core._kernels).
Every species comes from the same solution, so asking for the power spectrum of one
species and normalising with another never runs the Boltzmann code twice. Runs are
also memoised by the content of their input, so stages that differ only in n_s
(or in fields the run does not depend on) share one run, and they can be cached on
disk across processes (disk_cache).
The cosmology field¶
The cosmology is an astropy FLRW. Astropy cosmologies are
immutable and compare by value, but are not hashable, so the field is compared and
hashed by cosmology_key(): its class and parameter values,
without its name and metadata. Two stages with equal parameters are therefore equal
(and hash equal) even if their cosmologies have different names.
Classes
|
The transfer function and the shape of the linear power spectrum at z = 0. |
|
The shape of the linear power spectrum of one species at z = 0, at kernel level. |