Closed Joeybraspenning closed 7 months ago
I honestly don't even know how this would happen
Ah - I think this must be related to the changes here where people wanted the ability to create non-square images: https://github.com/SWIFTSIM/swiftsimio/blob/16cbe91b0de4d081b71bd262baf1882c6ca48c8b/swiftsimio/visualisation/projection.py#L260.
I am guessing there is some round-off error here and we probably want to be using math.ceil instead of int which takes the floor?
When using the
project_gas()
method, sometimes the returned shape is not square. For FLAMINGO this seems to be the case for a fraction of the haloes. These do not cross the edge of the box, and the list provided to the 'region' keyword gives a square area.Here's a working example for the 190th halo in the L1000N1800, we confirmed that for example halo 180 does not have this problem (and out of the few hundred we tried, only a handful fail). The 'flux' object returned by
project_gas()
has shape (64,63) in this case.