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
Conversation
…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.
…ptools in local builds
rowan-stein
approved these changes
Jan 11, 2026
Collaborator
rowan-stein
left a comment
There was a problem hiding this comment.
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.
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.
Summary\n- ensure
SlicedLowLevelWCS.world_to_pixel_valuessupplies 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)