diff options
author | hack <hack@stsci.edu> | 2011-08-19 15:33:26 -0400 |
---|---|---|
committer | hack <hack@stsci.edu> | 2011-08-19 15:33:26 -0400 |
commit | 2e1bac4dc7916e961180cdde875a3266f0a8fe7b (patch) | |
tree | e12234d790375e0852e9cc8563d0296e2cc2cef2 | |
parent | 8293fd263fa47cedbf7063192f6c37f127b6bc7d (diff) | |
download | stwcs_hcf-2e1bac4dc7916e961180cdde875a3266f0a8fe7b.tar.gz |
Corrected the generation of the WCSNAME keyword to use 'utils.extract_rootname', so that the same conventions can be used and to eliminate problems that generate values such as 'IDC_./n7n18501j'.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13647 fe389314-cf27-0410-b35b-8c050e845b92
-rw-r--r-- | lib/stwcs/updatewcs/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/stwcs/updatewcs/__init__.py b/lib/stwcs/updatewcs/__init__.py index 2a3cb07..9ab8ade 100644 --- a/lib/stwcs/updatewcs/__init__.py +++ b/lib/stwcs/updatewcs/__init__.py @@ -148,7 +148,7 @@ def makecorr(fname, allowed_corr): # give the primary WCS a WCSNAME value idcname = f[0].header.get('IDCTAB', " ") if idcname.strip() and 'idc.fits' in idcname: - wname = ''.join(['IDC_',idcname.split('_idc.fits')[0]]) + wname = ''.join(['IDC_',utils.extract_rootname(idcname)]) else: wname = " " hdr.update('WCSNAME', wname) |