Background
Computes the square of the scale-factor-dependent term \(E(a)\) in the Hubble parameter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cosmo
|
Cosmology
|
Cosmological model object containing relevant parameters (e.g., matter density, curvature, radiation density). |
required |
a
|
Union[float, ndarray]
|
Scale factor. Can be a scalar or an array. |
required |
Returns:
| Type | Description |
|---|---|
Union[float, ndarray]
|
Square of the scaling of the Hubble constant as a function of the scale factor. Returns a scalar if the input is a scalar, or an array if the input is an array. |
Notes
The Hubble parameter at scale factor \(a\) is given by:
where \(E^2(a)\) is obtained through Friedmann's Equation (see Percival (2005)):
Here, \(f(a)\) is the Dark Energy evolution parameter.
Source code in jax_cosmo/background.py
Computes the Dark Energy equation of state parameter using the Linder parametrization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cosmo
|
Cosmology
|
Cosmological parameters structure containing |
required |
a
|
Union[float, ndarray]
|
Scale factor. Can be a scalar or an array. |
required |
Returns:
| Type | Description |
|---|---|
Union[float, ndarray]
|
The Dark Energy equation of state parameter at the specified scale factor. Returns a scalar if the input is a scalar, or an array if the input is an array. |
Notes
The Linder parametrization Linder (2003) for the Dark Energy equation of state \(p = w \rho\) is given by:
\(w(a) = w_0 + w_a (1 - a)\)
Source code in jax_cosmo/background.py
Computes the evolution parameter for the Dark Energy density.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cosmo
|
Cosmology
|
Cosmological parameters structure containing |
required |
a
|
Union[float, ndarray]
|
Scale factor. Can be a scalar or an array. |
required |
Returns:
| Type | Description |
|---|---|
Union[float, ndarray]
|
The evolution parameter of the Dark Energy density as a function of the scale factor. Returns a scalar if the input is a scalar, or an array if the input is an array. |
Notes
For a given parametrization of the Dark Energy equation of state, the scaling of the Dark Energy density with time can be written as:
See Percival (2005) and note the difference in the exponent base in the parametrizations where \(f(a)\) is computed as:
In the case of Linder's parametrization for the Dark Energy equation of state, \(f(a)\) becomes:
Source code in jax_cosmo/background.py
Computes the Hubble parameter \(H(a)\) at a given scale factor \(a\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cosmo
|
Cosmology
|
Cosmological model object containing relevant parameters (e.g., matter density, curvature, radiation density). |
required |
a
|
Union[float, ndarray]
|
Scale factor. Can be a scalar or an array. |
required |
Returns:
| Type | Description |
|---|---|
Union[float, ndarray]
|
Hubble parameter at the requested scale factor \(a\) in units of [km/s/(Mpc/h)]. Returns a scalar if the input is a scalar, or an array if the input is an array. |
Notes
The Hubble parameter is calculated as:
where \(H_0\) is the Hubble constant in [km/s/(Mpc/h)] and \(E^2(a)\) is derived from Friedmann's Equation.
Source code in jax_cosmo/background.py
Computes the non-relativistic matter density \(\Omega_m(a)\) at a given scale factor \(a\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cosmo
|
Cosmology
|
Cosmological model object containing relevant parameters (e.g., matter density, curvature). |
required |
a
|
Union[float, ndarray]
|
Scale factor. Can be a scalar or an array. |
required |
Returns:
| Type | Description |
|---|---|
Union[float, ndarray]
|
Non-relativistic matter density at the requested scale factor \(a\). Returns a scalar if the input is a scalar, or an array if the input is an array. |
Notes
The evolution of matter density \(\Omega_m(a)\) is given by:
where \(\Omega_m\) is the present-day matter density parameter, and \(E^2(a)\) is derived from Friedmann's Equation. For more details, see Equation 6 in Percival (2005).
Source code in jax_cosmo/background.py
Computes the Dark Energy density \(\Omega_{de}(a)\) at a given scale factor \(a\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cosmo
|
Cosmology
|
Cosmological model object containing relevant parameters (e.g., Dark Energy density, matter density). |
required |
a
|
Union[float, ndarray]
|
Scale factor. Can be a scalar or an array. |
required |
Returns:
| Type | Description |
|---|---|
Union[float, ndarray]
|
Dark Energy density at the requested scale factor \(a\). Returns a scalar if the input is a scalar, or an array if the input is an array. |
Notes
The evolution of the Dark Energy density \(\Omega_{de}(a)\) is given by:
where \(\Omega_{de}\) is the present-day Dark Energy density parameter, \(E^2(a)\) is derived from Friedmann's Equation, and \(f(a)\) is the Dark Energy evolution parameter.
For more details, see Equation 6 in Percival (2005).
Source code in jax_cosmo/background.py
Computes the radial comoving distance \(\chi(a)\) at a given scale factor \(a\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cosmo
|
Cosmology
|
Cosmological model object containing relevant parameters (e.g., Hubble constant, matter density, Dark Energy density). |
required |
a
|
Union[float, ndarray]
|
Scale factor. Can be a scalar or an array. |
required |
log10_amin
|
float
|
Logarithm (base 10) of the minimum scale factor to consider. Default is -4, which corresponds to very high redshift. |
-4
|
steps
|
int
|
Number of integration steps for computing the radial comoving distance. Default is 512. |
512
|
Returns:
| Type | Description |
|---|---|
Union[float, ndarray]
|
Radial comoving distance \(\chi(a)\) corresponding to the specified scale factor \(a\). Returns a scalar if the input is a scalar, or an array if the input is an array. |
Notes
The radial comoving distance is computed by performing the following integration:
where \(R_H\) is the Hubble radius, and \(E(a)\) is the function dependent on cosmological parameters (calculated from Friedmann's Equation).
Source code in jax_cosmo/background.py
Computes the derivative of the radial comoving distance with respect to the scale factor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cosmo
|
Cosmology
|
Cosmological model object containing relevant parameters (e.g., Hubble constant, matter density, Dark Energy density). |
required |
a
|
Union[float, ndarray]
|
Scale factor or an array of scale factors to compute the derivative. Can be a scalar or an array. |
required |
Returns:
| Type | Description |
|---|---|
Union[float, ndarray]
|
Derivative of the radial comoving distance with respect to the scale factor at the specified scale factor(s). Returns a scalar if the input is a scalar, or an array if the input is an array. |
Notes
The expression for the derivative of the radial comoving distance with respect to the scale factor is:
where \(R_H\) is the Hubble radius, \(a\) is the scale factor, and \(E(a)\) is the function derived from Friedmann's Equation.
Source code in jax_cosmo/background.py
Computes the transverse comoving distance for a given cosmological model and scale factor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cosmo
|
Cosmology
|
Cosmological model object containing relevant parameters (e.g., Hubble constant, matter density, curvature). |
required |
a
|
Union[float, ndarray]
|
Scale factor or an array of scale factors to compute the transverse comoving distance. Can be a scalar or an array. |
required |
Returns:
| Type | Description |
|---|---|
Union[float, ndarray]
|
Transverse comoving distance corresponding to the specified scale factor(s). Returns a scalar if the input is a scalar, or an array if the input is an array. |
Notes
The transverse comoving distance depends on the curvature of the universe and is related to the radial comoving distance (\(\chi(a)\)) through the following piecewise formula:
where: - \(R_H\) is the Hubble radius. - \(\Omega_k\) is the curvature parameter. - \(\chi(a)\) is the radial comoving distance at the given scale factor \(a\).
Source code in jax_cosmo/background.py
Computes the angular diameter distance for a given cosmological model and scale factor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cosmo
|
Cosmology
|
Cosmological model object containing relevant parameters (e.g., Hubble constant, matter density, curvature). |
required |
a
|
Union[float, ndarray]
|
Scale factor or an array of scale factors to compute the angular diameter distance. Can be a scalar or an array. |
required |
Returns:
| Type | Description |
|---|---|
Union[float, ndarray]
|
Angular diameter distance corresponding to the specified scale factor(s). Returns a scalar if the input is a scalar, or an array if the input is an array. |
Notes
The angular diameter distance is expressed in terms of the transverse comoving distance as:
where:
-
\(a\) is the scale factor.
-
\(f_k(a)\) is the transverse comoving distance at the given scale factor \(a\), which depends on the curvature of the universe.
Source code in jax_cosmo/background.py
Computes the linear growth factor \(D(a)\) at a given scale factor, normalized such that \(D(a=1) = 1\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cosmo
|
Cosmology
|
Cosmology object containing relevant parameters (e.g., matter density, Hubble constant, growth rate parameters). |
required |
a
|
Union[float, ndarray]
|
Scale factor or an array of scale factors to compute the growth factor at. Can be a scalar or an array. |
required |
Returns:
| Type | Description |
|---|---|
Union[float, ndarray]
|
Growth factor computed at the requested scale factor(s). Returns a scalar if the input is a scalar, or an array if the input is an array. |
Notes
The computation of the growth factor depends on the cosmological model and its parameters. If the \(\gamma\) parameter is defined in the cosmology model, the growth factor is computed assuming the \(f = \Omega^\gamma\) growth rate. Otherwise, the usual ordinary differential equation (ODE) for growth will be solved to compute the growth factor.
Source code in jax_cosmo/background.py
Computes the growth rate \(dD/d\ln a\) at a given scale factor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cosmo
|
Cosmology
|
Cosmology object containing relevant parameters (e.g., matter density, Hubble constant, growth rate parameters). |
required |
a
|
Union[float, ndarray]
|
Scale factor or an array of scale factors to compute the growth rate at. Can be a scalar or an array. |
required |
Returns:
| Type | Description |
|---|---|
Union[float, ndarray]
|
Growth rate computed at the requested scale factor(s). Returns a scalar if the input is a scalar, or an array if the input is an array. |
Notes
The computation of the growth rate depends on the cosmological model and its parameters. If the \(\gamma\) parameter is defined in the cosmology model, the growth rate is computed assuming the \(f = \Omega^\gamma\) growth rate model. Otherwise, the usual ordinary differential equation (ODE) for growth will be solved to compute the growth rate.
The LCDM approximation to the growth rate \(f_{\gamma}(a)\) is given by:
where \(\gamma\) in LCDM is approximately given by \(\gamma \approx 0.55\).
For more details, see Equation 32 in 2019:Euclid Preparation VII (2019).
Source code in jax_cosmo/background.py
Computes the luminosity distance for a given cosmological model and scale factor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cosmo
|
Cosmology
|
Cosmological model object containing relevant parameters (e.g., Hubble constant, matter density, Dark Energy density). |
required |
a
|
Union[float, ndarray]
|
Scale factor of the Universe (inverse of 1 + redshift). Can be a scalar or an array. |
required |
log10_amin
|
float
|
Logarithm (base 10) of the minimum scale factor to consider. Default is -4, which corresponds to very high redshift. |
-4
|
steps
|
int
|
Number of integration steps for computing the radial comoving distance. Default is 512. |
512
|
Returns:
| Type | Description |
|---|---|
Union[float, ndarray]
|
Luminosity distance in units of Mpc/h (or physical distance divided by the reduced Hubble constant). Returns a scalar if the input is a scalar, or an array if the input is an array. |
Notes
The luminosity distance is computed by integrating the radial comoving distance and then applying the formula for luminosity distance. It is a measure of the distance to an object based on its luminosity.
The formula for luminosity distance is typically given by:
where \(z = \frac{1}{a} - 1\) is the redshift, and \(\chi(a)\) is the radial comoving distance.
Source code in jax_cosmo/background.py
Computes the distance modulus, which quantifies the difference between the apparent and absolute magnitudes of an astronomical object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cosmo
|
Cosmology
|
Cosmological model object containing relevant parameters (e.g., Hubble constant, matter density). |
required |
a
|
float
|
Scale factor of the Universe (inverse of 1 + redshift). |
required |
log10_amin
|
float
|
Logarithm (base 10) of the minimum scale factor to consider. Defaults to -4, corresponding to very high redshift. |
-4
|
steps
|
int
|
Number of integration steps for computing the radial comoving distance. Defaults to 512. |
512
|
Returns:
| Type | Description |
|---|---|
float
|
Distance modulus in magnitudes, which quantifies the difference between the apparent and absolute magnitudes of an object. |
Notes
The distance modulus is calculated using the luminosity distance as:
where \(d_L\) is the luminosity distance in megaparsecs.