From 6530910dc0f88dcd4daa710b8180d70f4040ccbe Mon Sep 17 00:00:00 2001 From: hack Date: Sat, 23 Apr 2011 20:25:14 +0000 Subject: This update to the 'wcscorr' modele in STWCS.WCSUTIL fixes a problem with initializing the WCSCORR table, and in fact, the entire header by archiving the original WCS values if no WCS with wcskey='O' has already been created. This affects the usage of the 'init_wcscorr()' function. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@12589 fe389314-cf27-0410-b35b-8c050e845b92 --- wcsutil/wcscorr.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'wcsutil/wcscorr.py') diff --git a/wcsutil/wcscorr.py b/wcsutil/wcscorr.py index 4f5a05d..fae48ce 100644 --- a/wcsutil/wcscorr.py +++ b/wcsutil/wcscorr.py @@ -81,10 +81,10 @@ def init_wcscorr(input, force=False): # Check to see whether or not there is an OPUS alternate WCS present, # if so, get its values directly, otherwise, archive the PRIMARY WCS # as the OPUS values in the WCSCORR table - if 'O' in used_wcskeys: - wkey = 'O' - else: - wkey = ' ' + if 'O' not in used_wcskeys: + altwcs.archiveWCS(fimg,('SCI',extver),wcskey='O', wcsname='OPUS') + wkey = 'O' + wcs = stwcs.wcsutil.HSTWCS(fimg, ext=('SCI', extver), wcskey=wkey) wcshdr = wcs.wcs2header(idc2hdr=idc2header) -- cgit