summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhack <hack@stsci.edu>2012-11-09 10:58:21 -0500
committerhack <hack@stsci.edu>2012-11-09 10:58:21 -0500
commite646fadec3123a2c3f837f9a2d0cb56c01dcb765 (patch)
tree4cc36f92ff2663f0f8f746ad7535e02820be7939
parent6f0d034ef1e8c25ee08ac90558e5fb2415ce7aa7 (diff)
downloadstwcs_hcf-e646fadec3123a2c3f837f9a2d0cb56c01dcb765.tar.gz
Minor change to insure that NPOL WCSDVARR extensions ALWAYS get written out as Float32 datatype, as some NPOL file reference files may have Float64 input arrays which cause PyWCS to choke.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@20341 fe389314-cf27-0410-b35b-8c050e845b92
-rw-r--r--lib/stwcs/updatewcs/npol.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/stwcs/updatewcs/npol.py b/lib/stwcs/updatewcs/npol.py
index 537cda3..2c90611 100644
--- a/lib/stwcs/updatewcs/npol.py
+++ b/lib/stwcs/updatewcs/npol.py
@@ -138,11 +138,11 @@ class NPOLCorr(object):
dpaxis1 = 'DP%s.' %j+'AXIS.1'
dpaxis2 = 'DP%s.' %j+'AXIS.2'
keys = [cperror, cpdis, dpext, dpnaxes, dpaxis1, dpaxis2]
- values = {cperror: error_val,
- cpdis: 'Lookup',
- dpext: wdvarr_ver,
+ values = {cperror: error_val,
+ cpdis: 'Lookup',
+ dpext: wdvarr_ver,
dpnaxes: 2,
- dpaxis1: 1,
+ dpaxis1: 1,
dpaxis2: 2}
comments = {cperror: 'Maximum error of NPOL correction for axis %s' % j,
@@ -187,7 +187,7 @@ class NPOLCorr(object):
"""
Transform the NPOL data arrays for use with SIP
"""
- ndx, ndy = np.dot(coeffs, [dx.ravel(), dy.ravel()])
+ ndx, ndy = np.dot(coeffs, [dx.ravel(), dy.ravel()]).astype(np.float32)
ndx.shape = dx.shape
ndy.shape=dy.shape
return ndx, ndy
@@ -336,4 +336,3 @@ class NPOLCorr(object):
return ccdchip
get_ccdchip = classmethod(get_ccdchip)
-