diff options
| author | hack <hack@stsci.edu> | 2012-10-22 17:15:28 -0400 | 
|---|---|---|
| committer | hack <hack@stsci.edu> | 2012-10-22 17:15:28 -0400 | 
| commit | faeb7556f35bbc7ec8c1fa8db5d4ec4105b3d53f (patch) | |
| tree | 74871b6b0da9f509a1036b41f015a9f0dc125e2a | |
| parent | 128637b72d71562a6fc4b40e859cc0720a1fb921 (diff) | |
| download | stwcs_hcf-faeb7556f35bbc7ec8c1fa8db5d4ec4105b3d53f.tar.gz | |
Added 'catalog' to the write_headerlet TEAL interface.  It already existed in the headerlet API, so no changes were needed in the headerlet code itself.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@20022 fe389314-cf27-0410-b35b-8c050e845b92
| -rw-r--r-- | lib/stwcs/gui/pars/write_headerlet.cfg | 1 | ||||
| -rw-r--r-- | lib/stwcs/gui/pars/write_headerlet.cfgspc | 1 | ||||
| -rw-r--r-- | lib/stwcs/gui/write_headerlet.py | 14 | 
3 files changed, 9 insertions, 7 deletions
| diff --git a/lib/stwcs/gui/pars/write_headerlet.cfg b/lib/stwcs/gui/pars/write_headerlet.cfg index 8c2bc8b..b95af9d 100644 --- a/lib/stwcs/gui/pars/write_headerlet.cfg +++ b/lib/stwcs/gui/pars/write_headerlet.cfg @@ -7,6 +7,7 @@ wcskey = "PRIMARY"  wcsname = ""  author = ""  descrip = "" +catalog = ""  history = ""  sciext = "SCI"  destim = "" diff --git a/lib/stwcs/gui/pars/write_headerlet.cfgspc b/lib/stwcs/gui/pars/write_headerlet.cfgspc index b8abb2b..ba28b05 100644 --- a/lib/stwcs/gui/pars/write_headerlet.cfgspc +++ b/lib/stwcs/gui/pars/write_headerlet.cfgspc @@ -7,6 +7,7 @@ wcskey = option_kw("A","B","C","D","E","F","G","H","I","J","K","L","M","N","P","  wcsname = string_kw(default="", comment="Create headerlet from WCS with this name")  author = string_kw(default="", comment="Author name for creator of headerlet")  descrip = string_kw(default="", comment="Short description of headerlet solution") +catalog = string_kw(default="", comment="Reference frame for headerlet solution")  history = string_kw(default="", comment="Name of ASCII file containing history for headerlet")  sciext = string_kw(default="SCI", comment="EXTNAME of extension with WCS")  destim = string_kw(default="", comment="Rootname of image to which this headerlet applies ") diff --git a/lib/stwcs/gui/write_headerlet.py b/lib/stwcs/gui/write_headerlet.py index 1debcf6..ffd7416 100644 --- a/lib/stwcs/gui/write_headerlet.py +++ b/lib/stwcs/gui/write_headerlet.py @@ -41,7 +41,7 @@ def run(configObj=None):          print '    Please check the working directory and restart this task.'          print '='*60          return -         +      if configObj['hdrname'] in ['',' ','INDEF']:          print '='*60          print 'ERROR:' @@ -57,10 +57,10 @@ def run(configObj=None):          print '    Please restart this task and provide a value for this parameter.'          print '='*60          return -         +      str_kw = ['wcsname','destim','sipname','npolfile','d2imfile', -            'descrip','history','author','output'] +            'descrip','history','author','output','catalog']      # create dictionary of remaining parameters, deleting extraneous ones      # such as those above @@ -70,17 +70,17 @@ def run(configObj=None):      del cdict['_task_name_']      del cdict['filename']      del cdict['hdrname'] -     +      # Convert blank string input as None      for kw in str_kw:          if cdict[kw] == '': cdict[kw] = None      if cdict['wcskey'].lower() == 'primary': cdict['wcskey'] = ' '      # Call function with properly interpreted input parameters -    # Syntax: write_headerlet(filename, hdrname, output, sciext='SCI',  +    # Syntax: write_headerlet(filename, hdrname, output, sciext='SCI',      #                    wcsname=None, wcskey=None, destim=None, -    #                    sipname=None, npolfile=None, d2imfile=None,  +    #                    sipname=None, npolfile=None, d2imfile=None,      #                    author=None, descrip=None, history=None,      #                    attach=True, clobber=False) -    headerlet.write_headerlet(flist, configObj['hdrname'],  +    headerlet.write_headerlet(flist, configObj['hdrname'],                                **cdict)
\ No newline at end of file | 
