diff options
author | Nadia Dencheva <nadia.dencheva@gmail.com> | 2016-08-07 17:42:30 -0400 |
---|---|---|
committer | Nadia Dencheva <nadia.dencheva@gmail.com> | 2016-08-07 17:42:30 -0400 |
commit | 8c5824639177741dab4f0e1266f22ec2673cde1e (patch) | |
tree | 004f9ec80e06f8d8e712e615e20574270847648b /stwcs/wcsutil/headerlet.py | |
parent | a2e16e39b0eb8ac0251a6473c60fee0d437c3a5f (diff) | |
download | stwcs_hcf-8c5824639177741dab4f0e1266f22ec2673cde1e.tar.gz |
fix for '-SIP' in ctype
Diffstat (limited to 'stwcs/wcsutil/headerlet.py')
-rw-r--r-- | stwcs/wcsutil/headerlet.py | 5 |
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) |