yt.frontends.enzo.simulation_handling.EnzoCosmology.t_from_z

EnzoCosmology.t_from_z(z)

Compute the age of the Universe from redshift. This is based on Enzo’s CosmologyComputeTimeFromRedshift.C, but altered to use physical units. Similar to hubble_time, but using an analytical function.

Parameters:

z : float

Redshift.

See also

hubble_time

Examples

>>> co = Cosmology()
>>> print co.t_from_z(0.).in_units("Gyr")