diff options
author | hack <hack@stsci.edu> | 2014-10-06 16:20:47 -0400 |
---|---|---|
committer | hack <hack@stsci.edu> | 2014-10-06 16:20:47 -0400 |
commit | ce0b790f0d19bb1b85328ee64f83a67f5a9905f5 (patch) | |
tree | 3026e5921453432407ded5043814ae8f4ef47077 /lib/stwcs/distortion/mutil.py | |
parent | bd432a46967bb359c3a6dc5b0430436c24ff0696 (diff) | |
download | stwcs_hcf-ce0b790f0d19bb1b85328ee64f83a67f5a9905f5.tar.gz |
update to STWCS code to handle additional TDD coefficient for ACS: specifically, TDD_CXA* and TDD_CXB*.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@34759 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'lib/stwcs/distortion/mutil.py')
-rw-r--r-- | lib/stwcs/distortion/mutil.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/stwcs/distortion/mutil.py b/lib/stwcs/distortion/mutil.py index 07ec9b4..80fd6bf 100644 --- a/lib/stwcs/distortion/mutil.py +++ b/lib/stwcs/distortion/mutil.py @@ -263,17 +263,29 @@ def read_tdd_coeffs(phdr, chip=1): skew_coeffs['TDD_B'] = None skew_coeffs['TDD_CY_BETA'] = None skew_coeffs['TDD_CY_ALPHA'] = None + skew_coeffs['TDD_CX_BETA'] = None + skew_coeffs['TDD_CX_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'] + # Read coefficients for TDD Y coefficient cyb_kw = 'TDD_CYB{0}'.format(int(chip)) 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 + + # Read coefficients for TDD X coefficient + cxb_kw = 'TDD_CXB{0}'.format(int(chip)) + skew_coeffs['TDD_CX_BETA'] = phdr.get(cxb_kw,None) + cxa_kw = 'TDD_CXA{0}'.format(int(chip)) + tdd_cxa = phdr.get(cxa_kw,None) + if tdd_cxa == 0 or tdd_cxa == 'N/A': tdd_cxa = None + skew_coeffs['TDD_CX_ALPHA'] = tdd_cxa + else: if "TDDORDER" in phdr: n = int(phdr["TDDORDER"]) |