Index: /fact/tools/pyscripts/camplotter.py
===================================================================
--- /fact/tools/pyscripts/camplotter.py	(revision 12874)
+++ /fact/tools/pyscripts/camplotter.py	(revision 12875)
@@ -6,10 +6,18 @@
 class camplotter( object ):
     def __init__( self ):
-        chid, y,x,xe,ye,yh,xh,softid,hardid = np.loadtxt("map_dn.txt",unpack=True)
+        chid, y,x,ye,xe,yh,xh,softid,hardid = np.loadtxt("map_dn.txt",unpack=True)
         self.fig = plt.figure()
         self.xe = xe
         self.ye = ye
         self.H = (6,0,30./180.*3.1415926)
-
+        
+        coor2chid = {}
+        chid2coor = []
+        for i in range ( len(chid) ):
+            coor2chid[ (x[i],y[i]) ] = chid[i]
+            chid2coor.append( (x[i],y[i]) )
+        
+#        print coor2chid 
+#        print chid2coor
 
 
@@ -29,4 +37,5 @@
         
     cplt = camplotter()
+    
     # np.savez ( filename, amplitude=maxAmp, time=maxPos, integral=integ)
     npz = np.load( inputfname )
@@ -54,7 +63,8 @@
     ax6.grid(True)
     
-    thr = 40.
-    
-    print '------------ thr=', thr, '-------------------'
+    thr = 50
+    hithr = 80
+    lothr = 40
+    print '------------ hiTHR=', hithr, 'loTHR=', lothr ,'-------------------'
     print '------------', len(amp[:,0]), '-------------------'
 
@@ -67,9 +77,23 @@
         my = ma.masked_where(mamp.mask == True, cplt.ye)
         
+        core = ma.masked_less(amp[i,:], hithr)
+        edgecand = ma.masked_less(amp[i,:], lothr)
+        #edgecand = ma.masked_where(core.mask == True, edgecand)
+        
+        mxc = ma.masked_where(core.mask == True, cplt.xe).compressed()
+        myc = ma.masked_where(core.mask == True, cplt.ye).compressed()
+        mxe = ma.masked_where(edgecand.mask == True, cplt.xe).compressed()
+        mye = ma.masked_where(edgecand.mask == True, cplt.ye).compressed()
+        
+        
         ax1.cla()
         ax2.cla()
         ax3.cla()
         ax1.scatter(cplt.xe,cplt.ye,s=65,alpha=0.75,marker=cplt.H, c=amp[i,:], edgecolors='none', label='amp')
-        ax1.scatter(mx.compressed() , my.compressed() ,s=65,alpha=0.75,marker=cplt.H, facecolors='none', linewidths=3, edgecolors='r')
+        #ax1.scatter(mx.compressed() , my.compressed() ,s=65,alpha=0.75,marker=cplt.H, facecolors='none', linewidths=3, edgecolors='r')
+        if ( len(mxe) > 0 ):
+            ax1.scatter(mxe , mye ,s=65,alpha=0.75,marker=cplt.H, facecolors='none', linewidths=2, edgecolors='r')
+        if ( len(mxc) > 0 ):
+            ax1.scatter(mxc , myc ,s=65,alpha=0.75,marker=cplt.H, facecolors='none', linewidths=3, edgecolors='k')
         ax1.axis([-22,22,-22,22])
         
