summaryrefslogtreecommitdiff
path: root/lib/stwcs/wcsutil/headerlet.py
diff options
context:
space:
mode:
authorhack <hack@stsci.edu>2011-11-01 12:08:10 -0400
committerhack <hack@stsci.edu>2011-11-01 12:08:10 -0400
commita76a807fa5d5e30414a3e734e594695218a4cf3b (patch)
tree79e9b96300dbdbbac20d6f246072d906c740b474 /lib/stwcs/wcsutil/headerlet.py
parentc309708ecefd456351667ab9a1636bf0e717a745 (diff)
downloadstwcs_hcf-a76a807fa5d5e30414a3e734e594695218a4cf3b.tar.gz
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
Diffstat (limited to 'lib/stwcs/wcsutil/headerlet.py')
-rw-r--r--lib/stwcs/wcsutil/headerlet.py5
1 files changed, 3 insertions, 2 deletions
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)