From 43e9751703e7903011cf144331567f9300b7f24e Mon Sep 17 00:00:00 2001 From: hack Date: Tue, 30 Aug 2011 18:58:59 +0000 Subject: Refined the definition of the 'SIPNAME' and 'DISTNAME' keyword values to properly reflect that the distortion model is specific to each input image. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13698 fe389314-cf27-0410-b35b-8c050e845b92 --- lib/stwcs/updatewcs/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/stwcs/updatewcs/utils.py') diff --git a/lib/stwcs/updatewcs/utils.py b/lib/stwcs/updatewcs/utils.py index 6789c19..b7fe7c4 100644 --- a/lib/stwcs/updatewcs/utils.py +++ b/lib/stwcs/updatewcs/utils.py @@ -81,11 +81,12 @@ def construct_distname(fobj,wcsobj): if d2imname is None and wcsobj.det2im is not None: d2imname = 'UNKNOWN' - distname = idcname.strip() + sipname = '%s_%s'%(fobj[0].header.get('rootname',""),idcname) + distname = sipname.strip() if npolname != 'NONE' or d2imname != 'NONE': if d2imname != 'NONE': distname+= '-'+npolname.strip() + '-'+d2imname.strip() else: distname+='-'+npolname.strip() - return {'DISTNAME':distname,'SIPNAME':idcname} \ No newline at end of file + return {'DISTNAME':distname,'SIPNAME':sipname} \ No newline at end of file -- cgit