diff options
author | dencheva <dencheva@stsci.edu> | 2010-03-15 17:19:07 -0400 |
---|---|---|
committer | dencheva <dencheva@stsci.edu> | 2010-03-15 17:19:07 -0400 |
commit | b63fb3b5ae1dca33cf5dc77a0e879b44b9adc22d (patch) | |
tree | b95a729523e4c350eea5d7493d894be6507ef0f5 /updatewcs/dgeo.py | |
parent | 99f434a972afb4db89eafa7f134e9af752571b9c (diff) | |
download | stwcs_hcf-b63fb3b5ae1dca33cf5dc77a0e879b44b9adc22d.tar.gz |
CDELT is the stepsize of the subsampled full-size dgeo file and is recorded in the header of the npl file. It is copied from there to the WCSDVARR extension header.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@8912 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'updatewcs/dgeo.py')
-rw-r--r-- | updatewcs/dgeo.py | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/updatewcs/dgeo.py b/updatewcs/dgeo.py index 63d5f52..2fca578 100644 --- a/updatewcs/dgeo.py +++ b/updatewcs/dgeo.py @@ -69,9 +69,10 @@ class DGEOCorr(object): # get the data arrays from the reference file and transform them for use with SIP dx,dy = cls.getData(nplfile, ccdchip) idccoeffs = cls.getIDCCoeffs(header) + """ if idccoeffs != None: dx, dy = cls.transformData(dx,dy, idccoeffs) - + """ # Determine EXTVER for the WCSDVARR extension from the NPL file (EXTNAME, EXTVER) kw. # This is used to populate DPj.EXTVER kw wcsdvarr_x_version = 2 * extversion -1 @@ -237,10 +238,11 @@ class DGEOCorr(object): ccdchip = nplextname #dgeo_header['CCDCHIP'] kw = { 'NAXIS': 'Size of the axis', - 'CRPIX': 'Coordinate system reference pixel', - 'CRVAL': 'Coordinate system value at reference pixel', - 'CDELT': 'Coordinate increment along axis'} - + 'CDELT': 'Coordinate increment along axis', + 'CRPIX': 'Coordinate system reference pixel', + 'CRVAL': 'Coordinate system value at reference pixel', + } + kw_comm1 = {} kw_val1 = {} for key in kw.keys(): @@ -251,13 +253,9 @@ class DGEOCorr(object): for i in range(1, naxis+1): si = str(i) kw_val1['NAXIS'+si] = npol_header.get('NAXIS'+si) - cdelt = (float(npol_header.get('ONAXIS'+si))/ ((kw_val1['NAXIS'+si]-1) * binned)) - kw_val1['CDELT'+si] = cdelt - if cdelt == 0: cdelt = 1.0 - kw_val1['CRPIX'+si] = (kw_val1['NAXIS'+si]-1)/2. + 1/cdelt - kw_val1['CRVAL'+si] = (npol_header.get('ONAXIS'+si)/2. + \ - sciheader.get('LTV'+si, 0.)) / binned - + kw_val1['CDELT'+si] = npol_header.get('CDELT'+si, 1.0) + kw_val1['CRPIX'+si] = npol_header.get('CRPIX'+si, 0.0) + kw_val1['CRVAL'+si] = npol_header.get('CRVAL'+si, 0.0) kw_comm0 = {'XTENSION': 'Image extension', 'BITPIX': 'IEEE floating point', |