Closed jchelly closed 2 months ago
In the final snapshot of the COLIBRE test there are 256 subhalos with 0 bound particles. Of these, 255 have most bound IDs which don't exist in the snapshot and have clearly invalid positions. The 1 remaining subhalo's position matches the position of the most bound particle in the snapshot.
We should modify the code to write a placeholder value in these cases. They should be much rarer when we modify HBT to prefer to pick collisionless particles as the MostBoundId for unresolved subhalos. At the moment it uses the most bound particle regardless of type.
I guess this is no longer a problem, given the constrains on collisionless tracers?
Yes, this was fixed by #23.
I've been doing some tests to see if HBT output can be made deterministic and this has shown that there are some uninitialized values being written to the output. Many (maybe all) subhalos with NBound=0 have values for ComovingMostBoundPosition and PhysicalMostBoundVelocity which look to be wrong (e.g. 1e-316) and vary if I repeat the run with one thread and no random sampling.
For subhalos with Nbound=0 the code should be storing the last known most bound particle ID and finding the position and velocity of that particle. Either that is not working or the particle is no longer present in the simulation.