summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordencheva <dencheva@stsci.edu>2010-01-22 17:01:09 -0500
committerdencheva <dencheva@stsci.edu>2010-01-22 17:01:09 -0500
commitadd5bab6ddb69e48bc6f95e2f0b38e60c4fb9fed (patch)
tree1d4b6c4d47fef5684bc030dbbb98d62e7cdd319c
parentb2d751459b6a5c24da94782e5f267ba808901581 (diff)
downloadstwcs_hcf-add5bab6ddb69e48bc6f95e2f0b38e60c4fb9fed.tar.gz
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
-rw-r--r--updatewcs/apply_corrections.py7
1 files 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: