diff options
author | dencheva <dencheva@stsci.edu> | 2012-09-06 16:44:04 -0400 |
---|---|---|
committer | dencheva <dencheva@stsci.edu> | 2012-09-06 16:44:04 -0400 |
commit | 9217d5694cc702e5fe6e2a4af11c3e3a624bbc84 (patch) | |
tree | 2c85e3ad02f3bdfa704a037208984df902142fd1 /lib/stwcs/updatewcs/npol.py | |
parent | a67bad59a8fe50b1099b2953da176e1f83c4f843 (diff) | |
download | stwcs_hcf-9217d5694cc702e5fe6e2a4af11c3e3a624bbc84.tar.gz |
Write out the correct keyword name for error values in wcsdvarr extensions, 'CPERR', instead of 'CPERROR', and populate the keyword with values from the data arrays.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@19145 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'lib/stwcs/updatewcs/npol.py')
-rw-r--r-- | lib/stwcs/updatewcs/npol.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/stwcs/updatewcs/npol.py b/lib/stwcs/updatewcs/npol.py index a7b84da..36387df 100644 --- a/lib/stwcs/updatewcs/npol.py +++ b/lib/stwcs/updatewcs/npol.py @@ -87,7 +87,6 @@ class NPOLCorr(object): # This is used to populate DPj.EXTVER kw wcsdvarr_x_version = 2 * extversion -1 wcsdvarr_y_version = 2 * extversion - for ename in zip(['DX', 'DY'], [wcsdvarr_x_version,wcsdvarr_y_version],[dx, dy]): cls.addSciExtKw(header, wdvarr_ver=ename[1], npol_extname=ename[0]) hdu = cls.createNpolHDU(header, npolfile=nplfile, \ @@ -131,7 +130,7 @@ class NPOLCorr(object): else: j=2 - cperror = 'CPERROR%s' %j + cperror = 'CPERR%s' %j cpdis = 'CPDIS%s' %j dpext = 'DP%s.' %j + 'EXTVER' dpnaxes = 'DP%s.' %j +'NAXES' @@ -220,6 +219,7 @@ class NPOLCorr(object): """ hdr = cls.createNpolHdr(sciheader, npolfile=npolfile, wdvarr_ver=wdvarr_ver, npl_extname=npl_extname, ccdchip=ccdchip, binned=binned) hdu=pyfits.ImageHDU(header=hdr, data=data) + sciheader.update('CPERR'+str(wdvarr_ver), data.max()) return hdu createNpolHDU = classmethod(createNpolHDU) @@ -289,7 +289,6 @@ class NPOLCorr(object): 'GCOUNT': 1, 'CCDCHIP': ccdchip, } - cdl = [] for key in kw_comm0.keys(): cdl.append((key, kw_val0[key], kw_comm0[key])) |