summaryrefslogtreecommitdiff
path: root/lib/stwcs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stwcs')
-rw-r--r--lib/stwcs/updatewcs/__init__.py7
-rw-r--r--lib/stwcs/updatewcs/apply_corrections.py11
-rw-r--r--lib/stwcs/wcsutil/altwcs.py2
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")