From 45634f01eea1dec911adcb5ce199cf3279f2227b Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Wed, 8 Jul 2026 14:27:22 -0400 Subject: [PATCH 1/2] initial commit. --- stwcs/distortion/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stwcs/distortion/utils.py b/stwcs/distortion/utils.py index 9fe555d..4608d33 100644 --- a/stwcs/distortion/utils.py +++ b/stwcs/distortion/utils.py @@ -111,12 +111,16 @@ def make_orthogonal_cd(wcs): pv += wcs.idctheta cs = np.cos(np.deg2rad(pv)) sn = np.sin(np.deg2rad(pv)) + pvmat = np.dot(np.array([[cs, sn], [-sn, cs]]), wcs.parity) rot = np.arctan2(pvmat[0, 1], pvmat[1, 1]) det = linalg.det(wcs.parity) if hasattr(wcs, 'idcscale') and wcs.idcscale is not None: scale = (wcs.idcscale) / 3600. # HST pixel scale provided + else: + warnings.warn("IDCSCALE is missing, computing it from CD matrix.") + scale = np.sqrt(np.abs(det)) # find as sqrt(pixel area) else: det = linalg.det(cd) From 47bd352d0bf32871f1a1f8cba123985860ed172c Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Wed, 8 Jul 2026 14:37:45 -0400 Subject: [PATCH 2/2] added changelog. --- CHANGES.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 1b4bad0..45a9218 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,14 @@ +=================== +STWCS Release Notes +=================== + + +1.7.8 (TBD) +----------- + +- Bug fix for empty scale value returned from idctab [#249] + + 1.7.7 (2026-03-05) ------------------