You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Discussion] Create a set of rules around cropping and pixel inclusion #8276
Activity
CyclingNinja commentedon Jun 19, 2025
If you submap(-0.5, 0.5) you get a (1,1) array, ditto for (-0.25, 25)
Currently you can pass pixel coords to submap, but we don't want that to be the case going forward.
Fundamentally, any pixels within your bounding box, should be returned. However there are some very specific edgecases.
Should crop be inclusive of exclusive?
we're defining a pixel as -0.5->+0.499999.
hayesla commentedon Jun 19, 2025
for context to help with our discussions 🫠
CyclingNinja commentedon Jun 19, 2025
Now agreed that submap should be inclusive as is the case currently on NDCube crop. i.e. submap includes top right.
So in the case of
submap(bottom_left=(-0.5, -0.5) * u.pix, top_right=(0.5, 0.5) * u.pix)returns a 2 x 2 map.Because
0.5, 0.5is in the top right most pixel.ayshih commentedon Jun 19, 2025
I strongly disagree with this result
alasdairwilson commentedon Sep 14, 2026
@ayshih can I assume this has been resolved in sunpy/ndcube#874 and this can be closed?