Skip to content

Fix pixel <-> sky conversions for edge cases#676

Merged
larrybradley merged 10 commits into
astropy:mainfrom
larrybradley:fix-wcs-sky-pixel
Jun 5, 2026
Merged

Fix pixel <-> sky conversions for edge cases#676
larrybradley merged 10 commits into
astropy:mainfrom
larrybradley:fix-wcs-sky-pixel

Conversation

@larrybradley

Copy link
Copy Markdown
Member

This PR includes 3 fixes to the region to_pixel and to_sky conversions for a few edge cases:

  • Fixed the to_sky and to_pixel conversions 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_sky and to_pixel methods 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_sky and to_pixel conversions 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

@larrybradley larrybradley added this to the 0.12 milestone Jun 5, 2026
@larrybradley larrybradley merged commit 0e8fc73 into astropy:main Jun 5, 2026
28 of 29 checks passed
@larrybradley larrybradley deleted the fix-wcs-sky-pixel branch June 5, 2026 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant