Skip to content

Commit f84d0f0

Browse files
committed
added 2021 tests
1 parent 797ef34 commit f84d0f0

File tree

4 files changed

+38
-6
lines changed

4 files changed

+38
-6
lines changed

.test.2021.mep

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
system: Testing activity of some neurons
2+
3+
experiments:
4+
Test:
5+
expected:
6+
spike times: [52.16, 58.86, 65.56, 72.26, 78.96, 85.66, 92.36,99.06, 105.81,]

.test.2021.omt

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Framework for running automated tests on Open Source Brain
2+
# See https://github.com/OpenSourceBrain/osb-model-validation for more details
3+
4+
target: test2021.py
5+
engine: Brian2 # This installs Brian2, but all we really need is a Python environment to run the script in
6+
mep: .test.2021.mep
7+
experiments:
8+
Test:
9+
observables:
10+
spike times:
11+
file:
12+
path: exampleRunNet21/act.dat
13+
columns: [0, 1]
14+
scaling: [1, 1]
15+
spike detection:
16+
method: threshold
17+
threshold: 0.38
18+
tolerance: 0

network2021/load_data.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ def reload_single_run(show_plot=True, verbose=False):
2323

2424
N_neurons = 7
2525
N_neuronsperunit = 7
26-
N_total_neurons = N_neurons*N_neuronsperunit
27-
#N_stretchrec = 2 + 6 * 3 # number of streatch receptors
28-
#N_hneurons = 4
29-
#N_vneurons = 36
26+
N_total_neurons = N_neurons * N_neuronsperunit
27+
# N_stretchrec = 2 + 6 * 3 # number of streatch receptors
28+
# N_hneurons = 4
29+
# N_vneurons = 36
3030
N_muscles = 24 * 2
3131

3232
# N_neurons = N_neuronsperunit * N_units
@@ -66,7 +66,7 @@ def reload_single_run(show_plot=True, verbose=False):
6666
axs[0, 0].xaxis.set_ticklabels([])
6767
# plt.legend()
6868

69-
neu = act_data[offset : N_total_neurons + offset]
69+
neu = act_data[offset : N_total_neurons + offset]
7070
axs[0, 1].imshow(neu, aspect="auto", interpolation="nearest")
7171
axs[0, 1].xaxis.set_ticklabels([])
7272

@@ -86,7 +86,7 @@ def reload_single_run(show_plot=True, verbose=False):
8686
axs[2, 1].imshow(neu, aspect="auto", interpolation="nearest")
8787
axs[2, 1].xaxis.set_ticklabels([])
8888
"""
89-
89+
9090
axs[1, 0].set_title("Muscles", fontsize=title_font_size)
9191
axs[1, 1].set_title("Muscles", fontsize=title_font_size)
9292
for i in range(offset, N_muscles + offset):

test_all.sh

+8
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ make clean
2020
make
2121
cd ..
2222

23+
cd network2021
24+
make clean
25+
make
26+
cd ..
27+
2328
ruff format *.py */*.py
2429
ruff check *.py */*.py
2530

@@ -28,9 +33,12 @@ if [ "$quick_test" == 0 ]; then
2833
rm -rf exampleRun
2934
rm -rf exampleRun_nml
3035
rm -rf exampleRunRS18
36+
rm -rf exampleRunNet21
3137

3238
omv test -V .test.example.omt
39+
omv test -V .test.2021.omt
3340
omv test -V .test.2018.omt
41+
3442

3543
cd neuromlLocal
3644
./regenerate.sh # regenerated NML & runs omv all -V

0 commit comments

Comments
 (0)