summaryrefslogtreecommitdiff
path: root/lib/stwcs/gui/delete_headerlet.py
diff options
context:
space:
mode:
authorhack <hack@stsci.edu>2013-10-23 16:40:19 -0400
committerhack <hack@stsci.edu>2013-10-23 16:40:19 -0400
commitd2fa46d680ca75500e77bff3593cf20c911dfe01 (patch)
tree6c5992eb504e4f8b9d88e20eb59117fe6b211a37 /lib/stwcs/gui/delete_headerlet.py
parent689ee24c6c4810dcabb3e6d95a892c976981cfb1 (diff)
downloadstwcs_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/delete_headerlet.py')
-rw-r--r--lib/stwcs/gui/delete_headerlet.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/stwcs/gui/delete_headerlet.py b/lib/stwcs/gui/delete_headerlet.py
index 24a2ba2..9eed22b 100644
--- a/lib/stwcs/gui/delete_headerlet.py
+++ b/lib/stwcs/gui/delete_headerlet.py
@@ -2,6 +2,7 @@ import os
import pyfits
from stsci.tools import teal
+from stsci.tools import parseinput
import stwcs
from stwcs.wcsutil import headerlet
@@ -31,7 +32,7 @@ def getHelpAsString(docstring=False):
return helpString
def run(configObj=None):
-
+
if configObj['hdrname'] == '' and configObj['hdrext'] is None and \
configObj['distname'] == '':
print '='*60
@@ -40,12 +41,12 @@ def run(configObj=None):
print ' Please restart this task and provide a value for one of these parameters.'
print '='*60
return
-
+ filename = parseinput.parseinput(configObj['filename'])[0]
# Call function with properly interpreted input parameters
# Syntax: delete_headerlet(filename, hdrname=None, hdrext=None, distname=None)
- headerlet.delete_headerlet(configObj['filename'],
- hdrname = configObj['hdrname'],
- hdrext = configObj['hdrext'],
+ headerlet.delete_headerlet(filename,
+ hdrname = configObj['hdrname'],
+ hdrext = configObj['hdrext'],
distname = configObj['distname'],
logging = configObj['logging'])