Open rosteen opened 3 years ago
I'm confused by this @rosteen - isn't the spectral-cube
version of this about the spatial region? I.e., drawing like a circular region in the spatial part of the cube and then extracting the smallest cube that contains that spatial region?
To be fair, this suggestion is still useful, but I'm not sure if it's the same as the spectral-cube
method?
I think the spectral-cube
version is agnostic about spectral vs spatial dimensions - it extracts the minimum non-masked cube by trimming in whatever dimensions are needed. I was far more ambiguous than I should have been in my description here, but the intent was to duplicate the spectral-cube
functionality. @ibusko created #774 to explicitly lay out the requirement to handle the spatial dimensions.
spectral-cube
has a method to extract the minimal valid sub-cube, see the docs here. If I recall correctly one can currently extract multiple regions from aSpectrum1D
object withextract_spectral_region
, but that cuts out any data in between the regions. It would be good to have a method to extract the minimum bounding cube (or lower dimensional equivalent) of any provided regions.