summaryrefslogtreecommitdiff
path: root/stwcs/wcsutil/headerlet.py
diff options
context:
space:
mode:
authorNadia Dencheva <nadia.astropy@gmail.com>2016-08-08 13:22:28 -0400
committerGitHub <noreply@github.com>2016-08-08 13:22:28 -0400
commitdd06f2a94c0e70c2cad40247fcc21e55f1f8d10e (patch)
tree004f9ec80e06f8d8e712e615e20574270847648b /stwcs/wcsutil/headerlet.py
parenta2e16e39b0eb8ac0251a6473c60fee0d437c3a5f (diff)
parent8c5824639177741dab4f0e1266f22ec2673cde1e (diff)
downloadstwcs_hcf-dd06f2a94c0e70c2cad40247fcc21e55f1f8d10e.tar.gz
Merge pull request #10 from nden/fix-sip-ctype
fix for '-SIP' in ctype
Diffstat (limited to 'stwcs/wcsutil/headerlet.py')
-rw-r--r--stwcs/wcsutil/headerlet.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/stwcs/wcsutil/headerlet.py b/stwcs/wcsutil/headerlet.py
index c0dd9b0..0a2e90b 100644
--- a/stwcs/wcsutil/headerlet.py
+++ b/stwcs/wcsutil/headerlet.py
@@ -21,7 +21,6 @@ import time
import numpy as np
from astropy.io import fits
-#import pywcs
from astropy import wcs as pywcs
from astropy.utils import lazyproperty
@@ -2149,7 +2148,9 @@ class Headerlet(fits.HDUList):
_idc2hdr(siphdr, fhdr, towkey=wkey)
if hwcs.wcs.has_cd():
hwcs_header = altwcs.pc2cd(hwcs_header, key=wkey)
-
+ for ax in range(1, hwcs.naxis + 1):
+ hwcs_header['CTYPE{0}{1}'.format(ax, wkey)] = \
+ self[('SIPWCS', 1)].header['CTYPE{0}'.format(ax)]
fhdr.extend(hwcs_header)
fhdr['WCSNAME' + wkey] = wname
# also update with HDRNAME (a non-WCS-standard kw)