From f2960adfdd4d7d01ce29e2a4d2c7ba754f59afda Mon Sep 17 00:00:00 2001 From: hack Date: Tue, 14 Jun 2011 18:13:48 +0000 Subject: 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 --- distortion/mutil.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'distortion/mutil.py') 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) -- cgit