diff options
author | hack <hack@stsci.edu> | 2011-10-26 11:52:45 -0400 |
---|---|---|
committer | hack <hack@stsci.edu> | 2011-10-26 11:52:45 -0400 |
commit | 1f0e41404e9d34d7963580436b8673dcf2579075 (patch) | |
tree | b617d94eea9957955a874f0feac0dbcfb1fdc64b /lib/stwcs/wcsutil/altwcs.py | |
parent | b5f4204747f7e4105049713b40d7bca0fae052e5 (diff) | |
download | stwcs_hcf-1f0e41404e9d34d7963580436b8673dcf2579075.tar.gz |
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
Diffstat (limited to 'lib/stwcs/wcsutil/altwcs.py')
-rw-r--r-- | lib/stwcs/wcsutil/altwcs.py | 2 |
1 files changed, 1 insertions, 1 deletions
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. \ |