diff options
Diffstat (limited to 'lib/stwcs/wcsutil/convertwcs.py')
-rw-r--r-- | lib/stwcs/wcsutil/convertwcs.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/stwcs/wcsutil/convertwcs.py b/lib/stwcs/wcsutil/convertwcs.py index 80276c3..0fa61af 100644 --- a/lib/stwcs/wcsutil/convertwcs.py +++ b/lib/stwcs/wcsutil/convertwcs.py @@ -65,7 +65,7 @@ def archive_prefix_OPUS_WCS(fobj,extname='SCI'): for key in wcskeys: okey = 'O'+key[:7] hdr = fobj[(extname,e)].header - if hdr.has_key(okey): + if okey in hdr: # Update alternate WCS keyword with prefix-O OPUS keyword value hdr[key] = hdr[okey] @@ -102,7 +102,7 @@ def create_prefix_OPUS_WCS(fobj,extname='SCI'): raise IOError # check for existance of O-prefix WCS - if not fobj['sci',1].header.has_key(owcskeys[0]): + if owcskeys[0] not in fobj['sci',1].header: # find out how many SCI extensions are in the image numextn = fileutil.countExtn(fobj,extname=extname) @@ -111,7 +111,7 @@ def create_prefix_OPUS_WCS(fobj,extname='SCI'): for extn in xrange(1,numextn+1): hdr = fobj[(extname,extn)].header for okey in owcskeys: - hdr.update(okey,hdr[okey[1:]+'O']) + hdr[okey] = hdr[okey[1:]+'O'] # Close FITS image if we had to open it... if closefits: |