Fix pixel <-> sky conversions for edge cases#676
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR includes 3 fixes to the region
to_pixelandto_skyconversions for a few edge cases:Fixed the
to_skyandto_pixelconversions for elliptical and rectangular regions (and their annulus variants) so that the orientation is correct for a WCS with a flipped parity (e.g., North down, East left). Previously, such regions were mirrored about the x-axis.Fixed the local WCS Jacobian computation used by the
to_skyandto_pixelmethods so that it is well-conditioned at the celestial poles and across the RA = 0/360 degree wraparound.Fixed rectangular regions to use the SVD-based ellipse
to_skyandto_pixelconversions so that they round-trip correctly with a sheared WCS. [Fix pixel <-> sky conversions for edge cases #676]Based on astropy/photutils#2286 and astropy/photutils#2288