summaryrefslogtreecommitdiff
path: root/lib/stwcs/distortion/mutil.py
diff options
context:
space:
mode:
authorhack <hack@stsci.edu>2014-04-02 16:03:23 -0400
committerhack <hack@stsci.edu>2014-04-02 16:03:23 -0400
commit49ed98f36b448b2ed06df373df0df3615395d45a (patch)
tree13a9afb2564d31b91dd7d059f1c83d9c8c14a2f5 /lib/stwcs/distortion/mutil.py
parent36201df3fe7378d0a181bcbae5195f8f296c13bf (diff)
downloadstwcs_hcf-49ed98f36b448b2ed06df373df0df3615395d45a.tar.gz
Support has been added for optional TDD Alpha term to be read in from IDCTAB primary header for new (non-Jay Anderson) TDD correction.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@30795 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'lib/stwcs/distortion/mutil.py')
-rw-r--r--lib/stwcs/distortion/mutil.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/stwcs/distortion/mutil.py b/lib/stwcs/distortion/mutil.py
index ea131f9..07ec9b4 100644
--- a/lib/stwcs/distortion/mutil.py
+++ b/lib/stwcs/distortion/mutil.py
@@ -262,13 +262,18 @@ def read_tdd_coeffs(phdr, chip=1):
skew_coeffs['TDD_A'] = None
skew_coeffs['TDD_B'] = None
skew_coeffs['TDD_CY_BETA'] = None
+ skew_coeffs['TDD_CY_ALPHA'] = None
if "TDD_CYB1" in phdr:
# We have 2014-calibrated TDD correction to apply, not J.A.-derived values
print "Using 2014-calibrated TDD correction..."
skew_coeffs['TDD_DATE'] = phdr['TDD_DATE']
cyb_kw = 'TDD_CYB{0}'.format(int(chip))
- skew_coeffs['TDD_CY_BETA'] = phdr[cyb_kw]
+ skew_coeffs['TDD_CY_BETA'] = phdr.get(cyb_kw,None)
+ cya_kw = 'TDD_CYA{0}'.format(int(chip))
+ tdd_cya = phdr.get(cya_kw,None)
+ if tdd_cya == 0 or tdd_cya == 'N/A': tdd_cya = None
+ skew_coeffs['TDD_CY_ALPHA'] = tdd_cya
else:
if "TDDORDER" in phdr:
n = int(phdr["TDDORDER"])