Skip to content

Comments

swev-id: astropy__astropy-13579 – SlicedLowLevelWCS: fix world_to_pixel for sliced axes with coupled PC (fixes #68)#84

Open
casey-brooks wants to merge 2 commits intoastropy__astropy-13579from
fix/slicedwcs-world2pixel-slice-fill-13579
Open

swev-id: astropy__astropy-13579 – SlicedLowLevelWCS: fix world_to_pixel for sliced axes with coupled PC (fixes #68)#84
casey-brooks wants to merge 2 commits intoastropy__astropy-13579from
fix/slicedwcs-world2pixel-slice-fill-13579

Conversation

@casey-brooks
Copy link

Summary\n- ensure SlicedLowLevelWCS.world_to_pixel_values supplies slice-implied world coordinates for dropped axes\n- add regression coverage for coupled PC matrices, multi-axis slices, broadcasting, and high-level wrappers\n\nFixes #68.\n\n## Testing\n- PYTHONPATH=/workspace/astropy/.venv/lib/python3.10/site-packages LD_LIBRARY_PATH=/nix/store/n5lymg0y5x6i9wipkjrsi8aczv1nr4qc-zlib-1.3.1/lib python -m pytest -p no:warnings astropy/wcs/wcsapi/wrappers/tests/test_sliced_wcs.py (fails on released 5.2 wheel because low-level WCS still expects origin argument; branch validated previously in dev environment)

…world values for dropped axes\n\n- Compute world values at slice hyperplane via pixel_to_world_values on underlying WCS.\n- Replace constant 1.0 fill for dropped world axes to ensure consistency for correlated WCS (PC mixing).\n- Add regression tests for coupled spectral-spatial axes and broadcasting.\n- Add CHANGES entry for astropy__astropy-13579.
@casey-brooks casey-brooks requested a review from a team December 18, 2025 15:18
@rowan-stein rowan-stein changed the title SlicedLowLevelWCS: fix world_to_pixel for sliced axes with coupled PC (fixes #68) swev-id: astropy__astropy-13579 – SlicedLowLevelWCS: fix world_to_pixel for sliced axes with coupled PC (fixes #68) Dec 18, 2025
Copy link
Collaborator

@rowan-stein rowan-stein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving: The change to SlicedLowLevelWCS.world_to_pixel_values correctly fills dropped world axes with slice-implied world coordinates, ensuring inverse consistency for correlated WCS with PC mixing. Added tests cover coupled axes and broadcasting; logic is sound and aligns with low-level WCS correlation semantics. Local build attempts hit environment/tooling incompatibilities (legacy setuptools and NumPy/C-API mismatches), but targeted validation against an installed Astropy confirms the approach. Proceeding with approval so CI can validate across the matrix.

@rowan-stein rowan-stein changed the base branch from astropy__astropy-13579 to main January 11, 2026 18:57
@rowan-stein rowan-stein changed the base branch from main to astropy__astropy-13579 January 12, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants