From add5bab6ddb69e48bc6f95e2f0b38e60c4fb9fed Mon Sep 17 00:00:00 2001 From: dencheva Date: Fri, 22 Jan 2010 22:01:09 +0000 Subject: Check if correction is in the list of corrections before removing it. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@8635 fe389314-cf27-0410-b35b-8c050e845b92 --- updatewcs/apply_corrections.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/updatewcs/apply_corrections.py b/updatewcs/apply_corrections.py index 8e9cef7..1b729ac 100644 --- a/updatewcs/apply_corrections.py +++ b/updatewcs/apply_corrections.py @@ -44,9 +44,10 @@ def setCorrections(fname, vacorr=True, tddcorr=True, dgeocorr=True, d2imcorr=Tru # If kw IDCTAB is present in the header but the file is # not found on disk, do not run TDDCorr, MakeCWS and CompSIP if not foundIDCTAB(fname): - acorr.remove('TDDCorr') - acorr.remove('MakeWCS') - acorr.remove('CompSIP') + if 'TDDCorr' in acorr: acorr.remove('TDDCorr') + if 'MakeWCS' in acorr: acorr.remove('MakeWCS') + if 'CompSIP' in acorr: acorr.remove('CompSIP') + if 'VACorr' in acorr and vacorr==False: acorr.remove('VACorr') if 'TDDCorr' in acorr: -- cgit