pynbody.analysis.ramses_util.get_tform

Contents

pynbody.analysis.ramses_util.get_tform#

pynbody.analysis.ramses_util.get_tform(sim, *, times_are_proper: bool, use_part2birth: bool | None = None, part2birth_path: str = '$HOME/ramses/utils/f90/part2birth')[source]#
Convert RAMSES times to physical times for stars and replaces the original

tform array.

Parameters:
  • sim (RAMSES snapshot or subsnapshot)

  • use_part2birth (boolean, optional) – If True, use the part2birth tool (see notes below) to convert the formation times to physical times. If False, use a Python-based convertor. See notes for the default value.

  • part2birth_path (str, optional) – Path to the part2birth util. Only used if use_part2birth is also True. See notes for the default value.

  • times_are_proper (boolean, optional) – If True, tform is assumed to be in proper time. If False, it is assumed to be in conformal time.

Notes

The behaviour of the function can be customized in the configuration file.

The value use_part2birth_by_default controls whether the conversion should be made using part2birth or in Python. It can be set as follows

[ramses] use_part2birth_by_default = True # will use part2birth to convert times use_part2birth_by_default = False # will use internal Python routine

The default path to part2birth is obtained by joining the RAMSES utils path (as read from configuration) and f90/part2birth.

For example, with the following configuration,

[ramses] ramses_utils = /home/user/ramses/utils

the default path would be /home/user/ramses/utils/f90/part2birth.