-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
BUG: Fix random flip in WCS orientation #2802
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.
This fixed the bug for me, thanks!
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.
Works for me, thanks!
x_bl, y_bl = self.reference_data.coords.world_to_pixel(world_bottom_left) | ||
x_tr, y_tr = self.reference_data.coords.world_to_pixel(world_top_right) | ||
|
||
x_pix_min = min(x_bl, x_tr) | ||
x_pix_max = max(x_bl, x_tr) | ||
y_pix_min = min(y_bl, y_tr) | ||
y_pix_max = max(y_bl, y_tr) | ||
|
||
x_min = min(x_min, x_pix_min - 0.5) | ||
x_max = max(x_max, x_pix_max + 0.5) | ||
y_min = min(y_min, y_pix_min - 0.5) | ||
y_max = max(y_max, y_pix_max + 0.5) |
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.
I really hoped this was all it needed, glad to see that it is!
This comment was marked as resolved.
This comment was marked as resolved.
* BUG: Fix random flip in WCS orientation * TST: Update test results (cherry picked from commit 620ccfe)
* BUG: Fix random flip in WCS orientation * TST: Update test results
* BUG: Fix random flip in WCS orientation * TST: Update test results
Description
This pull request is to hopefully address the problem of Ricky (and others) sometimes seeing a WCS orientation getting flipped.
Change log entry
CHANGES.rst
? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rst
before merge. If no, maintainershould add a
no-changelog-entry-needed
label.Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.