-
-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix submap not using all four corners of the input rectangle #4727
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About all set to go, pending like some faster RTD docs build debugging...
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks 👍 apart from
- Removing the new test file
- Updating the changelog, stating clearly how users can change code to adapt to this change
submap now once again correctly identifies the smallest pixel box which contains all four corners of the input rectangle.
84a7c99
to
e036349
Compare
e036349
to
bf7f1b3
Compare
I have upgraded the changelog entry to breaking, mainly to put it towards the top of the changelog for 2.1 so people see it, also added the code to restore behaviour. I have removed the roll test file and update the fixture. |
test fails are real. |
this PR is hurting me brain - good catch on that bug Does this change what submap returns for cases where wcs axes and pixel axes are perfectly aligned? |
No in this case the assumption holds and the results will be the same. |
Yeha, mine too. Figuring out the regression test really hurt. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
That test fail is fair, and probably expected (array size makes more sense now I think..) - the docsting just needs updating
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woops, sorry for missing the failing test, will mark as needs changes until it's fixed
I have updated the doctests and found a bug in the process. I was assuming that the frame was HPC. I have now rectified this, added a test for using HGS coords with a map in HPC and HGS and also added a mask test for good measure. |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/backport 2.0
# Navigate to the new directory.
cd .worktrees/backport
# Cherry-pick all the commits of this pull request and resolve the likely conflicts.
git cherry-pick 9ec00247c34dc503ead49f1bae763ebc8ced1b2e cb23d08ca8e8c1167a651f51e7f4f6fbd517aded df1324426d4b4f20eebfb342642af611569a58f0 bf7f1b334e8414841e3914837694853b60aca75b f99faf6855868f3ca84bca9607b2b56d502dd826
# Create a new branch with these backported commits.
git checkout -b backport-4727-to-2.0
# Push it to GitHub.
git push --set-upstream origin backport-4727-to-2.0
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/backport Then, create a pull request where the |
Fixes #4725
Fixes #4734