summaryrefslogtreecommitdiff
path: root/distortion/utils.py
diff options
context:
space:
mode:
authorhack <hack@stsci.edu>2011-01-25 11:46:24 -0500
committerhack <hack@stsci.edu>2011-01-25 11:46:24 -0500
commitd80deca64840b8128799bd756dcea9175e5383b2 (patch)
tree38431f28beb7d697fe888a9eeed5533d6e67cbe2 /distortion/utils.py
parentb90b9c3e1ff9ba59f22ddb6330fa30058923bdf3 (diff)
downloadstwcs_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.py3
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