uvex_transients.utils.cosmology.redshift_to_lookback_time#

uvex_transients.utils.cosmology.redshift_to_lookback_time(z: float | NDArray[float64], cosmology: Cosmology | None = None) → Quantity[source]#

Compute the lookback time corresponding to a given redshift.

Parameters:
  • z (float or array-like) – Cosmological redshift.

  • cosmology (~astropy.cosmology.FLRW, optional) – Cosmology used to compute the lookback time. If None, the configured default cosmology is used.

Returns:

Lookback time to redshift z with units of time.

Return type:

~astropy.units.Quantity

Notes

The lookback time is the difference between the current age of the universe and the age of the universe at redshift z:

\[t_{\mathrm{lookback}} = t_0 - t(z)\]

Examples

>>> redshift_to_lookback_time(0.5)
<Quantity 5.19623953 Gyr>