Skip to content

Fix CTYPE parsing for WCS with SIP distortion extensions#52

Merged
astrofrog merged 1 commit into
mainfrom
fix-sip-ctype-parsing
Mar 11, 2026
Merged

Fix CTYPE parsing for WCS with SIP distortion extensions#52
astrofrog merged 1 commit into
mainfrom
fix-sip-ctype-parsing

Conversation

@astrofrog
Copy link
Copy Markdown
Owner

The projection type was extracted from the last 3 characters of CTYPE, which fails for SIP extensions (e.g., "RA---TAN-SIP" would give "SIP" instead of "TAN").

Now extracts the projection from the fixed position [5:8] which works for both standard CTYPE ("RA---TAN") and SIP-extended CTYPE ("RA---TAN-SIP").

Fixes #26

The projection type was extracted from the last 3 characters of CTYPE,
which fails for SIP extensions (e.g., "RA---TAN-SIP" would give "SIP"
instead of "TAN").

Now extracts the projection from the fixed position [5:8] which works
for both standard CTYPE ("RA---TAN") and SIP-extended CTYPE
("RA---TAN-SIP").

Fixes #26
@astrofrog astrofrog force-pushed the fix-sip-ctype-parsing branch from 8f49ce8 to 58acf26 Compare March 11, 2026 22:17
@astrofrog astrofrog merged commit 5d711b9 into main Mar 11, 2026
24 checks passed
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.

CTYPE# parsing for Projection incorrect when SIP elements present.

1 participant