diff options
author | Mario Mulansky <mario.mulansky@gmx.net> | 2014-10-14 17:49:23 +0200 |
---|---|---|
committer | Mario Mulansky <mario.mulansky@gmx.net> | 2014-10-14 17:49:23 +0200 |
commit | 65801901e6d3325c8d1c82ab92334ca19ebd92d7 (patch) | |
tree | cd15a17ef3da186e97b6aa222ad3ee3997f6ea23 /pyspike/cython_distance.pyx | |
parent | 1bd3fa7ef0bf395f44aea493858bbdd563fcb0c4 (diff) |
changed isi distance profile to abs values
Diffstat (limited to 'pyspike/cython_distance.pyx')
-rw-r--r-- | pyspike/cython_distance.pyx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pyspike/cython_distance.pyx b/pyspike/cython_distance.pyx index ccf8060..178fcba 100644 --- a/pyspike/cython_distance.pyx +++ b/pyspike/cython_distance.pyx @@ -60,7 +60,7 @@ def isi_distance_cython(double[:] s1, isi_values = np.empty(N1+N2-1) with nogil: # release the interpreter to allow multithreading - isi_values[0] = (nu1-nu2)/fmax(nu1,nu2) + isi_values[0] = fabs(nu1-nu2)/fmax(nu1, nu2) index1 = 0 index2 = 0 index = 1 @@ -88,7 +88,7 @@ def isi_distance_cython(double[:] s1, nu1 = s1[index1+1]-s1[index1] nu2 = s2[index2+1]-s2[index2] # compute the corresponding isi-distance - isi_values[index] = (nu1 - nu2) / fmax(nu1, nu2) + isi_values[index] = fabs(nu1 - nu2) / fmax(nu1, nu2) index += 1 # the last event is the interval end spike_events[index] = s1[N1] |