Fix: unexpected behavior in Cutout2D.plot_on_original#19829
Conversation
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
|
Nothing broke before/after this patch without changes to existing test. Is this functionality not tested in CI? 🤔 Need a change log. Thanks! |
mwcraig
left a comment
There was a problem hiding this comment.
Thanks again for the detailed bug report and the quick fix @juanep97.
This looks good to me -- I don't see a great way to test this. The easiest would probably to get the patch object from the axes and check its location.
I have confirmed locally that the code here fixes the issue in the bug report.
I'll defer to you on the need for a test @pllim
@larrybradley -- it would be great if you could take a quick look at this.
|
Larry is also visualization maintainer and might have a good idea on how this can be tested, so I defer to him as well. 😅 |
larrybradley
left a comment
There was a problem hiding this comment.
Thanks, @juanep97 ! I pushed a regression test for this fix.
fc84fa4 to
a682724
Compare
|
Thanks, all! Great teamwork. |
…829-on-v7.2.x Backport PR #19829 on branch v7.2.x (Fix: unexpected behavior in Cutout2D.plot_on_original)
Description
This pull request is to address unexpected behavior in
Cutout2D.plot_on_original(see Issue #19828). Current implementation spans pixels that are not included in the cutout array. The proposed change ensures the plotted region correctly covers the included pixels, completely.Fixes #19828