jax_cosmo.background module¶
-
jax_cosmo.background.
w
(cosmo, a)[source]¶ Dark Energy equation of state parameter using the Linder parametrisation.
Parameters: - cosmo (Cosmology) – Cosmological parameters structure
- a (array_like) – Scale factor
Returns: w – The Dark Energy equation of state parameter at the specified scale factor
Return type: ndarray, or float if input scalar
Notes
The Linder parametrization :cite:`2003:Linder` for the Dark Energy equation of state \(p = w \rho\) is given by:
\[w(a) = w_0 + w_a (1 - a)\]
-
jax_cosmo.background.
f_de
(cosmo, a)[source]¶ Evolution parameter for the Dark Energy density.
Parameters: a (array_like) – Scale factor Returns: f – The evolution parameter of the Dark Energy density as a function of scale factor Return type: ndarray, or float if input scalar Notes
For a given parametrisation of the Dark Energy equation of state, the scaling of the Dark Energy density with time can be written as:
\[\rho_{de}(a) = \rho_{de}(a=1) e^{f(a)}\](see :cite:`2005:Percival` and note the difference in the exponent base in the parametrizations) where \(f(a)\) is computed as \(f(a) = -3 \int_0^{\ln(a)} [1 + w(a')] d \ln(a')\). In the case of Linder’s parametrisation for the dark energy in Eq.
linderParam
\(f(a)\) becomes:\[f(a) = -3 (1 + w_0 + w_a) \ln(a) + 3 w_a (a - 1)\]
-
jax_cosmo.background.
Esqr
(cosmo, a)[source]¶ Square of the scale factor dependent factor E(a) in the Hubble parameter.
Parameters: a (array_like) – Scale factor Returns: E^2 – Square of the scaling of the Hubble constant as a function of scale factor Return type: ndarray, or float if input scalar Notes
The Hubble parameter at scale factor a is given by \(H^2(a) = E^2(a) H_o^2\) where \(E^2\) is obtained through Friedman’s Equation (see :cite:`2005:Percival`) :
\[E^2(a) = \Omega_m a^{-3} + \Omega_k a^{-2} + \Omega_{de} e^{f(a)}\]where \(f(a)\) is the Dark Energy evolution parameter computed by
f_de()
.
-
jax_cosmo.background.
H
(cosmo, a)[source]¶ Hubble parameter [km/s/(Mpc/h)] at scale factor a
Parameters: a (array_like) – Scale factor Returns: H – Hubble parameter at the requested scale factor. Return type: ndarray, or float if input scalar
-
jax_cosmo.background.
Omega_m_a
(cosmo, a)[source]¶ Matter density at scale factor a.
Parameters: a (array_like) – Scale factor Returns: Omega_m – Non-relativistic matter density at the requested scale factor Return type: ndarray, or float if input scalar Notes
The evolution of matter density \(\Omega_m(a)\) is given by:
\[\Omega_m(a) = \frac{\Omega_m a^{-3}}{E^2(a)}\]see :cite:`2005:Percival` Eq. (6)
-
jax_cosmo.background.
Omega_de_a
(cosmo, a)[source]¶ Dark Energy density at scale factor a.
Parameters: a (array_like) – Scale factor Returns: Omega_de – Dark Energy density at the requested scale factor Return type: ndarray, or float if input scalar Notes
The evolution of Dark Energy density \(\Omega_{de}(a)\) is given by:
\[\Omega_{de}(a) = \frac{\Omega_{de} e^{f(a)}}{E^2(a)}\]where \(f(a)\) is the Dark Energy evolution parameter computed by
f_de()
(see :cite:`2005:Percival` Eq. (6)).
-
jax_cosmo.background.
radial_comoving_distance
(cosmo, a, log10_amin=-3, steps=256)[source]¶ Radial comoving distance in [Mpc/h] for a given scale factor.
Parameters: a (array_like) – Scale factor Returns: chi – Radial comoving distance corresponding to the specified scale factor. Return type: ndarray, or float if input scalar Notes
The radial comoving distance is computed by performing the following integration:
\[\chi(a) = R_H \int_a^1 \frac{da^\prime}{{a^\prime}^2 E(a^\prime)}\]
-
jax_cosmo.background.
dchioverda
(cosmo, a)[source]¶ Derivative of the radial comoving distance with respect to the scale factor.
Parameters: a (array_like) – Scale factor Returns: dchi/da – Derivative of the radial comoving distance with respect to the scale factor at the specified scale factor. Return type: ndarray, or float if input scalar Notes
The expression for \(\frac{d \chi}{da}\) is:
\[\frac{d \chi}{da}(a) = \frac{R_H}{a^2 E(a)}\]
-
jax_cosmo.background.
transverse_comoving_distance
(cosmo, a)[source]¶ Transverse comoving distance in [Mpc/h] for a given scale factor.
Parameters: a (array_like) – Scale factor Returns: f_k – Transverse comoving distance corresponding to the specified scale factor. Return type: ndarray, or float if input scalar Notes
The transverse comoving distance depends on the curvature of the universe and is related to the radial comoving distance through:
\[\begin{split}f_k(a) = \left\lbrace \begin{matrix} R_H \frac{1}{\sqrt{\Omega_k}}\sinh(\sqrt{|\Omega_k|}\chi(a)R_H)& \mbox{for }\Omega_k > 0 \\ \chi(a)& \mbox{for } \Omega_k = 0 \\ R_H \frac{1}{\sqrt{\Omega_k}} \sin(\sqrt{|\Omega_k|}\chi(a)R_H)& \mbox{for } \Omega_k < 0 \end{matrix} \right.\end{split}\]
-
jax_cosmo.background.
angular_diameter_distance
(cosmo, a)[source]¶ Angular diameter distance in [Mpc/h] for a given scale factor.
Parameters: a (array_like) – Scale factor Returns: d_A Return type: ndarray, or float if input scalar Notes
Angular diameter distance is expressed in terms of the transverse comoving distance as:
\[d_A(a) = a f_k(a)\]
-
jax_cosmo.background.
growth_factor
(cosmo, a)[source]¶ Compute linear growth factor D(a) at a given scale factor, normalized such that D(a=1) = 1.
Parameters: - cosmo (Cosmology) – Cosmology object
- a (array_like) – Scale factor
Returns: D – Growth factor computed at requested scale factor
Return type: ndarray, or float if input scalar
Notes
The growth computation will depend on the cosmology parametrization, for instance if the $gamma$ parameter is defined, the growth will be computed assuming the $f = Omega^gamma$ growth rate, otherwise the usual ODE for growth will be solved.
-
jax_cosmo.background.
growth_rate
(cosmo, a)[source]¶ Compute growth rate dD/dlna at a given scale factor.
Parameters: - cosmo (Cosmology) – Cosmology object
- a (array_like) – Scale factor
Returns: f – Growth rate computed at requested scale factor
Return type: ndarray, or float if input scalar
Notes
The growth computation will depend on the cosmology parametrization, for instance if the $gamma$ parameter is defined, the growth will be computed assuming the $f = Omega^gamma$ growth rate, otherwise the usual ODE for growth will be solved.
The LCDM approximation to the growth rate \(f_{\gamma}(a)\) is given by:
\[ \begin{align}\begin{aligned} f_{\gamma}(a) = \Omega_m^{\gamma} (a)\\with :math: `\gamma` in LCDM, given approximately by: .. math::\\ \gamma = 0.55\end{aligned}\end{align} \]