Index: /fact/tools/pyscripts/pyfact/plotters.py
===================================================================
--- /fact/tools/pyscripts/pyfact/plotters.py	(revision 13099)
+++ /fact/tools/pyscripts/pyfact/plotters.py	(revision 13100)
@@ -131,14 +131,18 @@
                 return
             
-            if mask.dtype == bool and data.ndim ==1 and len(mask)==1440:
+            elif mask.dtype == bool and data.ndim ==1 and len(mask)==1440:
                 length = mask.sum()
-                mask = np.where(mask)
+                mask = np.where(mask)[0]
                 mxe = np.empty( length )
                 mye = np.empty( length )
                 mdata = np.empty( length )
                 for i,chid in enumerate(mask):
+                    #print i , chid
                     mxe[i] = xe[chid]
                     mye[i] = ye[chid]
                     mdata[i] = data[chid]
+                #print 'mxe', mxe, 'len', len(mxe)
+                #print 'mye', mye, 'len', len(mye)
+                #print 'mxe', mdata, 'len', len(mdata)
 
                 self.ax.axis([-22,22,-22,22])
@@ -156,5 +160,5 @@
 
 
-            if mask.dtype == int  and data.ndim ==1:
+            elif mask.dtype == int  and data.ndim ==1:
                 length = len(mask)
                 mxe = np.empty( length )
@@ -179,4 +183,7 @@
                 plt.draw()
                 
+            else:
+                print "there is a mask, but I don't know how to treat it!!!"
+                sys.exit(-1)
         else: # i.e. when mask is None
         # handle 1D and 2D case differently
