summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/utils.py b/lib/utils.py
index 7590b42..6f63db0 100644
--- a/lib/utils.py
+++ b/lib/utils.py
@@ -115,8 +115,8 @@ def archiveWCS(fname, ext, wcskey, wcsname=" ", clobber=False):
print 'Or use utils.restoreWCS a specific WCS to the primary WCS.'
print 'WCS was NOT archived.'
return
- if (wcskey not in available_wcskeys(f[ext].header)) and clobber==False:
- print 'wcskey %s is already used in this header.' % wcskey
+ if (wcskey not in available_wcskeys(pyfits.getheader(fname, ext=ext))) and clobber==False:
+ print 'Wcskey %s is already used in this header.' % wcskey
print 'Use "utils.next_wcskey" to obtain a valid wcskey'
print 'or use "clobber=True" to overwrite the values.'
return