I try to extract the NextProgenitor's information(ex: mass, position...etc) on specific subhalo. I've looked at all the related Q&A in the discussion forum and tutorial, but I'm not sure if this is right.
First, I use il.sublink.loadTree function to extract the NextProgenitorID :
Then if I want to know NexProgenitor's Mass (Next Progenitor ID=51122030) , Is it right to look for it in the following way?
Yes that works, i.e. the documentation of the NextProgenitorID is "The SubhaloID of the subhalo with..." so you need to find the entry of the full tree with the matching SubhaloID, as you do.
Note if you need to do this a lot, e.g. for all trees, then you may need to adopt a more performant approach. Namely, you do not need to use np.where() to find the entry, because the entries are ordered. You can see this in action in the sublink.py file.
Thank you so much for your reply and for your tips on this!
I have one more question, I would like to apply the same process in Lhalotree.
it seems that Lhalotree provides only SubFindID('SubhaloNumber') instead of SubhaloID.
but, in LhaloTree, NextProgenitor is provided as a SubhloID, so it does not match each other.
How do I get NextProgenitor information in LhaloTree?
LHaloTree also has an entry called NextProgenitor, and the concept is the same. Based on the description "The index of the next subhalo from the same snapshot which shares the same descendant, if any (-1 if this is the last). Indexes this TreeX group." I would say that the value is the direct index into the datasets of the group (each tree in LHaloTree resides in a separate HDF5 group).
Oh, that means that if NextProgenitorID is 615461(Snapshot=98), this index is used in Group catalogs (Snapshot=98) not in LhaloTree, is it right?
"Indexes this TreeX group." means that the index is used in the "GroupX" (where X is a number) of the LHaloTree files.