diff options
Diffstat (limited to 'hstwcs')
-rw-r--r-- | hstwcs/__init__.py | 15 | ||||
-rw-r--r-- | hstwcs/apply_corrections.py | 8 |
2 files changed, 19 insertions, 4 deletions
diff --git a/hstwcs/__init__.py b/hstwcs/__init__.py index dfb2e4b..926d4c3 100644 --- a/hstwcs/__init__.py +++ b/hstwcs/__init__.py @@ -129,6 +129,14 @@ def getNrefchip(fobj): Nrefchip = 1 elif instrument == 'NICMOS': Nrefchip = fobj[0].header['CAMERA'] + elif instrument == 'WFC3': + detector = fobj[0].header['DETECTOR'] + if detector == 'UVIS': + Nrefchip =2 + else: + Nrefchip = 1 + else: + Nrefchip = 1 return Nrefchip, Nrefext def checkFiles(input): @@ -136,9 +144,9 @@ def checkFiles(input): Purpose ======= Checks that input files are in the correct format. - Converts geis and waiver fits files to multietension fits. + Converts geis and waiver fits files to multiextension fits. """ - from pytools.check_files import geis2mef, waiver2mef + from pytools.check_files import geis2mef, waiver2mef, checkFiles removed_files = [] newfiles = [] for file in input: @@ -176,5 +184,8 @@ def checkFiles(input): print 'The following files will be removed from the list of files to be processed :\n' for f in removed_files: print f + + newfiles = checkFiles(newfiles)[0] + return newfiles diff --git a/hstwcs/apply_corrections.py b/hstwcs/apply_corrections.py index 22dfbbc..b30c4c5 100644 --- a/hstwcs/apply_corrections.py +++ b/hstwcs/apply_corrections.py @@ -12,7 +12,10 @@ __docformat__ = 'restructuredtext' # These are the default corrections applied also in the pipeline. allowed_corrections={'WFPC2': ['MakeWCS','CompSIP', 'VACorr', 'DGEOCorr'], - 'ACS': ['TDDCorr', 'MakeWCS', 'CompSIP','VACorr', 'DGEOCorr'] + 'ACS': ['TDDCorr', 'MakeWCS', 'CompSIP','VACorr', 'DGEOCorr'], + 'STIS': ['MakeWCS', 'CompSIP','VACorr'], + 'NICMOS': ['MakeWCS', 'CompSIP','VACorr'], + 'WFC3': ['MakeWCS', 'CompSIP','VACorr'], } def setCorrections(fname, vacorr=True, tddcorr=True, dgeocorr=True): @@ -115,9 +118,10 @@ def applyDgeoCorr(fname, udgeocorr): # in first extension header applyDGEOCorr = True except KeyError: - print 'DGEOFILE keyword not found in primary header' applyDGEOCorr = False + return applyDGEOCorr + if isOldStyleDGEO(fname, fdgeo0): applyDGEOCorr = False return (applyDGEOCorr and udgeocorr) |