From 18314675643b403b5655f3e6898c49db7e16695c Mon Sep 17 00:00:00 2001 From: dencheva Date: Mon, 27 Jul 2009 18:14:59 +0000 Subject: 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 --- updatewcs/apply_corrections.py | 12 +++--------- 1 file 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') -- cgit