diff options
author | Mario Mulansky <mario.mulansky@gmx.net> | 2015-10-12 11:20:03 +0200 |
---|---|---|
committer | Mario Mulansky <mario.mulansky@gmx.net> | 2015-10-12 11:20:03 +0200 |
commit | 1fa8493ce15af8cd4c057eece155f1557fc241ea (patch) | |
tree | d664cd11621bb5d6736f946d31dfac0b6041a546 /pyspike/cython/cython_profiles.pyx | |
parent | b9850d8c3e35290858e4ef0b2f05f66b0f7397b2 (diff) |
added coincidence single profile to python backend
missing function in python backend added, identified and fixed a bug in the
implementation as well
Diffstat (limited to 'pyspike/cython/cython_profiles.pyx')
-rw-r--r-- | pyspike/cython/cython_profiles.pyx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pyspike/cython/cython_profiles.pyx b/pyspike/cython/cython_profiles.pyx index 61d1b18..4663f2e 100644 --- a/pyspike/cython/cython_profiles.pyx +++ b/pyspike/cython/cython_profiles.pyx @@ -449,7 +449,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 |