summaryrefslogtreecommitdiff
path: root/lib/stwcs/wcsutil/altwcs.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/altwcs.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/altwcs.py')
-rw-r--r--lib/stwcs/wcsutil/altwcs.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/stwcs/wcsutil/altwcs.py b/lib/stwcs/wcsutil/altwcs.py
index 9dd7edb..a8f1cc1 100644
--- a/lib/stwcs/wcsutil/altwcs.py
+++ b/lib/stwcs/wcsutil/altwcs.py
@@ -423,7 +423,8 @@ def _restore(fobj, ukey, fromextnum,
for k in hwcs.keys():
key = k[:-1]
if key in fobj[toextension].header.keys():
- fobj[toextension].header.update(key=key, value = hwcs[k])
+ #fobj[toextension].header.update(key=key, value = hwcs[k])
+ fobj[toextension].header[key] = hwcs[k]
else:
continue
if key == 'O' and 'TDDALPHA' in fobj[toextension].header:
@@ -431,7 +432,7 @@ def _restore(fobj, ukey, fromextnum,
fobj[toeztension].header['TDDBETA'] = 0.0
if 'ORIENTAT' in fobj[toextension].header:
norient = np.rad2deg(np.arctan2(hwcs['CD1_2'+'%s' %ukey], hwcs['CD2_2'+'%s' %ukey]))
- fobj[toextension].header.update(key='ORIENTAT', value=norient)
+ fobj[toextension].header['ORIENTAT'] = norient
#header operations
def _check_headerpars(fobj, ext):
@@ -659,7 +660,8 @@ def pc2cd(hdr, key=' '):
val = 1.
else:
val = 0.
- hdr.update(key='CD'+c+'%s' %key, value=val)
+ #hdr.update(key='CD'+c+'%s' %key, value=val)
+ hdr['CD{0}{1}'.format(c, key)] = val
return hdr
def _parpasscheck(fobj, ext, wcskey, fromext=None, toext=None, reusekey=False):