List of all FoF group halo IDs

Richard Stiskalek
  • 6 Jun '23

Hey,

Is there some way to obtain all all halo IDs ("hid") for which I can load their particles via the function below please? Is that the ID of the group's first subhalo? If so, then it seems that for some of those I occasionally get an error.

il.snapshot.loadHalo(basepath, 99, hid, "dm")

Thank you!

Dylan Nelson
  • 6 Jun '23

The list of all Halo IDs in a given group catalog is simply np.arange(nHalos) where nHalos is the number of halos (you can get it from loadHeader()).

The "group's first subhalo" i.e. GroupFirstSub is a Subhalo ID, not a Halo ID.

Ángeles Moliné
  • 29 Nov

Hi Dylan,

Could you please give an example on how to get the halo IDs using loadHeader()?
Thanks in advance

Dylan Nelson
  • 29 Nov

A list of all halo IDs at a given snapshot can be made as

import illustris_python as il
import numpy as np

basePath = 'sims.TNG/TNG100-1/output/'
snap = 99
header = il.groupcat.loadHeader(basePath, snap)
num_halos = header['Ngroups_Total']
halo_ids = np.arange(num_halos)
Ángeles Moliné
  • 3 Dec

Thanks a lot

  • Page 1 of 1