diff options
author | hack <hack@stsci.edu> | 2011-06-14 14:13:48 -0400 |
---|---|---|
committer | hack <hack@stsci.edu> | 2011-06-14 14:13:48 -0400 |
commit | f2960adfdd4d7d01ce29e2a4d2c7ba754f59afda (patch) | |
tree | ebe195f999de6760d26d799596593a6463af0f81 /distortion/mutil.py | |
parent | 0c69f81c515b080bfa80a1ffd6a5af2275067259 (diff) | |
download | stwcs_hcf-f2960adfdd4d7d01ce29e2a4d2c7ba754f59afda.tar.gz |
Print statement in stwcs.distortion.mutil.readIDCtab() has been modified to only print the names of non-CLEAR filters, for all instruments. This addresses concerns from the WFC3 team where this code reported finding an IDCTAB row for 'F606W and CLEAR'. These print statements may eventually be moved to only be printed to a log file, but for now, these format changes would still be used even after that move.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13125 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'distortion/mutil.py')
-rw-r--r-- | distortion/mutil.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/distortion/mutil.py b/distortion/mutil.py index b5281e5..2934d17 100644 --- a/distortion/mutil.py +++ b/distortion/mutil.py @@ -159,15 +159,28 @@ def readIDCtab (tabname, chip=1, date=None, direction='forward', if int(detchip) == int(chip) or int(detchip) == -999: row = i break + + joinstr = ',' + if 'CLEAR' in filter1: + f1str = '' + joinstr = '' + else: + f1str = filter1.strip() + if 'CLEAR' in filter2: + f2str = '' + joinstr = '' + else: + f2str = filter2.strip() + filtstr = (joinstr.join([f1str,f2str])).strip() if row < 0: err_str = '\nProblem finding row in IDCTAB! Could not find row matching:\n' err_str += ' CHIP: '+str(detchip)+'\n' - err_str += ' FILTERS: '+filter1+','+filter2+'\n' + err_str += ' FILTERS: '+filstr+'\n' ftab.close() del ftab raise LookupError,err_str else: - print '- IDCTAB: Distortion model from row',str(row+1),'for chip',detchip,':',filter1.strip(),'and',filter2.strip() + print '- IDCTAB: Distortion model from row',str(row+1),'for chip',detchip,':',filtstr # Read in V2REF and V3REF: this can either come from current table, # or from an OFFTAB if time-dependent (i.e., for WFPC2) |