summaryrefslogtreecommitdiff
path: root/test/test_empty.py
diff options
context:
space:
mode:
authorMario Mulansky <mario.mulansky@gmx.net>2015-12-14 14:23:02 +0100
committerMario Mulansky <mario.mulansky@gmx.net>2015-12-14 14:23:02 +0100
commitb970055641b215d30b671ee810e29c6a55e6214a (patch)
tree084efe915343c652c4398907145378cf2582613f /test/test_empty.py
parent691bf73c06322a2c47c37a5c48d085b789c8e8bf (diff)
improved edge correction for spike distance
Improvement following Eeros suggestions to use auxiliary spike at the edges consistently with the corresponding corrected ISI intervals.
Diffstat (limited to 'test/test_empty.py')
-rw-r--r--test/test_empty.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_empty.py b/test/test_empty.py
index af7fb36..5a0042f 100644
--- a/test/test_empty.py
+++ b/test/test_empty.py
@@ -70,8 +70,8 @@ def test_spike_empty():
st1 = SpikeTrain([], edges=(0.0, 1.0))
st2 = SpikeTrain([0.4, ], edges=(0.0, 1.0))
d = spk.spike_distance(st1, st2)
- assert_almost_equal(d, 0.4*0.4*1.0/(0.4+1.0)**2 + 0.6*0.4*1.0/(0.6+1.0)**2,
- decimal=15)
+ d_expect = 0.4*0.4*1.0/(0.4+1.0)**2 + 0.6*0.4*1.0/(0.6+1.0)**2
+ assert_almost_equal(d, d_expect, decimal=15)
prof = spk.spike_profile(st1, st2)
assert_equal(d, prof.avrg())
assert_array_equal(prof.x, [0.0, 0.4, 1.0])