diff options
author | dencheva <dencheva@stsci.edu> | 2009-07-27 14:14:59 -0400 |
---|---|---|
committer | dencheva <dencheva@stsci.edu> | 2009-07-27 14:14:59 -0400 |
commit | 18314675643b403b5655f3e6898c49db7e16695c (patch) | |
tree | b7384bde7e70d7c8a5592edf1f03e9182330694e | |
parent | 7d454d26157320effa121b8c57df225a479439e1 (diff) | |
download | stwcs_hcf-18314675643b403b5655f3e6898c49db7e16695c.tar.gz |
Modified logic for TDD correction, so that it is always applied for ACS/WFC
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@8163 fe389314-cf27-0410-b35b-8c050e845b92
-rw-r--r-- | updatewcs/apply_corrections.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/updatewcs/apply_corrections.py b/updatewcs/apply_corrections.py index 88d997e..be9fac7 100644 --- a/updatewcs/apply_corrections.py +++ b/updatewcs/apply_corrections.py @@ -36,7 +36,6 @@ def setCorrections(fname, vacorr=True, tddcorr=True, dgeocorr=True, d2imcorr=Tru if 'TDDCorr' in acorr and tddcorr==False: acorr.remove('TDDCorr') if 'DGEOCorr' in acorr and dgeocorr==False: acorr.remove('DGEOCorr') if 'DET2IMCorr' in acorr and d2imcorr==False: acorr.remove('DET2IMCorr') - return acorr def applyTDDCorr(fname, utddcorr): @@ -47,22 +46,17 @@ def applyTDDCorr(fname, utddcorr): - the detector is WFC - the idc table specified in the primary header is available. """ - instrument = pyfits.getval(fname, 'INSTRUME') try: detector = pyfits.getval(fname, 'DETECTOR') except KeyError: detector = None try: - tddcorr = pyfits.getval(fname, 'TDDCORR') - if tddcorr == 'PERFORM': - tddcorr = True - else: - tddcorr = False + tddswitch = pyfits.getval(fname, 'TDDCORR') except KeyError: - tddcorr = None + tddswitch = 'PERFORM' - if instrument == 'ACS' and detector == 'WFC' and tddcorr== True and utddcorr == True: + if instrument == 'ACS' and detector == 'WFC' and utddcorr == True and tddswitch == 'PERFORM': tddcorr = True try: idctab = pyfits.getval(fname, 'IDCTAB') |