summaryrefslogtreecommitdiff
path: root/lib/stwcs/distortion/utils.py
diff options
context:
space:
mode:
authorhack <hack@stsci.edu>2012-02-13 16:01:51 -0500
committerhack <hack@stsci.edu>2012-02-13 16:01:51 -0500
commitd50931dcc2c5ec0476ee60d94ebace3b1ed45a32 (patch)
tree232b7e28f83d5269f7584963323b55274225e583 /lib/stwcs/distortion/utils.py
parent0e34a376d4440655b7d4cb05ed9bca70f7d2ec56 (diff)
downloadstwcs_hcf-d50931dcc2c5ec0476ee60d94ebace3b1ed45a32.tar.gz
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
Diffstat (limited to 'lib/stwcs/distortion/utils.py')
-rw-r--r--lib/stwcs/distortion/utils.py2
1 files changed, 2 insertions, 0 deletions
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):