summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMario Mulansky <mario.mulansky@gmx.net>2014-10-14 17:49:23 +0200
committerMario Mulansky <mario.mulansky@gmx.net>2014-10-14 17:49:23 +0200
commit65801901e6d3325c8d1c82ab92334ca19ebd92d7 (patch)
treecd15a17ef3da186e97b6aa222ad3ee3997f6ea23 /test
parent1bd3fa7ef0bf395f44aea493858bbdd563fcb0c4 (diff)
changed isi distance profile to abs values
Diffstat (limited to 'test')
-rw-r--r--test/test_distance.py6
-rw-r--r--test/test_function.py2
2 files changed, 3 insertions, 5 deletions
diff --git a/test/test_distance.py b/test/test_distance.py
index b500b2c..6e50467 100644
--- a/test/test_distance.py
+++ b/test/test_distance.py
@@ -23,8 +23,8 @@ def test_isi():
# pen&paper calculation of the isi distance
expected_times = [0.0, 0.2, 0.3, 0.4, 0.45, 0.6, 0.7, 0.8, 0.9, 0.95, 1.0]
- expected_isi = [-0.1/0.3, -0.1/0.3, 0.05/0.2, 0.05/0.2, -0.15/0.35,
- -0.25/0.35, -0.05/0.35, 0.2/0.3, 0.25/0.3, 0.25/0.3]
+ expected_isi = [0.1/0.3, 0.1/0.3, 0.05/0.2, 0.05/0.2, 0.15/0.35,
+ 0.25/0.35, 0.05/0.35, 0.2/0.3, 0.25/0.3, 0.25/0.3]
t1 = spk.add_auxiliary_spikes(t1, 1.0)
t2 = spk.add_auxiliary_spikes(t2, 1.0)
@@ -40,7 +40,7 @@ def test_isi():
t2 = np.array([0.1, 0.4, 0.5, 0.6])
expected_times = [0.0, 0.1, 0.2, 0.4, 0.5, 0.6, 1.0]
- expected_isi = [0.1/0.2, -0.1/0.3, -0.1/0.3, 0.1/0.2, 0.1/0.2, -0.0/0.5]
+ expected_isi = [0.1/0.2, 0.1/0.3, 0.1/0.3, 0.1/0.2, 0.1/0.2, 0.0/0.5]
t1 = spk.add_auxiliary_spikes(t1, 1.0)
t2 = spk.add_auxiliary_spikes(t2, 1.0)
diff --git a/test/test_function.py b/test/test_function.py
index a579796..c5caa5a 100644
--- a/test/test_function.py
+++ b/test/test_function.py
@@ -28,8 +28,6 @@ def test_pwc():
assert_array_almost_equal(yp, yp_expected, decimal=16)
assert_almost_equal(f.avrg(), (1.0-0.5+0.5*1.5+1.5*0.75)/4.0, decimal=16)
- assert_almost_equal(f.abs_avrg(), (1.0+0.5+0.5*1.5+1.5*0.75)/4.0,
- decimal=16)
def test_pwc_add():