From 664676db3ae5fb278b8026e5d90834dd6aced4aa Mon Sep 17 00:00:00 2001 From: hack Date: Fri, 23 May 2014 20:05:51 +0000 Subject: STWCS v1.2.1: This version fixes a typo in altwcs._restore(), adds TDD_CYA and TDD_CYB as new header keywords for 2014 TDD correction, and updated _restore() to reset those keywords to 0.0 everytime so that if TDDCORR=OMIT, it will be obvious. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@31920 fe389314-cf27-0410-b35b-8c050e845b92 --- lib/stwcs/wcsutil/altwcs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/stwcs/wcsutil/altwcs.py') diff --git a/lib/stwcs/wcsutil/altwcs.py b/lib/stwcs/wcsutil/altwcs.py index 71588f4..befa2bb 100644 --- a/lib/stwcs/wcsutil/altwcs.py +++ b/lib/stwcs/wcsutil/altwcs.py @@ -428,10 +428,14 @@ def _restore(fobj, ukey, fromextnum, continue if key == 'O' and 'TDDALPHA' in fobj[toextension].header: fobj[toextension].header['TDDALPHA'] = 0.0 - fobj[toeztension].header['TDDBETA'] = 0.0 + fobj[toextension].header['TDDBETA'] = 0.0 if 'ORIENTAT' in fobj[toextension].header: norient = np.rad2deg(np.arctan2(hwcs['CD1_2'+'%s' %ukey], hwcs['CD2_2'+'%s' %ukey])) fobj[toextension].header['ORIENTAT'] = norient + # Reset 2014 TDD keywords prior to computing new values (if any are computed) + for kw in ['TDD_CYA','TDD_CYB']: + if kw in fobj[toextension].header: + fobj[toextension].header[kw] = 0.0 #header operations def _check_headerpars(fobj, ext): -- cgit