From cdae81377028c57158b552e72936d1eb10d24854 Mon Sep 17 00:00:00 2001 From: dencheva Date: Thu, 19 Mar 2009 13:33:52 +0000 Subject: WFPC2 IDCTAB coefficients include the relative chip to chip rotation. This rotation has to be taken out of the coefficients before the WCS is recomputed. The rotation was done in the opposite direction and this change fixes the problem. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/development/trunk/updatewcs@7778 fe389314-cf27-0410-b35b-8c050e845b92 --- hstwcs/makewcs.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'hstwcs/makewcs.py') diff --git a/hstwcs/makewcs.py b/hstwcs/makewcs.py index 1bfcedd..014df07 100644 --- a/hstwcs/makewcs.py +++ b/hstwcs/makewcs.py @@ -107,12 +107,10 @@ class MakeWCS(object): dtheta = ext_wcs.idcmodel.refpix['THETA'] - ref_wcs.idcmodel.refpix['THETA'] else: dtheta = 0.0 - # Convert to radians - rr=dtheta*pi/180.0 - rrmat = fileutil.buildRotMatrix(rr) + rrmat = fileutil.buildRotMatrix(dtheta) # Rotate the vectors - dxy = numpy.dot(rrmat, delmat) + dxy = numpy.dot(delmat, rrmat) wc = ref_wcs.wcs.p2s((px + dxy), 1)['world'] # Calculate the new CDs and convert to degrees -- cgit