That is because += 1 in this case does not work, I believe it's a bug in your code.
The idea is to sum the number of spikes on the same pixel in the same time window, but the way it's written it does not sum; i did many tests myself.
In order to work as expected, the code should be something like this:
elif binningMode.upper() == 'SUM':
for p,y,x,t in zip(pEvent[validInd], yEvent[validInd], xEvent[validInd], tEvent[validInd]):
emptyTensor[p,y,x,t] += 1/samplingTime
This implementation is terribly NOT efficient (up to the point it is unfeasible) but it works as expected.
I can't think of a clever way to use the np.array characteristics to make it work efficiently; any ideas?
The point is, in my opinion, the way the code is written now, binning mode OR = binning mode SUM, and I am sure it was not supposed to be this way.
in spikeFileIO.py, the following lines have the same effect as binningMode = 'OR' :
That is because += 1 in this case does not work, I believe it's a bug in your code. The idea is to sum the number of spikes on the same pixel in the same time window, but the way it's written it does not sum; i did many tests myself. In order to work as expected, the code should be something like this:
This implementation is terribly NOT efficient (up to the point it is unfeasible) but it works as expected. I can't think of a clever way to use the np.array characteristics to make it work efficiently; any ideas?
The point is, in my opinion, the way the code is written now, binning mode OR = binning mode SUM, and I am sure it was not supposed to be this way.
Cheers,