From 6c68690b992a6dfabf8259e265cf427fc6f193eb Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Mon, 12 Oct 2015 11:20:03 +0200 Subject: added coincidence single profile to python backend missing function in python backend added, identified and fixed a bug in the implementation as well --- pyspike/cython/cython_profiles.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pyspike/cython/cython_profiles.pyx') diff --git a/pyspike/cython/cython_profiles.pyx b/pyspike/cython/cython_profiles.pyx index eb4d157..aa24db4 100644 --- a/pyspike/cython/cython_profiles.pyx +++ b/pyspike/cython/cython_profiles.pyx @@ -473,7 +473,7 @@ def coincidence_single_profile_cython(double[:] spikes1, double[:] spikes2, if j > -1 and fabs(spikes1[i]-spikes2[j]) < tau: # current spike in st1 is coincident c[i] = 1 - if j < N2-1 and spikes2[j] < spikes1[i]: + if j < N2-1 and (j < 0 or spikes2[j] < spikes1[i]): # in case spikes2[j] is before spikes1[i] it has to be the one # right before (see above), hence we move one forward and also # check the next spike -- cgit v1.2.3