diff options
Diffstat (limited to 'lib/stwcs/gui')
-rw-r--r-- | lib/stwcs/gui/apply_headerlet.py | 3 | ||||
-rw-r--r-- | lib/stwcs/gui/archive_headerlet.py | 13 | ||||
-rw-r--r-- | lib/stwcs/gui/attach_headerlet.py | 5 | ||||
-rw-r--r-- | lib/stwcs/gui/delete_headerlet.py | 3 | ||||
-rw-r--r-- | lib/stwcs/gui/extract_headerlet.py | 5 | ||||
-rw-r--r-- | lib/stwcs/gui/headerlet_summary.py | 7 | ||||
-rw-r--r-- | lib/stwcs/gui/restore_headerlet.py | 11 | ||||
-rw-r--r-- | lib/stwcs/gui/updatewcs.py | 5 | ||||
-rw-r--r-- | lib/stwcs/gui/write_headerlet.py | 5 |
9 files changed, 33 insertions, 24 deletions
diff --git a/lib/stwcs/gui/apply_headerlet.py b/lib/stwcs/gui/apply_headerlet.py index d87f586..8d8daf9 100644 --- a/lib/stwcs/gui/apply_headerlet.py +++ b/lib/stwcs/gui/apply_headerlet.py @@ -1,7 +1,8 @@ import os import string -import pyfits +#import pyfits +from astropy.io import fits as pyfits from stsci.tools import teal, parseinput import stwcs diff --git a/lib/stwcs/gui/archive_headerlet.py b/lib/stwcs/gui/archive_headerlet.py index 735baa4..65e133a 100644 --- a/lib/stwcs/gui/archive_headerlet.py +++ b/lib/stwcs/gui/archive_headerlet.py @@ -1,7 +1,8 @@ import os -import string +import string -import pyfits +#import pyfits +from astropy.io import fits as pyfits from stsci.tools import teal import stwcs @@ -41,7 +42,7 @@ 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'] @@ -53,16 +54,16 @@ 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: archive_as_headerlet(filename, sciext='SCI', wcsname=None, wcskey=None, + # Syntax: archive_as_headerlet(filename, sciext='SCI', wcsname=None, wcskey=None, # hdrname=None, destim=None, - # sipname=None, npolfile=None, d2imfile=None, + # sipname=None, npolfile=None, d2imfile=None, # author=None, descrip=None, history=None, # hdrlet=None, clobber=False) headerlet.archive_as_headerlet(configObj['filename'], configObj['hdrname'], diff --git a/lib/stwcs/gui/attach_headerlet.py b/lib/stwcs/gui/attach_headerlet.py index e33fdf2..5a3bdc8 100644 --- a/lib/stwcs/gui/attach_headerlet.py +++ b/lib/stwcs/gui/attach_headerlet.py @@ -1,6 +1,7 @@ import os -import pyfits +#import pyfits +from astropy.io import fits as pyfits from stsci.tools import teal import stwcs @@ -31,7 +32,7 @@ def getHelpAsString(docstring=False): return helpString def run(configObj=None): - + headerlet.attach_headerlet(configObj['filename'],configObj['hdrlet'], configObj['logging']) diff --git a/lib/stwcs/gui/delete_headerlet.py b/lib/stwcs/gui/delete_headerlet.py index 9eed22b..f25c545 100644 --- a/lib/stwcs/gui/delete_headerlet.py +++ b/lib/stwcs/gui/delete_headerlet.py @@ -1,6 +1,7 @@ import os -import pyfits +#import pyfits +from astropy.io import fits as pyfits from stsci.tools import teal from stsci.tools import parseinput diff --git a/lib/stwcs/gui/extract_headerlet.py b/lib/stwcs/gui/extract_headerlet.py index c807920..16a0aee 100644 --- a/lib/stwcs/gui/extract_headerlet.py +++ b/lib/stwcs/gui/extract_headerlet.py @@ -1,6 +1,7 @@ import os -import pyfits +#import pyfits +from astropy.io import fits as pyfits from stsci.tools import teal import stwcs @@ -51,7 +52,7 @@ def run(configObj=None): del cdict['output'] # Call function with properly interpreted input parameters - # Syntax: extract_headerlet(filename, output, extnum=None, hdrname=None, + # Syntax: extract_headerlet(filename, output, extnum=None, hdrname=None, # clobber=False, verbose=100) headerlet.extract_headerlet(configObj['filename'], configObj['output'], **cdict) diff --git a/lib/stwcs/gui/headerlet_summary.py b/lib/stwcs/gui/headerlet_summary.py index 1b2245e..7772a95 100644 --- a/lib/stwcs/gui/headerlet_summary.py +++ b/lib/stwcs/gui/headerlet_summary.py @@ -1,6 +1,7 @@ import os -import pyfits +#import pyfits +from astropy.io import fits as pyfits from stsci.tools import teal import stwcs @@ -31,7 +32,7 @@ def getHelpAsString(docstring=False): return helpString def run(configObj=None): - + # create dictionary of remaining parameters, deleting extraneous ones # such as those above cdict = configObj.dict() @@ -43,7 +44,7 @@ def run(configObj=None): cdict['columns'] = None # Call function with properly interpreted input parameters - # Syntax: headerlet_summary(filename,columns=None,pad=2,maxwidth=None, + # Syntax: headerlet_summary(filename,columns=None,pad=2,maxwidth=None, # output=None,clobber=True,quiet=False) headerlet.headerlet_summary(configObj['filename'],**cdict) diff --git a/lib/stwcs/gui/restore_headerlet.py b/lib/stwcs/gui/restore_headerlet.py index 1208897..46575db 100644 --- a/lib/stwcs/gui/restore_headerlet.py +++ b/lib/stwcs/gui/restore_headerlet.py @@ -1,7 +1,8 @@ import os -import string +import string -import pyfits +#import pyfits +from astropy.io import fits as pyfits from stsci.tools import teal import stwcs @@ -30,10 +31,10 @@ def getHelpAsString(docstring=False): return helpString def run(configObj=None): - + if configObj['distname'] not in ['',' ','INDEF']: # Call function with properly interpreted input parameters - # Syntax: restore_all_with_distname(filename, distname, primary, + # Syntax: restore_all_with_distname(filename, distname, primary, # archive=True, sciext='SCI', verbose=False) headerlet.restore_all_with_distname(configObj['filename'], configObj['distname'],configObj['primary'], @@ -41,7 +42,7 @@ def run(configObj=None): logging=configObj['logging']) else: # Call function with properly interpreted input parameters - # restore_from_headerlet(filename, hdrname=None, hdrext=None, + # restore_from_headerlet(filename, hdrname=None, hdrext=None, # archive=True, force=False) headerlet.restore_from_headerlet(configObj['filename'], hdrname=configObj['hdrname'],hdrext=configObj['hdrext'], diff --git a/lib/stwcs/gui/updatewcs.py b/lib/stwcs/gui/updatewcs.py index e818d96..1e5b9d9 100644 --- a/lib/stwcs/gui/updatewcs.py +++ b/lib/stwcs/gui/updatewcs.py @@ -1,6 +1,7 @@ import os -import pyfits +#import pyfits +from astropy.io import fits as pyfits from stsci.tools import parseinput from stsci.tools import fileutil from stsci.tools import teal @@ -41,7 +42,7 @@ def run(configObj=None): # Interpret primary parameters from configObj instance extname = configObj['extname'] input = configObj['input'] - + # create dictionary of remaining parameters, deleting extraneous ones # such as those above cdict = configObj.dict() diff --git a/lib/stwcs/gui/write_headerlet.py b/lib/stwcs/gui/write_headerlet.py index b9b17ad..9ba0639 100644 --- a/lib/stwcs/gui/write_headerlet.py +++ b/lib/stwcs/gui/write_headerlet.py @@ -1,6 +1,7 @@ import os -import pyfits +#import pyfits +from astropy.io import fits as pyfits from stsci.tools import teal from stsci.tools import parseinput @@ -52,7 +53,7 @@ def run(configObj=None): if configObj['output'] in ['',' ','INDEF']: configObj['output'] = None - + str_kw = ['wcsname','destim','sipname','npolfile','d2imfile', 'descrip','history','author','output','catalog'] |