From 2e1bac4dc7916e961180cdde875a3266f0a8fe7b Mon Sep 17 00:00:00 2001 From: hack Date: Fri, 19 Aug 2011 19:33:26 +0000 Subject: 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 --- lib/stwcs/updatewcs/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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) -- cgit