summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhack <hack@stsci.edu>2010-05-26 13:49:27 -0400
committerhack <hack@stsci.edu>2010-05-26 13:49:27 -0400
commit05439c51eb88fd5f38705bd811466565c60c9894 (patch)
tree699a3fbe6e1cffdd166081935285eac8cab7d1e4
parent9328e826012e369da3d689c72cf2be17e026b69c (diff)
downloadstwcs_hcf-05439c51eb88fd5f38705bd811466565c60c9894.tar.gz
The default value for 'skew_coeffs' in STWCS.distortion.mutil needed to be reset to None so that logic in STWCS.updatewcs.corrections can recognize that there are no TDD coefficients available from the IDCTAB for use. The default set of skew_coeffs in STWCS.updatewcs needed to be updated to include the TDDORDER key and value with a default value of 1 as appropriate for the hard-coded default coeffs. These changes were needed to allow betadrizzle/updatewcs to work correctly with IDCTAB files which do not yet have the TDD coeffs in the PRIMARY header. WJH
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@9438 fe389314-cf27-0410-b35b-8c050e845b92
-rw-r--r--distortion/mutil.py2
-rw-r--r--updatewcs/corrections.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/distortion/mutil.py b/distortion/mutil.py
index d656b32..2effade 100644
--- a/distortion/mutil.py
+++ b/distortion/mutil.py
@@ -250,7 +250,7 @@ def read_tdd_coeffs(phdr):
n = int(phdr["TDDORDER"])
else:
print 'TDDORDER kw not present, TDD correction will not be applied.'
- return skew_coeffs
+ return None
a = np.zeros((n+1,), np.float64)
b = np.zeros((n+1,), np.float64)
diff --git a/updatewcs/corrections.py b/updatewcs/corrections.py
index eac4b6e..861b8ab 100644
--- a/updatewcs/corrections.py
+++ b/updatewcs/corrections.py
@@ -95,7 +95,7 @@ class TDDCorr(object):
# Using default pre-SM4 coefficients
skew_coeffs = {'TDD_A':[0.095,0.090/2.5],
'TDD_B':[-0.029,-0.030/2.5],
- 'TDD_DATE':2004.5}
+ 'TDD_DATE':2004.5,'TDDORDER':1}
if not isinstance(ext_wcs.date_obs,float):
year,month,day = ext_wcs.date_obs.split('-')