summaryrefslogtreecommitdiff
path: root/updatewcs/corrections.py
diff options
context:
space:
mode:
authordencheva <dencheva@stsci.edu>2009-12-23 10:21:21 -0500
committerdencheva <dencheva@stsci.edu>2009-12-23 10:21:21 -0500
commit6d99b7ab0a8b374df23294272d8dcc5887540a53 (patch)
tree63295dc93b928efdd3ae7c5390c77aa32bb7a192 /updatewcs/corrections.py
parent2f294bfefb6316ee52c5621353e5a654504df698 (diff)
downloadstwcs_hcf-6d99b7ab0a8b374df23294272d8dcc5887540a53.tar.gz
Use 'import numpy as np' and a fix to a header comment
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@8518 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'updatewcs/corrections.py')
-rw-r--r--updatewcs/corrections.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/updatewcs/corrections.py b/updatewcs/corrections.py
index 6709664..b20fc3f 100644
--- a/updatewcs/corrections.py
+++ b/updatewcs/corrections.py
@@ -1,7 +1,7 @@
from __future__ import division # confidence high
import datetime
-import numpy
+import numpy as np
from numpy import linalg
from pytools import fileutil
from stwcs.utils import diff_angles
@@ -56,11 +56,11 @@ class TDDCorr(object):
theta_v2v3 = 2.234529
mrotp = fileutil.buildRotMatrix(theta_v2v3)
mrotn = fileutil.buildRotMatrix(-theta_v2v3)
- tdd_mat = numpy.array([[1+(beta/2048.), alpha/2048.],[alpha/2048.,1-(beta/2048.)]],numpy.float64)
- abmat1 = numpy.dot(tdd_mat, mrotn)
- abmat2 = numpy.dot(mrotp,abmat1)
+ tdd_mat = np.array([[1+(beta/2048.), alpha/2048.],[alpha/2048.,1-(beta/2048.)]],np.float64)
+ abmat1 = np.dot(tdd_mat, mrotn)
+ abmat2 = np.dot(mrotp,abmat1)
xshape, yshape = hwcs.idcmodel.cx.shape, hwcs.idcmodel.cy.shape
- icxy = numpy.dot(abmat2,[hwcs.idcmodel.cx.ravel(), hwcs.idcmodel.cy.ravel()])
+ icxy = np.dot(abmat2,[hwcs.idcmodel.cx.ravel(), hwcs.idcmodel.cy.ravel()])
hwcs.idcmodel.cx = icxy[0]
hwcs.idcmodel.cy = icxy[1]
hwcs.idcmodel.cx.shape = xshape
@@ -127,15 +127,15 @@ class CompSIP(object):
cx = ext_wcs.idcmodel.cx
cy = ext_wcs.idcmodel.cy
- matr = numpy.array([[cx[1,1],cx[1,0]], [cy[1,1],cy[1,0]]], dtype=numpy.float)
+ matr = np.array([[cx[1,1],cx[1,0]], [cy[1,1],cy[1,0]]], dtype=np.float)
imatr = linalg.inv(matr)
- akeys1 = numpy.zeros((order+1,order+1), dtype=numpy.float)
- bkeys1 = numpy.zeros((order+1,order+1), dtype=numpy.float)
+ akeys1 = np.zeros((order+1,order+1), dtype=np.float)
+ bkeys1 = np.zeros((order+1,order+1), dtype=np.float)
for n in range(order+1):
for m in range(order+1):
if n >= m and n>=2:
- idcval = numpy.array([[cx[n,m]],[cy[n,m]]])
- sipval = numpy.dot(imatr, idcval)
+ idcval = np.array([[cx[n,m]],[cy[n,m]]])
+ sipval = np.dot(imatr, idcval)
akeys1[m,n-m] = sipval[0]
bkeys1[m,n-m] = sipval[1]
Akey="A_%d_%d" % (m,n-m)