From d2fa46d680ca75500e77bff3593cf20c911dfe01 Mon Sep 17 00:00:00 2001 From: hack Date: Wed, 23 Oct 2013 20:40:19 +0000 Subject: 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 --- lib/stwcs/gui/apply_headerlet.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'lib/stwcs/gui/apply_headerlet.py') 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']) - -- cgit