diff options
author | dencheva <dencheva@stsci.edu> | 2009-02-12 14:57:59 -0500 |
---|---|---|
committer | dencheva <dencheva@stsci.edu> | 2009-02-12 14:57:59 -0500 |
commit | 29e09d97fbac778ad0d216fef4b21fc189315bf4 (patch) | |
tree | a35d83a729925fdd8fe7fd29021864f395c5d414 /hstwcs | |
parent | 48391819c2284d83a2440b3ba7173a2e4c18354b (diff) | |
download | stwcs_hcf-29e09d97fbac778ad0d216fef4b21fc189315bf4.tar.gz |
Added support for nicmos, stis, wfc3
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/development/trunk/updatewcs@7549 fe389314-cf27-0410-b35b-8c050e845b92
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) |