diff options
author | hack <hack@stsci.edu> | 2011-01-25 11:46:24 -0500 |
---|---|---|
committer | hack <hack@stsci.edu> | 2011-01-25 11:46:24 -0500 |
commit | d80deca64840b8128799bd756dcea9175e5383b2 (patch) | |
tree | 38431f28beb7d697fe888a9eeed5533d6e67cbe2 /distortion/utils.py | |
parent | b90b9c3e1ff9ba59f22ddb6330fa30058923bdf3 (diff) | |
download | stwcs_hcf-d80deca64840b8128799bd756dcea9175e5383b2.tar.gz |
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
Diffstat (limited to 'distortion/utils.py')
-rw-r--r-- | distortion/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 |