diff options
author | hack <hack@stsci.edu> | 2012-02-13 16:01:51 -0500 |
---|---|---|
committer | hack <hack@stsci.edu> | 2012-02-13 16:01:51 -0500 |
commit | d50931dcc2c5ec0476ee60d94ebace3b1ed45a32 (patch) | |
tree | 232b7e28f83d5269f7584963323b55274225e583 /lib/stwcs/distortion/utils.py | |
parent | 0e34a376d4440655b7d4cb05ed9bca70f7d2ec56 (diff) | |
download | stwcs_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.py | 2 |
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): |