From 1f0e41404e9d34d7963580436b8673dcf2579075 Mon Sep 17 00:00:00 2001 From: hack Date: Wed, 26 Oct 2011 15:52:45 +0000 Subject: The headerlet module was revised to fix the following issues: - 'sciext' default changed from None to 'SCI', while now accepting integer values to (try to) support creating headerlets from simple FITS files - added logic in 'create_headerlet' to not create a SIPWCS extension for a headerlet from a FITS extension which does not have a valid WCS (using hstwcs.wcs.is_unity()) - made update of 'ORIENTAT' optional (same with VAFACTOR) in creating a headerlet - fixed a bug in the logic in altwcs.archiveWCS that dealt with interpreting the PRIMARY WCS git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13911 fe389314-cf27-0410-b35b-8c050e845b92 --- lib/stwcs/wcsutil/altwcs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/stwcs/wcsutil/altwcs.py') diff --git a/lib/stwcs/wcsutil/altwcs.py b/lib/stwcs/wcsutil/altwcs.py index 4f25abb..52a55c7 100644 --- a/lib/stwcs/wcsutil/altwcs.py +++ b/lib/stwcs/wcsutil/altwcs.py @@ -76,7 +76,7 @@ def archiveWCS(fname, ext=None, wcskey=" ", wcsname=" ", reusekey=False): raise KeyError("Either wcskey or wcsname should be specified") wcsext = ext[0] - if wcskey in wcskeys(f[wcsext].header) and not reusekey: + if wcskey != " " and wcskey in wcskeys(f[wcsext].header) and not reusekey: closefobj(fname, f) raise KeyError("Wcskey %s is aready used. \ Run archiveWCS() with reusekey=True to overwrite this alternate WCS. \ -- cgit