A question on how are the particles indexed

Hangci Du
  • 1
  • 23 Sep '22

As we know from the Data Specification:

particles within the snapshot files are sorted according to their group/subgroup memberships, according to the FoF or Subfind algorithms. Within each particle type, the sort order is: GroupNumber, SubgroupNumber, BindingEnergy, where particles belonging to the group but not to any of its subgroups ("fuzz") are included after the last subgroup.

And we also know, the ParticleID of particles are:

Constant for the duration of the simulation.

So, as my understanding, in the last z=0 snapshot, the particleID inside a specific subhalo should have been totally shuffled to a chaotic status. However, when I try to find the subhaloID based on the ParticleID referring to this thread, I found the code means: The particles of specific type is indexed according to the subhaloID (all the particleID in a continuous range are inside a specific subhalo). I also checked Subhalo/SnapByType in the offset hdf5 file, I found the first particleID of a subhalo always increases with the subhaloID.

That is odd: how can the particleID be constant during simulation and indexed according to its subhaloID in a snapshot happen at the same time?

Dylan Nelson
  • 24 Sep '22

Perhaps you are mixing up IDs and indices, they are different.

Each particle has an ID, and this is constant in time.

The ordering of these particles in a snapshot, i.e. the indices that each particle has, can be arbitrary.

We chose to order them according to "group/subgroup membership", which changes in time.

The index of a given particle (i.e. its location in the snapshot) changes in time.

  • Page 1 of 1