diff options
author | dencheva <dencheva@stsci.edu> | 2010-09-15 16:33:51 -0400 |
---|---|---|
committer | dencheva <dencheva@stsci.edu> | 2010-09-15 16:33:51 -0400 |
commit | 45c5a25f4793c8df141ebdb07c5bbd2ff424a598 (patch) | |
tree | 46a331faf6621cafff75ab3a7e9b69358ff6e77c | |
parent | 9b4ed1759b80937a2d4afc67a14ebbd557d3284d (diff) | |
download | stwcs_hcf-45c5a25f4793c8df141ebdb07c5bbd2ff424a598.tar.gz |
Corrected a problem with input header created with the last checkin.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@10316 fe389314-cf27-0410-b35b-8c050e845b92
-rw-r--r-- | lib/utils.py | 4 |
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 |