Lookback time values in simulation page

Rodrigo Freitas
  • 11 Nov '23


I noticed that the values of lookback time in the TNG50-1 page (https://www.tng-project.org/data/downloads/TNG50-1/) differ from what I obtained with astropy.cosmology classes.

Example: On the page, the lookback time for z = 0.03 (snap 96) is 0.475 Gyr. However, I got 0.424 Gyr, 0.424 Gyr and 0.408 Gyr by using Planck15, Planck18 and WMAP7 cosmologies in astropy.

Here is what I did:

>>> from astropy.cosmology import Planck15, Planck18, WMAP7
>>> Planck15.lookback_time(0.03)
<Quantity 0.42369697 Gyr>
>>> Planck18.lookback_time(0.03)
<Quantity 0.42417742 Gyr>
>>> WMAP7.lookback_time(0.03)
<Quantity 0.40802497 Gyr>

Are you using a different method to compute the lookback times shown in the table of the mentioned page?

Thank you in advance.

Dylan Nelson
  • 12 Nov '23

Hi Rodrigo,

This is probably using the following simple function:

    def age_of_universe_gyr(self, redshift=None):
        #(Peebles, p. 317, eq. 13.2)
        omega_m = self.simulation.omega_0
        omega_fac = math.sqrt( (1-omega_m)/omega_m ) * pow(1+redshift,-3.0/2.0)
        H0_kmsMpc = 100.0 * self.simulation.hubble
        age = 2.0 * math.asinh(omega_fac) / (H0_kmsMpc * 3 * math.sqrt(1-omega_m))
        age *= 3.085678e+19 / 3.15567e+7 / 1e9
        return age

Note that values you see listed on that page are rounded. I imagine if you use the TNG cosmology, you should get to a very similar answer with astropy.

Rodrigo Freitas
  • 13 Nov '23

Thank you Dylan.

I assume the difference in the times comes from the method. I am numerically integrating eq. 30 from Hogg's paper (https://arxiv.org/pdf/astro-ph/9905116.pdf) while the function you showed uses an analytic formula, which seems to be an approximation.

Anyway, the differences are only on de order of 50 Myr, not much larger.


  • Page 1 of 1