diff options
author | hack <hack@stsci.edu> | 2013-10-23 16:40:19 -0400 |
---|---|---|
committer | hack <hack@stsci.edu> | 2013-10-23 16:40:19 -0400 |
commit | d2fa46d680ca75500e77bff3593cf20c911dfe01 (patch) | |
tree | 6c5992eb504e4f8b9d88e20eb59117fe6b211a37 /lib/stwcs/gui/apply_headerlet.py | |
parent | 689ee24c6c4810dcabb3e6d95a892c976981cfb1 (diff) | |
download | stwcs_hcf-d2fa46d680ca75500e77bff3593cf20c911dfe01.tar.gz |
STWCS v1.1.2: This update only includes changes to the headerlet module and related TEAL interface modules. The changes include:
- Fix calls to PyFITS to allow writing of headerlet out to files
- Implement support for multiple file inputs for apply_header, delete_headerlet and attach_headerlet TEAL tasks and their underlying Python interfaces. (Ticket #1063)
The docstrings for all updated headerlet functions were updated to reflect the new input capabilities.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stwcs/trunk@26987 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'lib/stwcs/gui/apply_headerlet.py')
-rw-r--r-- | lib/stwcs/gui/apply_headerlet.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/stwcs/gui/apply_headerlet.py b/lib/stwcs/gui/apply_headerlet.py index 1b97e38..d87f586 100644 --- a/lib/stwcs/gui/apply_headerlet.py +++ b/lib/stwcs/gui/apply_headerlet.py @@ -1,8 +1,8 @@ import os -import string +import string import pyfits -from stsci.tools import teal +from stsci.tools import teal, parseinput import stwcs from stwcs.wcsutil import headerlet @@ -31,12 +31,16 @@ def getHelpAsString(docstring=False): def run(configObj=None): + # start by interpreting filename and hdrlet inputs + filename = parseinput.parseinput(configObj['filename'])[0] + hdrlet = parseinput.parseinput(configObj['hdrlet'])[0] + if configObj['primary']: # Call function with properly interpreted input parameters # Syntax: apply_headerlet_as_primary(filename, hdrlet, attach=True, # archive=True, force=False, verbose=False) - headerlet.apply_headerlet_as_primary(configObj['filename'], - configObj['hdrlet'],attach=configObj['attach'], + headerlet.apply_headerlet_as_primary(filename, + hdrlet,attach=configObj['attach'], archive=configObj['archive'],force=configObj['force'], logging=configObj['logging']) else: @@ -45,10 +49,9 @@ def run(configObj=None): wcskey = configObj['wcskey'] if wcskey == '': wcskey = None # Call function with properly interpreted input parameters - # apply_headerlet_as_alternate(filename, hdrlet, attach=True, + # apply_headerlet_as_alternate(filename, hdrlet, attach=True, # wcskey=None, wcsname=None, verbose=False) - headerlet.apply_headerlet_as_alternate(configObj['filename'], - configObj['hdrlet'], attach=configObj['attach'], + headerlet.apply_headerlet_as_alternate(filename, + hdrlet, attach=configObj['attach'], wcsname=wcsname, wcskey=wcskey, logging=configObj['logging']) - |