GrowthFactor¶
- class hmf.cosmology.growth_factor.GrowthFactor(*args, **kwargs)[source]¶
Growth factor calculation that intelligently chooses which method to use.
This class chooses which growth factor calculation to use based on the cosmology and the parameters. It prioritises first accuracy, then performance, conditional on the parameters. In particular, it uses the following logic to compute the growth factor:
If the dark energy equation of state is not w = -1, use the ODE solution; otherwise
If the cosmology has no radiation component, or the redshift is low enough such that the radiation component can be neglected: - If the cosmology is flat, use analytic forms of Eisenstein 1997 - Otherwise, use the integral form defined in Heath 1977.
Otherwise, solve the full ODE numerically (also presented in the docs).
Attributes
Methods
- __init__(*args, **kwargs)[source]
- dlne_dlna(z)
Compute the derivative of ln(E(a)) with respect to ln(a).
This is useful for the growth factor, which has terms \(E'(a)/E(a) \equiv (1/a)*dlnE/dlna\) in its definition.
This implementation simply uses the exact definition from astropy of E(a) and writes down the derivative analytically.
- classmethod get_models() dict[str, type]
Get a dictionary of all implemented models for this component.
- growth_factor(z)
Compute the normalized growth factor, \(D(a) = D^+(a)/D^+(a=1)\).
- Parameters:
z (array_like) – Redshift.
- Returns:
gf – The growth factor at z.
- Return type:
array_like
- growth_rate(z) float | ndarray
Compute the growth rate, \(f(a) = d\ln D^+ / d\ln a\).
- Parameters:
z (array_like) – Redshift.
- Returns:
gr – The growth rate at z.
- Return type:
array_like
- radiation_density(z)
The fractional radiation density as a function of redshift.