Skip to content

Sync the WCS helpers with photutils and speed up the region sky conversions - #707

Merged
larrybradley merged 10 commits into
astropy:mainfrom
larrybradley:wcs-helpers
Sep 16, 2026
Merged

larrybradley merged 10 commits into
astropy:mainfrom
larrybradley:wcs-helpers

Conversation

@larrybradley

Copy link
Copy Markdown
Member

This syncs wcs_helpers.py with the photutils copy and applies the accompanying fixes to the region to_sky and to_pixel methods.

  • Finite differences are now central, which removes a bias of half the curvature of the distortion field.
  • A gwcs transform is evaluated with its bounding box disabled, so regions near the array edge no longer get NaN pixel scales.
  • The longitude and latitude axes are selected by component index, so a latitude-first WCS converts correctly.
  • The Jacobian evaluates the WCS once for all positions through the low-level interface, and the annuli convert both shapes with one evaluation.
  • API change: the circular regions use the geometric mean of the Jacobian singular values as the isotropic pixel scale for every WCS.

@larrybradley
larrybradley merged commit 1c70097 into astropy:main Sep 16, 2026
26 checks passed
@larrybradley
larrybradley deleted the wcs-helpers branch September 16, 2026 02:01
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