diff options
author | dencheva <dencheva@stsci.edu> | 2009-03-17 09:50:03 -0400 |
---|---|---|
committer | dencheva <dencheva@stsci.edu> | 2009-03-17 09:50:03 -0400 |
commit | 81d0bba67fca1980eec1fd1a6d3b00541f35e907 (patch) | |
tree | 59869aeea407b34b7fdd3c2509c762befd211db2 | |
parent | f4b215e9b83e4aefacb61e8c9f0ccafbaefe0338 (diff) | |
download | stwcs_hcf-81d0bba67fca1980eec1fd1a6d3b00541f35e907.tar.gz |
Changed the name of the kw recording the dgeofile used for the lookup tables to DGEOEXT.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/development/trunk/updatewcs@7766 fe389314-cf27-0410-b35b-8c050e845b92
-rw-r--r-- | hstwcs/apply_corrections.py | 10 | ||||
-rw-r--r-- | hstwcs/dgeo.py | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/hstwcs/apply_corrections.py b/hstwcs/apply_corrections.py index b30c4c5..92aa755 100644 --- a/hstwcs/apply_corrections.py +++ b/hstwcs/apply_corrections.py @@ -83,8 +83,8 @@ def applyDgeoCorr(fname, udgeocorr): Adds dgeo extensions to files based on the DGEOFILE keyword in the primary header. This is a default correction and will always run in the pipeline. The file used to generate the extensions is - recorded in the DGEOFILE keyword in each science extension. - If 'DGEOFILE' in the primary header is different from 'DGEOFILE' in the + recorded in the DGEOEXT keyword in each science extension. + If 'DGEOFILE' in the primary header is different from 'DGEOEXT' in the extension header and the file exists on disk and is a 'new type' dgeofile, then the dgeo extensions will be updated. """ @@ -101,8 +101,8 @@ def applyDgeoCorr(fname, udgeocorr): applyDGEOCorr = False return applyDGEOCorr try: - # get DGEOFILE kw from first extension header - fdgeo1 = pyfits.getval(fname, 'DGEOFILE', ext=1) + # get DGEOEXT kw from first extension header + fdgeo1 = pyfits.getval(fname, 'DGEOEXT', ext=1) fdgeo1 = fileutil.osfn(fdgeo1) if fdgeo1 and fileutil.findFile(fdgeo1): if fdgeo0 != fdgeo1: @@ -114,7 +114,7 @@ def applyDgeoCorr(fname, udgeocorr): # but if a valid kw exists in the primary header, dgeo should be applied. applyDGEOCorr = True except KeyError: - # the case of DGEOFILE kw present in primary header but missing + # the case of DGEOFILE kw present in primary header but DGEOEXT missing # in first extension header applyDGEOCorr = True except KeyError: diff --git a/hstwcs/dgeo.py b/hstwcs/dgeo.py index b1d5720..a97290d 100644 --- a/hstwcs/dgeo.py +++ b/hstwcs/dgeo.py @@ -39,7 +39,7 @@ class DGEOCorr(object): cls.applyDgeoCorr(fobj) dgfile = fobj[0].header['DGEOFILE'] - new_kw = {'DGEOFILE': dgfile} + new_kw = {'DGEOEXT': dgfile} return new_kw updateWCS = classmethod(updateWCS) @@ -49,7 +49,7 @@ class DGEOCorr(object): For each science extension in a pyfits file object: - create a WCSDVARR extension - update science header - - add/update DGEOFILE keyword + - add/update DGEOEXT keyword """ dgfile = fileutil.osfn(fobj[0].header['DGEOFILE']) instrument = fobj[0].header.get('INSTRUME', None) |