Changeset 3010 for trunk/python
- Timestamp:
- 10/31/14 21:26:51 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r3008 r3010 959 959 statunit= '' 960 960 if getchan: 961 qx, qy = self.chan2data(rowno=i, chan=chan[i]) 962 if rtnabc: 963 statvals.append(qx['value']) 964 refstr = ('(value: %'+form) % (qy['value'])+' ['+qy['unit']+'])' 965 statunit= '['+qx['unit']+']' 961 if self._is_all_chan_flagged(i): 962 if rtnabc: 963 statvals.append(None) 966 964 else: 967 refstr = ('(@ %'+form) % (qx['value'])+' ['+qx['unit']+'])' 968 969 if skip_flaggedrow and self._getflagrow(i): 970 statvals[i] = None 971 continue 965 qx, qy = self.chan2data(rowno=i, chan=chan[i]) 966 if rtnabc: 967 statvals.append(qx['value']) 968 refstr = ('(value: %'+form) % (qy['value'])+' ['+qy['unit']+'])' 969 statunit= '['+qx['unit']+']' 970 else: 971 refstr = ('(@ %'+form) % (qx['value'])+' ['+qx['unit']+'])' 972 973 if self._is_all_chan_flagged(i): 974 if not rtnabc: 975 statvals[i] = None 976 if skip_flaggedrow: 977 continue 972 978 973 979 tm = self._gettime(i) … … 981 987 if len(rows) > 1: 982 988 # out += ('= %'+form) % (outvec[i]) +' '+refstr+'\n' 983 out += ('= %'+form) % (statvals[i]) +' '+refstr+'\n' 989 if statvals[i] is None: 990 out += ('= None(flagged)') + ' '+refstr+'\n' 991 else: 992 out += ('= %'+form) % (statvals[i]) +' '+refstr+'\n' 984 993 else: 985 994 # out += ('= %'+form) % (outvec[0]) +' '+refstr+'\n' 986 out += ('= %'+form) % (statvals[0]) +' '+refstr+'\n' 995 if statvals[0] is None: 996 out += ('= None(flagged)') + ' '+refstr+'\n' 997 else: 998 out += ('= %'+form) % (statvals[0]) +' '+refstr+'\n' 987 999 out += sep+"\n" 988 1000 … … 1005 1017 asaplog.push(''.join(x), False) 1006 1018 1019 if skip_flaggedrow: 1020 nstatvals = len(statvals) 1021 for i in reversed(xrange(nstatvals)): 1022 if statvals[i] is None: 1023 del statvals[i] 1007 1024 return statvals 1008 1025
Note:
See TracChangeset
for help on using the changeset viewer.