From d80deca64840b8128799bd756dcea9175e5383b2 Mon Sep 17 00:00:00 2001 From: hack Date: Tue, 25 Jan 2011 16:46:24 +0000 Subject: Corrected a sign-error in 'utils.output_wcs()' in STWCS.distortion. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@11786 fe389314-cf27-0410-b35b-8c050e845b92 --- distortion/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'distortion/utils.py') diff --git a/distortion/utils.py b/distortion/utils.py index f682875..ff42d69 100644 --- a/distortion/utils.py +++ b/distortion/utils.py @@ -38,9 +38,10 @@ def output_wcs(list_of_wcsobj, ref_wcs=None, outwcs=None, undistort=True): outwcs.wcs.crpix = crpix outwcs.wcs.set() tanpix = outwcs.wcs.s2p(fra_dec, 1)['pixcrd'] + # shift crpix to take into account (floating-point value of) position of # corner pixel relative to output frame size: no rounding necessary... - newcrpix = np.array([crpix[0]-tanpix[:,0].min(), crpix[1]- + newcrpix = np.array([crpix[0]+tanpix[:,0].min(), crpix[1]+ tanpix[:,1].min()]) newcrval = outwcs.wcs.p2s([newcrpix], 1)['world'][0] outwcs.wcs.crval = newcrval -- cgit