diff options
author | hack <hack@stsci.edu> | 2010-02-17 16:18:44 -0500 |
---|---|---|
committer | hack <hack@stsci.edu> | 2010-02-17 16:18:44 -0500 |
commit | facf5d74611a20cb37164fab4eb8f229143e17f9 (patch) | |
tree | 51f28c642eee0c772aa3f18bffaf0814e0ed3179 | |
parent | c48080562aa74dc0de763ccb10d35a794efdecaf (diff) | |
download | stwcs_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
-rw-r--r-- | updatewcs/dgeo.py | 6 |
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 |