From facf5d74611a20cb37164fab4eb8f229143e17f9 Mon Sep 17 00:00:00 2001 From: hack Date: Wed, 17 Feb 2010 21:18:44 +0000 Subject: 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 --- updatewcs/dgeo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'updatewcs/dgeo.py') 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 -- cgit