I am trying to cross-match z=0 sublink subhalos in TNG100-1 and TNG300-1 with their equivalent DMO runs.
As I understand it, the file subhalo_matching_to_dark.hdf5 contains lists of SubfindID values in the dark run, ordered by the IDs in the baryonic simulation. So if I have a list of unique IDs A, from the baryonic run, and I call data['Snapshot_99']['SubhaloIndexDark_SubLink'][A], it returns the corresponding IDs in the dark simulation.
I have done this and found that several dark IDs appear repeatedly, which cannot be right as this assumes a 1-to-1 correspondence. So what am I doing wrong, and is there a way to enforce a unique translation from baryonic to dark sublink IDs?
I copy the documentation here (in short, I would suggest to use SubhaloIndexDark_LHaloTree instead, as this provides a 1-to-1 match.
The first array SubhaloIndexDark_LHaloTree is based on the LHaloTree matching algorithm. The matching is bidirectional, i.e. TNG <-> DMO. In each case, the best subhalo candidate is chosen as that with the largest number of matching DM particles (α=0
). Only if the candidate in each direction agrees (bijective), then these matches are saved.
The second array SubhaloIndexDark_SubLink is based on the SubLink weighting algorithm. The direction of the matching is TNG -> DMO, i.e. for each subhalo in the baryonic physics box a best match is found in the DMO run.
Thanks Dylan, quick follow-up to this.
Using either of the two fields, I notice that central subhalos in the baryonic run are not necessarily matched to dark centrals. For instance, subhalo 482814 in TNG100-1 is matched to subhalo 20 in TNG100-1-Dark, which is a satellite of the most massive halo.
So how can we trust whether centrals are accurately matched to centrals, and satellites to satellites? Why does this happen?
This should be rare? If it occurs e.g. 1% of the time (for massive halos), then you could discard these.
Otherwise, you would want to look in more detail and see if the matches are reasonable. Is 482814 in TNG100-1 near the most massive halo? Perhaps it is slightly "ahead" (in time) in TNG100-1-Dark and thus became a satellite?
Indeed it is, the subhalos appear to be ~1640 kpc/h apart. That makes sense.