summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordencheva <dencheva@stsci.edu>2009-03-19 09:33:52 -0400
committerdencheva <dencheva@stsci.edu>2009-03-19 09:33:52 -0400
commitcdae81377028c57158b552e72936d1eb10d24854 (patch)
treefce21b6ae550e9bfe3641a2fb8a21f4bc859bd51
parent4eb8673f6e48f212d450faef6ab9296dbd1cc253 (diff)
downloadstwcs_hcf-cdae81377028c57158b552e72936d1eb10d24854.tar.gz
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
-rw-r--r--hstwcs/makewcs.py6
1 files changed, 2 insertions, 4 deletions
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