From a76a807fa5d5e30414a3e734e594695218a4cf3b Mon Sep 17 00:00:00 2001 From: hack Date: Tue, 1 Nov 2011 16:08:10 +0000 Subject: The API for 'updatewcs.utils.extract_rootname()' was changed, along with all calls to the function in STWCS, to allow it to strip off a user-specified suffix. The default behavior would be replicate current (old) behavior. This update fixed unwanted differences that showed up in the betadrizzle regression tests. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13934 fe389314-cf27-0410-b35b-8c050e845b92 --- lib/stwcs/wcsutil/headerlet.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/stwcs/wcsutil/headerlet.py') diff --git a/lib/stwcs/wcsutil/headerlet.py b/lib/stwcs/wcsutil/headerlet.py index 9573ff9..70c5856 100644 --- a/lib/stwcs/wcsutil/headerlet.py +++ b/lib/stwcs/wcsutil/headerlet.py @@ -1396,7 +1396,7 @@ def restore_from_headerlet(filename, hdrname=None, hdrext=None, archive=True, fo else: if 'idctab' in scihdr: priwcs_hdrname = ''.join(['IDC_', - utils.extract_rootname(scihdr['idctab'])]) + utils.extract_rootname(scihdr['idctab'],suffix='_idc')]) else: priwcs_hdrname = 'UNKNOWN' priwcs_name = priwcs_hdrname @@ -1790,7 +1790,8 @@ class Headerlet(pyfits.HDUList): else: if 'idctab' in scihdr: priwcs_name = ''.join(['IDC_', - utils.extract_rootname(scihdr['idctab'])]) + utils.extract_rootname(scihdr['idctab'], + suffix='_idc')]) else: priwcs_name = 'UNKNOWN' nextkey = altwcs.next_wcskey(fobj,ext=wcsextn) -- cgit