summaryrefslogtreecommitdiff
path: root/lib/stwcs/wcsutil/headerlet.py
diff options
context:
space:
mode:
authordencheva <dencheva@stsci.edu>2014-04-30 17:00:15 -0400
committerdencheva <dencheva@stsci.edu>2014-04-30 17:00:15 -0400
commite2041048d7b03b0a8d9557863a1cfb32592fab1a (patch)
tree622250362c2bd8fb626f07b758576b2941edaf4e /lib/stwcs/wcsutil/headerlet.py
parent80b187da718b44907ed490e00d149e11b8085253 (diff)
downloadstwcs_hcf-e2041048d7b03b0a8d9557863a1cfb32592fab1a.tar.gz
deal with pyfits/wcs deprecation wrnings
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@31259 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'lib/stwcs/wcsutil/headerlet.py')
-rw-r--r--lib/stwcs/wcsutil/headerlet.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/stwcs/wcsutil/headerlet.py b/lib/stwcs/wcsutil/headerlet.py
index 971efd5..3ab53f5 100644
--- a/lib/stwcs/wcsutil/headerlet.py
+++ b/lib/stwcs/wcsutil/headerlet.py
@@ -1024,7 +1024,7 @@ def create_headerlet(filename, sciext='SCI', hdrname=None, destim=None,
whdul = hwcs.to_fits(relax=True, wkey=" ")
if hasattr(hwcs, 'orientat'):
orient_comment = "positions angle of image y axis (deg. e of n)"
- whdul[0].header.update('ORIENTAT', hwcs.orientat, comment=orient_comment)
+ whdul[0].header['ORIENTAT'] = (wcs.orientat, orient_comment)
whdul[0].header.append(('TG_ENAME', ext[0], 'Target science data extname'))
whdul[0].header.append(('TG_EVER', ext[1], 'Target science data extver'))
@@ -1496,7 +1496,7 @@ def restore_from_headerlet(filename, hdrname=None, hdrext=None, archive=True,
else:
priwcs_hdrname = 'UNKNOWN'
priwcs_name = priwcs_hdrname
- scihdr.update('WCSNAME', priwcs_name)
+ scihdr['WCSNAME'] = priwcs_name
priwcs_unique = verify_hdrname_is_unique(fobj, priwcs_hdrname)
if archive and priwcs_unique:
@@ -1915,7 +1915,7 @@ class Headerlet(pyfits.HDUList):
logging=self.logging)
orig_hlt_hdu = HeaderletHDU.fromheaderlet(orig_hlt)
numhlt += 1
- orig_hlt_hdu.header.update('EXTVER', numhlt)
+ orig_hlt_hdu.header['EXTVER'] = numhlt
logger.info("Created headerlet %s to be attached to file" % hdrname)
else:
logger.info("Headerlet with name %s is already attached" % hdrname)
@@ -1954,7 +1954,7 @@ class Headerlet(pyfits.HDUList):
logging=self.logging)
numhlt += 1
alt_hlet_hdu = HeaderletHDU.fromheaderlet(alt_hlet)
- alt_hlet_hdu.header.update('EXTVER', numhlt)
+ alt_hlet_hdu.header['EXTVER'] = numhlt
alt_hlethdu.append(alt_hlet_hdu)
hdrlet_extnames.append(hname)
@@ -2182,7 +2182,7 @@ class Headerlet(pyfits.HDUList):
numhlt = countExtn(fobj, 'HDRLET')
new_hlt = HeaderletHDU.fromheaderlet(self)
- new_hlt.header.update('extver', numhlt + 1)
+ new_hlt.header['extver'] = numhlt + 1
fobj.append(new_hlt)
utils.updateNEXTENDKw(fobj)
else: