diff options
author | Mario Mulansky <mario.mulansky@gmx.net> | 2015-10-12 11:20:03 +0200 |
---|---|---|
committer | Mario Mulansky <mario.mulansky@gmx.net> | 2018-06-02 12:59:43 -0700 |
commit | 6c68690b992a6dfabf8259e265cf427fc6f193eb (patch) | |
tree | 2d929ef6a5108a9ad24976a98096f46893818ff4 /pyspike/cython/cython_profiles.pyx | |
parent | 18ea80e2d01e9eb4ceee17219f91098efbcdf67c (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 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 |