How to transform snapnum to time?

Jinning Liang
  • 29 Sep

Hi!
When I want to transform snapnum to time(Gyr), I find out that the time in TNG are represented as snapnum. (ill.groupcat.loadHeader(BASE_PATH_ILLUSTRIS_1, j)['Time'] cannot return cosmic time) But I want to use cosmic time(Gyr) to do some analysis. What should I do? Does TNG have this function? Or I have to do this personally.

Looking forward to your reply!

Best wishes,
Jinning

Dylan Nelson
  • 29 Sep

Hello,

The Time gives the cosmic scale factor (a). You can convert this to age of the universe, or lookback time, or similar values, using e.g. astropy.cosmology, or you can implement yourself a simple equation for flat cosmologies e.g. the Peebles textbook eq 13.2.

Jinning Liang
  • 29 Sep

Hello! That's what I want! Thanks for your help!

  • Page 1 of 1