A student here was asking whether it was possible to select multiple spatial regions - basically wanting to make repeated calls to constrain_spatial to build up a more complicated region. On inspection this wasn't supported but seems to be very easy to implement. I just added an optional intersect argument to constrain_spatial and set the default to False (the previous behaviour). If it's True then the new region is intersected with any existing spatial mask. I checked carefully that there are no other member variables of SWIFTMask that need special treatment if a user does this - as far as I can tell it's a nearly trivial change that works seamlessly with the existing code. I added test coverage and a mention in the narrative docs.
A student here was asking whether it was possible to select multiple spatial regions - basically wanting to make repeated calls to
constrain_spatial
to build up a more complicated region. On inspection this wasn't supported but seems to be very easy to implement. I just added an optionalintersect
argument toconstrain_spatial
and set the default toFalse
(the previous behaviour). If it'sTrue
then the new region is intersected with any existing spatial mask. I checked carefully that there are no other member variables ofSWIFTMask
that need special treatment if a user does this - as far as I can tell it's a nearly trivial change that works seamlessly with the existing code. I added test coverage and a mention in the narrative docs.