Index: fact/tools/pyscripts/sandbox/kraehenb/CalFitsPerformanceWeave.py
===================================================================
--- fact/tools/pyscripts/sandbox/kraehenb/CalFitsPerformanceWeave.py	(revision 13451)
+++ fact/tools/pyscripts/sandbox/kraehenb/CalFitsPerformanceWeave.py	(revision 13452)
@@ -87,4 +87,20 @@
 #        if x:
 #            print x,
+
+#    #Old attempts using numpy functions
+#    npcalevent = npcalevent.reshape((caltest.npix, caltest.nroi))
+#    npthr = npcalevent>2.5 #true if above threshold
+#    npthr = npthr[:,1:-14] * np.logical_not(npthr[:,:-15]) #only true for the zero crossings, shape (1400,285) [smaller due to necessary integration range]
+##    print [(x,y) for x,y in zip(npthr.nonzero()[0],npthr.nonzero()[1])] #print the coordinates, range 0-1399,0-284
+#    
+#    #Various versions to get the integral, all with approximately the same miserable speed (3 Hz), except for the last one (vectorized function) with ~4.3 Hz
+#    #Missing: add deadtime after an integration, remove start & end of the array
+##    integrals = [np.sum(npcalevent[x,y+5:y+15]) for x,y in np.transpose(npthr.nonzero())]
+##    integrals = [np.sum(npcalevent[x,y+5:y+15]) for x,y in zip(npthr.nonzero()[0],npthr.nonzero()[1])]
+##    integrals = [np.sum(npcalevent[x,y+5:y+15]) for x,y in itertools.izip(npthr.nonzero()[0],npthr.nonzero()[1])]
+##    integrals = map((lambda index_a,index_b: np.sum(npcalevent[index_a,index_b+5:index_b+15])),npthr.nonzero()[0],npthr.nonzero()[1])
+#    integrals = vecoffsum(npthr.nonzero()[0],npthr.nonzero()[1])
+#    print len(integrals)
+
 #    print caltest.event_id, caltest.event_triggertype, caltest.event_caldata[10]
 #    pass
