SWIFTSIM / HBTplus

HBTplus halo finder adapted for the FLAMINGO and COLIBRE simulations
0 stars 0 forks source link

Constrain subhalo particles to assigned FOF host #26

Closed VictorForouhar closed 2 months ago

VictorForouhar commented 2 months ago

This branch makes it so that subhaloes are constrained to the FOF they were assigned to, based on their most bound tracer particles. Particles associated to a subhalo that are hostless still retain the association. This change prevents duplication of particles across FOF groups, but some cases remain, to be dealt with in a separate pull request.

The changes involve loading the FOF host id in LoadSnapshot, to update the value of HostId for the particles within Subhalo Particle vectors. We can likely save some I/O time since we are reading the same properties twice (including coordinates, velocities, etc).

VictorForouhar commented 2 months ago

TODO:

VictorForouhar commented 2 months ago

I have tested these changes in the COLIBRE test box. I will now run it on the low res FLAMINGO.

VictorForouhar commented 2 months ago

I ran the suite of tests on a HBT+ FLAMINGO L1000N0900 catalogue to compare how this new branch affects the number of duplicate particles and number of particles beyond the FOF assigned to its host.

Number of particles beyond FOF: before = 60854, after = 0 Number of duplicate particles: before = 68308, after = 6265 Number of duplicate particles relative to total bound ones: before = 0.03%, after = 0.003%. Number of unique (resolved) Tracks that are affected by duplications: before = 10832, after = 538.

As we discussed yesterday, the way in which merging is currently done can result in some particle duplications within the same FOF group. My next pull request will deal with those.