Transforming Coordinates to Central Subhalo-Centered Frame in TNG50-1

AMIT MONDAL
  • 12 Jul

I have downloaded central subhalos from the TNG50-1 simulation across different halo masses (M200) corresponding to FoF (dark matter) halos. The particle coordinates provided are comoving and defined within the periodic simulation domain (BoxSize).
How can I shift these coordinates so that they are centered on the position of the central subhalo?

Dylan Nelson
  • 13 Jul

You just need to get the position of the central subhalo, i.e. SubhaloPos[i], then for each of the x, y, and z coordinates, subtract this value from the cutout Coordinates. If the subhalo is near the edges of the box at all, you will need to be careful of (i.e. correct for) the periodic boundary conditions.

AMIT MONDAL
  • 13 Jul

Thank you, Dylan!

  • Page 1 of 1