pynbody.analysis.cosmology.tau#
- pynbody.analysis.cosmology.tau(f, z=None, unit='Gyr')[source]#
Calculate the conformal age of the universe in the snapshot f by integrating the conformal Friedmann equation.
The output is given in the specified units. If a redshift z is specified, it is used in place of the redshift in the output f.
- Parameters:
f (SimSnap) – The snapshot from which to obtain the cosmological parameters.
z (float, list, or np.ndarray, optional) – The redshift(s) at which to calculate the age of the universe. If None, the redshift of the snapshot is used.
unit (str, optional) – The units in which to return the age of the universe. Default is ‘Gyr’.
- Returns:
The conformal age of the universe at the specified redshift(s).
- Return type:
SimArray | float