I'm trying to obtain the list of subhalo satellites for a given halo in TNG50. The way that I've approached this problem is to load the merger tree of the halo (using its subfindID), and walk across the "NextSubhaloInFOFGroupID" parameter in the tree at fixed snapshot. However, I'm having trouble linking the "NextSubhaloInFOFGroupID" into its subfindID in order to load its properties.
For example, I've written the following simple code, based on the il.sublink.numMergers() function:
I'm trying to obtain the list of subhalo satellites for a given halo in TNG50. The way that I've approached this problem is to load the merger tree of the halo (using its subfindID), and walk across the "NextSubhaloInFOFGroupID" parameter in the tree at fixed snapshot. However, I'm having trouble linking the "NextSubhaloInFOFGroupID" into its subfindID in order to load its properties.
For example, I've written the following simple code, based on the il.sublink.numMergers() function:
However, I'm getting that the "shIndex" is out of bounds for the tree. Am I perhaps reading in the tree in the wrong way?
Your help would be greatly appreciated. Thanks very much in advance!
Hi Jesse,
If you want the list of subhalos that are satellites of a given halo, at one snapshot, there isn't any need to use the merger trees.
You can directly generate the list of satellite subhalo IDs using "GroupFirstSub" and "GroupNsubs".