Changeset 13100 for fact/tools/pyscripts/pyfact/plotters.py
- Timestamp:
- 03/14/12 14:59:57 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/pyscripts/pyfact/plotters.py
r13090 r13100 131 131 return 132 132 133 if mask.dtype == bool and data.ndim ==1 and len(mask)==1440:133 elif mask.dtype == bool and data.ndim ==1 and len(mask)==1440: 134 134 length = mask.sum() 135 mask = np.where(mask) 135 mask = np.where(mask)[0] 136 136 mxe = np.empty( length ) 137 137 mye = np.empty( length ) 138 138 mdata = np.empty( length ) 139 139 for i,chid in enumerate(mask): 140 #print i , chid 140 141 mxe[i] = xe[chid] 141 142 mye[i] = ye[chid] 142 143 mdata[i] = data[chid] 144 #print 'mxe', mxe, 'len', len(mxe) 145 #print 'mye', mye, 'len', len(mye) 146 #print 'mxe', mdata, 'len', len(mdata) 143 147 144 148 self.ax.axis([-22,22,-22,22]) … … 156 160 157 161 158 if mask.dtype == int and data.ndim ==1:162 elif mask.dtype == int and data.ndim ==1: 159 163 length = len(mask) 160 164 mxe = np.empty( length ) … … 179 183 plt.draw() 180 184 185 else: 186 print "there is a mask, but I don't know how to treat it!!!" 187 sys.exit(-1) 181 188 else: # i.e. when mask is None 182 189 # handle 1D and 2D case differently
Note:
See TracChangeset
for help on using the changeset viewer.