summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordencheva <dencheva@stsci.edu>2010-12-13 15:45:48 -0500
committerdencheva <dencheva@stsci.edu>2010-12-13 15:45:48 -0500
commit67a20f05cc159df68639337256595ca838a4427c (patch)
treeebd0ea6f96622b81bd8335a4c2b05c547662ba91
parent77090afe5465819044d824ad9045278f252bd622 (diff)
downloadstwcs_hcf-67a20f05cc159df68639337256595ca838a4427c.tar.gz
Initial fix for #637, will change this later.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@11373 fe389314-cf27-0410-b35b-8c050e845b92
-rw-r--r--updatewcs/__init__.py2
-rw-r--r--wcsutil/altwcs.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/updatewcs/__init__.py b/updatewcs/__init__.py
index e820140..46d7267 100644
--- a/updatewcs/__init__.py
+++ b/updatewcs/__init__.py
@@ -198,7 +198,7 @@ def copyWCS(w, hdr, wkey, wname):
if w.wcs.has_cd():
wcsutil.pc2cd(hwcs)
for k in hwcs.keys():
- key = k+wkey
+ key = k[:7] + wkey
hdr.update(key=key, value=hwcs[k])
norient = np.rad2deg(np.arctan2(hwcs['CD1_2'],hwcs['CD2_2']))
okey = 'ORIENT%s' % wkey
diff --git a/wcsutil/altwcs.py b/wcsutil/altwcs.py
index 4c41d2a..a750bda 100644
--- a/wcsutil/altwcs.py
+++ b/wcsutil/altwcs.py
@@ -5,7 +5,7 @@ import pywcs
import numpy as np
import pyfits
-
+altwcskw = ['WCSAXES', 'CRVAL', 'CRPIX', 'PC', 'CDELT', 'CD', 'CTYPE', 'CUNIT', 'PV', 'PS']
# file operations
def archiveWCS(fname, ext, wcskey=" ", wcsname=" ", clobber=False):
"""
@@ -71,7 +71,7 @@ def archiveWCS(fname, ext, wcskey=" ", wcsname=" ", clobber=False):
if w.wcs.has_cd():
pc2cd(hwcs)
for k in hwcs.keys():
- key = k+wkey
+ key = k[:7] + wkey
f[e].header.update(key=key, value=hwcs[k])
norient = np.rad2deg(np.arctan2(hwcs['CD1_2'],hwcs['CD2_2']))
okey = 'ORIENT%s' % wkey