Open apontzen opened 4 months ago
Geometric filters wrap particles around the box using simple logic here:
https://github.com/pynbody/pynbody/blob/master/pynbody/filt/geometry_selection.hpp#L11
However, if the snapshot has been rotated so that the box axes don’t align with the coordinate axes, this will give wrong results.
In the same way that the KDTree now disables periodicity on a rotated box, so too should these filters.
A unified approach to this would be best, setting/unsetting a flag that tracks when a simulation is in its original orientation.
Geometric filters wrap particles around the box using simple logic here:
https://github.com/pynbody/pynbody/blob/master/pynbody/filt/geometry_selection.hpp#L11
However, if the snapshot has been rotated so that the box axes don’t align with the coordinate axes, this will give wrong results.
In the same way that the KDTree now disables periodicity on a rotated box, so too should these filters.
A unified approach to this would be best, setting/unsetting a flag that tracks when a simulation is in its original orientation.