diff options
author | dencheva <dencheva@stsci.edu> | 2012-10-02 14:20:37 -0400 |
---|---|---|
committer | dencheva <dencheva@stsci.edu> | 2012-10-02 14:20:37 -0400 |
commit | 6084761c81d184e7353eb3019e10ff8e2672af91 (patch) | |
tree | f83411f5ce6b3e941bbc7c5e51f117fbdc0423bc /lib/stwcs/wcsutil/headerlet.py | |
parent | 6a6c8dfba6953eaabcd8c1d3501c1666e07e4305 (diff) | |
download | stwcs_hcf-6084761c81d184e7353eb3019e10ff8e2672af91.tar.gz |
Make sure CRDER* keywords go into the headerlet and remove RMS* keywords from primary header
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@19785 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'lib/stwcs/wcsutil/headerlet.py')
-rw-r--r-- | lib/stwcs/wcsutil/headerlet.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/stwcs/wcsutil/headerlet.py b/lib/stwcs/wcsutil/headerlet.py index 89af65c..99a7fe3 100644 --- a/lib/stwcs/wcsutil/headerlet.py +++ b/lib/stwcs/wcsutil/headerlet.py @@ -582,8 +582,8 @@ def _create_primary_HDU(fobj, fname, wcsext, destim, hdrname, wcsname, else: history = '' - rms_ra = fobj[wcsext].header.get("CRDER1"+wcskey, 0) - rms_dec = fobj[wcsext].header.get("CRDER2"+wcskey, 0) + #rms_ra = fobj[wcsext].header.get("CRDER1"+wcskey, 0) + #rms_dec = fobj[wcsext].header.get("CRDER2"+wcskey, 0) if not nmatch: nmatch = fobj[wcsext].header.get("NMATCH"+wcskey, 0) if not catalog: @@ -609,10 +609,12 @@ def _create_primary_HDU(fobj, fname, wcsext, destim, hdrname, wcsname, phdu.header['AUTHOR'] = (author, 'headerlet created by this user') phdu.header['DESCRIP'] = (descrip, 'Short description of headerlet solution') + """ phdu.header['RMS_RA'] = (rms_ra, 'RMS in RA at ref pix of headerlet solution') phdu.header['RMS_DEC'] = (rms_dec, 'RMS in Dec at ref pix of headerlet solution') + """ phdu.header['NMATCH'] = (nmatch, 'Number of sources used for headerlet solution') phdu.header['CATALOG'] = (catalog, @@ -1132,9 +1134,11 @@ def create_headerlet(filename, sciext='SCI', hdrname=None, destim=None, #hwcs = HSTWCS(fobj, ext=ext, wcskey=wcskey) hwcs = pywcs.WCS(fobj[ext].header, fobj, key=wcskey) whdul = hwcs.to_fits(relax=True, wkey=" ") - if hasattr(hwcs, 'orientat'): + #if hasattr(hwcs, 'orientat'): + if 'ORIENTAT' in fobj[ext].header: + orientat = fobj[ext].header['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.update('ORIENTAT', orientat, comment=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')) |