Repository navigation
0.3.0 — 2026-11-16
Host-side WCS handling now goes through
mapprojax.from_astropy, which fixes three latent defects and changes what
is refused.
Fixed
- Frames at different FK5 equinoxes were treated as identical. Frame
equivalence was decided by comparing frame names, so two FK5 headers with
EQUINOX=2000andEQUINOX=1950returned the identity rotation and dropped
a 50-year precession: 2234.6 px at 1"/px over a 512" field. The rotation is
now computed whenever the frames are notis_equivalent_frame, and checked
to be orthonormal with determinant +1. ICRS<->FK5(J2000) already rotated and
still does; that pair is now covered by a regression test. - A
preserve_units=Trueheader was read as if its units were degrees.
WithCUNIT='arcsec'andCRVAL=(10, 20), the old extractor fed arcsec
straight into the kernel, so the reference pixel landed 22.2687 deg from
the origin on the sky where astropy puts it 0.006211 deg away -- a
22.2625 deg disagreement, ≈80,145 px at 1"/px. Celestial units are now
converted per axis; the arcsec and degree encodings of the same header
agree to better than 1e-4 px, and to the astropy pixel oracle. - TPV headers were silently flattened to TAN. Astropy reports
ctype == 'RA---TAN',has_distortion == Falseand no PV cards for a TPV
header while still applying the distortion, and the transform cache keyed on
those raw attributes, so a TPV WCS shared a cache entry with a plain TAN
WCS. TPV is now refused. - A cube reported mapprojax's internal error. A 3-D
output_projection
now refuses withpass a two-axis celestial WCS, e.g. wcs.celestial, for a
Headerand aWCS, before any output grid is allocated. (reprojax's own
guard; the message is notfrom_astropy's.)
Changed
- Refusals raise
ValueError, notNotImplementedError. Projection and
FITS-convention refusals come frommapprojax.from_astropyand carry its
message. reprojax raises its ownValueErrorfor the frame allow-list, a
non-rigid rotation, a non-2-D WCS, an unsupportedorderorkernel, an
uninferableshape_out, and a badmatrix_precision. A caller catching
NotImplementedErrormust catchValueErrorinstead. A malformed header can
still fail earlier, insideastropy.wcs.WCS, before reprojax runs. - New refusals: inputs 0.2.0 returned a result for.
- any PV card on TAN, including the identity
PV1_1 = 0.0— 0.2.0
ignored PV entirely; - TAN at
CRVAL2 = +90, because wcslib's default there is
LONPOLE = 0. Note the asymmetry:CRVAL2 = -90is still accepted,
since its default is 180; - lookup tables (
cpdis1/cpdis2,det2im1/det2im2); - TPV, and TPD carried as
CQDIS/DQcards. Astropy reports both as
plainRA---TANwithhas_distortion == Falseand no PV cards, so 0.2.0
accepted them and silently dropped the distortion; - FK4 and FK4-NO-E headers. FK4's E-terms are not a rotation, so it is
refused rather than approximated; FK4-NO-E is a rigid rotation and could
be allow-listed later. The ecliptic axes (ELON/ELAT) are refused
too: astropy resolves them to ICRS, which would be silently wrong.
- any PV card on TAN, including the identity
- Already refused by 0.2.0, now as
ValueErrorwithfrom_astropy's
message. Unsupported projection codes astropy can still construct — AZP, ZEA
and the like. 0.2.0 raisedNotImplementedErrorfor these; the type changed,
nothing else did. - Unreachable in both versions. A literal
RA---TPDCTYPE fails inside
astropy.wcs.WCS(InconsistentAxisTypesError), and-TABwithout its
WCS-TABHDU raisesMemoryErrorthere. Both die atWCS(header), before
reprojax runs. - Dependency floor:
mapprojax[astropy]>=0.4.0,<0.5. Both CI
constraint files move tomapprojax==0.4.0, and the extra's
astropy>=7.2.0floor is already satisfied on both stacks.
Internal
_astropy_wcsnow owns one validated conversion seam
(validated_wcs), an explicit frame allow-list (frame_descriptor) and a
validated rotation (_rotation_from_descriptors);projection_code,
_wcs_fingerprintand_PROVIDERSare gone.- The transform cache key is built from the validated leaves plus a frame
descriptor, after validation rather than before, so an unsupported input
cannot be served a cached transform. Warmbuild_transformcosts one
eager conversion per WCS (~0.4 ms without SIP, ~1.5 ms with order-3 SIP).
Install
pip install reprojax==0.3.0| File | SHA-256 |
|---|---|
reprojax-0.3.0-py3-none-any.whl |
d6c4e02e1b1708584e6c3ebe4012c4f2e02bb5283d86c15f5ff8c114c193eec3 |
reprojax-0.3.0.tar.gz |
59b537297f18343b7c73e9fb423adadc4631ccd25cafabce48f6f4f45c45a92a |