From faf6b5f51af44a794f743a2e2b5de3f176023185 Mon Sep 17 00:00:00 2001 From: dencheva Date: Thu, 26 Mar 2009 15:26:59 +0000 Subject: Changed imports of numpy (as np). Added d2imcorr parameter to top level updatewcs function. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/development/trunk/updatewcs@7803 fe389314-cf27-0410-b35b-8c050e845b92 --- hstwcs/dgeo.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'hstwcs/dgeo.py') diff --git a/hstwcs/dgeo.py b/hstwcs/dgeo.py index d6313d7..00178d9 100644 --- a/hstwcs/dgeo.py +++ b/hstwcs/dgeo.py @@ -1,7 +1,6 @@ import pyfits from pytools import fileutil -#from hstwcs.mappings import dgeo_vals -import numpy +import numpy as np class DGEOCorr(object): """ @@ -148,8 +147,8 @@ class DGEOCorr(object): """ coeffs = cls.getCoeffs(header) idcscale = header['IDCSCALE'] - sclcoeffs = numpy.linalg.inv(coeffs/idcscale) - ndx, ndy = numpy.dot(sclcoeffs, [dx.ravel(), dy.ravel()]) + sclcoeffs = np.linalg.inv(coeffs/idcscale) + ndx, ndy = np.dot(sclcoeffs, [dx.ravel(), dy.ravel()]) ndx.shape = dx.shape ndy.shape=dy.shape return ndx, ndy @@ -168,7 +167,7 @@ class DGEOCorr(object): print 'First order IDCTAB coefficients are not available.\n' print 'Cannot convert SIP to IDC coefficients.\n' return None - return numpy.array([[ocx11, ocx10], [ocy11,ocy10]], dtype=numpy.float32) + return np.array([[ocx11, ocx10], [ocy11,ocy10]], dtype=np.float32) getCoeffs = classmethod(getCoeffs) -- cgit