diff options
author | dencheva <dencheva@stsci.edu> | 2009-12-18 12:01:35 -0500 |
---|---|---|
committer | dencheva <dencheva@stsci.edu> | 2009-12-18 12:01:35 -0500 |
commit | 2ef0aacf55807bf346014b224f2139d9c67a4522 (patch) | |
tree | 95a6ca7cd006f4ad458682224977cef1555e2d12 /updatewcs | |
parent | a37eae582268a4689e96008be8eb3599685812d2 (diff) | |
download | stwcs_hcf-2ef0aacf55807bf346014b224f2139d9c67a4522.tar.gz |
Minor refactoring and cleaning; fixed a problem when ORIENTAT is not present in the header. Tests against makewcs pass for all instruments.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@8507 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'updatewcs')
-rw-r--r-- | updatewcs/apply_corrections.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/updatewcs/apply_corrections.py b/updatewcs/apply_corrections.py index be9fac7..ab05d7d 100644 --- a/updatewcs/apply_corrections.py +++ b/updatewcs/apply_corrections.py @@ -27,15 +27,18 @@ def setCorrections(fname, vacorr=True, tddcorr=True, dgeocorr=True, d2imcorr=Tru for the instrument, which are defined in mappings.py. """ instrument = pyfits.getval(fname, 'INSTRUME') - tddcorr = applyTDDCorr(fname, tddcorr) - dgeocorr = applyDgeoCorr(fname, dgeocorr) - d2imcorr = applyD2ImCorr(fname, d2imcorr) # make a copy of this list ! acorr = allowed_corrections[instrument][:] if 'VACorr' in acorr and vacorr==False: acorr.remove('VACorr') - 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') + if 'TDDCorr' in acorr: + tddcorr = applyTDDCorr(fname, tddcorr) + if tddcorr == False: acorr.remove('TDDCorr') + if 'DGEOCorr' in acorr: + dgeocorr = applyDgeoCorr(fname, dgeocorr) + if dgeocorr == False: acorr.remove('DGEOCorr') + if 'DET2IMCorr' in acorr: + d2imcorr = applyD2ImCorr(fname, d2imcorr) + if d2imcorr == False: acorr.remove('DET2IMCorr') return acorr def applyTDDCorr(fname, utddcorr): |