From d50931dcc2c5ec0476ee60d94ebace3b1ed45a32 Mon Sep 17 00:00:00 2001 From: hack Date: Mon, 13 Feb 2012 21:01:51 +0000 Subject: Add WCSNAME from the first input WCS to the output WCS object created by stwcs.distortion.utils.output_wcs(). git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@14965 fe389314-cf27-0410-b35b-8c050e845b92 --- lib/stwcs/distortion/utils.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/stwcs/distortion/utils.py') diff --git a/lib/stwcs/distortion/utils.py b/lib/stwcs/distortion/utils.py index 1d395cb..b70f474 100644 --- a/lib/stwcs/distortion/utils.py +++ b/lib/stwcs/distortion/utils.py @@ -25,6 +25,7 @@ def output_wcs(list_of_wcsobj, ref_wcs=None, owcs=None, undistort=True): a flag whether to create an undistorted output WCS """ fra_dec = np.vstack([w.calcFootprint() for w in list_of_wcsobj]) + wcsname = list_of_wcsobj[0].wcs.name # This new algorithm may not be strictly necessary, but it may be more # robust in handling regions near the poles or at 0h RA. @@ -64,6 +65,7 @@ def output_wcs(list_of_wcsobj, ref_wcs=None, owcs=None, undistort=True): newcrval = outwcs.wcs.p2s([newcrpix], 1)['world'][0] outwcs.wcs.crval = newcrval outwcs.wcs.set() + outwcs.wcs.name = wcsname # keep track of label for this solution return outwcs def computeFootprintCenter(edges): -- cgit