def generateSimpleCoincMatrix(nCoinc=10, length=500, activity=50):
 assert ((nCoinc * activity) <= length), "can't generate non-overlapping coincidences"
 coincMatrix = SM32(0, length)
 coinc = numpy.zeros(length, dtype='int32')
 for i in xrange(nCoinc):
  coinc[:] = 0
  coinc[(i * activity):((i + 1) * activity)] = 1
  coincMatrix.addRow(coinc)
 return coincMatrix

def generateSimpleCoincMatrix ( nCoinc = 10 , length = 500 , activity = 50 ) : assert ( ( nCoinc * activity ) <= length ) , "can't generate non-overlapping coincidences" coincMatrix = SM32 ( 0 , length ) coinc = numpy . zeros ( length , dtype = 'int32' ) for i in xrange ( nCoinc ) : coinc [ : ] = 0 coinc [ ( i * activity ) : ( ( i + 1 ) * activity ) ] = 1 coincMatrix . addRow ( coinc ) return coincMatrix
generate a non overlapping coincidence matrix .