summaryrefslogtreecommitdiff
path: root/updatewcs/dgeo.py
diff options
context:
space:
mode:
authorhack <hack@stsci.edu>2010-02-17 16:18:44 -0500
committerhack <hack@stsci.edu>2010-02-17 16:18:44 -0500
commitfacf5d74611a20cb37164fab4eb8f229143e17f9 (patch)
tree51f28c642eee0c772aa3f18bffaf0814e0ed3179 /updatewcs/dgeo.py
parentc48080562aa74dc0de763ccb10d35a794efdecaf (diff)
downloadstwcs_hcf-facf5d74611a20cb37164fab4eb8f229143e17f9.tar.gz
The dgeo module in stwcs.updatewcs was revised to create header keywords for the WCSDVARR extensions that properly match the sampling of the table to the full size image. The computations for the CDELT and CRPIX keywords were the only ones affected. WJH
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@8755 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'updatewcs/dgeo.py')
-rw-r--r--updatewcs/dgeo.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/updatewcs/dgeo.py b/updatewcs/dgeo.py
index 8f6b4d4..42001f3 100644
--- a/updatewcs/dgeo.py
+++ b/updatewcs/dgeo.py
@@ -10,7 +10,7 @@ class DGEOCorr(object):
Purpose
=======
Defines a Lookup table prior distortion correction as per WCS paper IV.
- It uses a reference file defined by the NPLOFILE (suffix 'NPL') keyword in the primary header.
+ It uses a reference file defined by the NPOLFILE (suffix 'NPL') keyword in the primary header.
Algorithm
=========
@@ -251,8 +251,8 @@ class DGEOCorr(object):
for i in range(1, naxis+1):
si = str(i)
kw_val1['NAXIS'+si] = npol_header.get('NAXIS'+si)
- kw_val1['CRPIX'+si] = kw_val1['NAXIS'+si]/2.
- kw_val1['CDELT'+si] = float(npol_header.get('ONAXIS'+si))/ (kw_val1['NAXIS'+si] * binned)
+ kw_val1['CRPIX'+si] = (kw_val1['NAXIS'+si]-1)/2.
+ kw_val1['CDELT'+si] = float(npol_header.get('ONAXIS'+si))/ ((kw_val1['NAXIS'+si]-1) * binned)
kw_val1['CRVAL'+si] = (npol_header.get('ONAXIS'+si)/2. + \
sciheader.get('LTV'+si, 0.)) / binned