diff options
author | dencheva <dencheva@stsci.edu> | 2015-05-22 10:49:26 -0400 |
---|---|---|
committer | dencheva <dencheva@stsci.edu> | 2015-05-22 10:49:26 -0400 |
commit | dc070c60f0d9124ad8ef4c04cd04d96bb5b9a23f (patch) | |
tree | bde60685cae7a48b5ce8f05094644d4a8f1681d4 /lib/stwcs | |
parent | 6a6586bf25b1e800dab2de380448f40eae0b2e08 (diff) | |
download | stwcs_hcf-dc070c60f0d9124ad8ef4c04cd04d96bb5b9a23f.tar.gz |
Reverting r40221 - unintentionally checked in these changes.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@40327 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'lib/stwcs')
-rw-r--r-- | lib/stwcs/updatewcs/__init__.py | 7 | ||||
-rw-r--r-- | lib/stwcs/updatewcs/apply_corrections.py | 11 | ||||
-rw-r--r-- | lib/stwcs/wcsutil/altwcs.py | 2 |
3 files changed, 7 insertions, 13 deletions
diff --git a/lib/stwcs/updatewcs/__init__.py b/lib/stwcs/updatewcs/__init__.py index 7bca5f7..d09f5a8 100644 --- a/lib/stwcs/updatewcs/__init__.py +++ b/lib/stwcs/updatewcs/__init__.py @@ -343,8 +343,6 @@ def newIDCTAB(fname): if idctab == oldidctab: return False else: - if not os.path.exists(idctab): - print("IDCTAB {0} not found".format(idctab)) return True def cleanWCS(fname): @@ -359,10 +357,7 @@ def cleanWCS(fname): pass fext = list(range(len(f))) for key in keys: - try: - wcsutil.deleteWCS(fname, ext=fext, wcskey=key) - except KeyError: - pass + wcsutil.deleteWCS(fname, ext=fext, wcskey=key) def getCorrections(instrument): """ diff --git a/lib/stwcs/updatewcs/apply_corrections.py b/lib/stwcs/updatewcs/apply_corrections.py index 4d52311..2871a46 100644 --- a/lib/stwcs/updatewcs/apply_corrections.py +++ b/lib/stwcs/updatewcs/apply_corrections.py @@ -41,14 +41,14 @@ def setCorrections(fname, vacorr=True, tddcorr=True, npolcorr=True, d2imcorr=Tru instrument = fits.getval(fname, 'INSTRUME') # make a copy of this list ! acorr = allowed_corrections[instrument][:] - print('in setCoorections', acorr) + # Check if idctab is present on disk # 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): - #if 'TDDCorr' in acorr: acorr.remove('TDDCorr') - #if 'MakeWCS' in acorr: acorr.remove('MakeWCS') - #if 'CompSIP' in acorr: acorr.remove('CompSIP') + if not foundIDCTAB(fname): + 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: @@ -74,7 +74,6 @@ def foundIDCTAB(fname): if os.path.exists(idctab): return True else: - print("IDCTAB file {0} not found".format(idctab)) return False def applyTDDCorr(fname, utddcorr): diff --git a/lib/stwcs/wcsutil/altwcs.py b/lib/stwcs/wcsutil/altwcs.py index 4e11890..293f22d 100644 --- a/lib/stwcs/wcsutil/altwcs.py +++ b/lib/stwcs/wcsutil/altwcs.py @@ -327,7 +327,7 @@ def deleteWCS(fname, ext, wcskey=" ", wcsname=" "): return wcskeyext = ext[0] - print('wcskeyext', wcskeyext, ext) + if not wcskeys and not wcsname: raise KeyError("Either wcskey or wcsname should be specified") |