Skip to content

Commit 129d6c2

Browse files
authored
Merge pull request #11 from OpenSourceBrain/experimental
Check for source_ids/channel_ids
2 parents 367dddd + 116f06d commit 129d6c2

13 files changed

Lines changed: 47 additions & 41 deletions

.github/workflows/omv-ci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
python-version: [ "3.9", "3.10", "3.11" ] # Brian no longer supported on py3.8
16+
python-version: [ "3.10", "3.12", "3.13" ] # Brian no longer supported on py3.9!
1717
engine: [ jNeuroML, jNeuroML_NEURON, jNeuroML_PyNN_NEURON, jNeuroML_validate, PyNN_NEURON, PyNN_Nest, PyNN_NeuroML, PyNN_Brian2]
1818

1919
steps:
@@ -30,9 +30,8 @@ jobs:
3030
3131
- name: Install additional packages
3232
run: |
33-
pip install scipy sympy matplotlib cython tables
34-
35-
# pip install 'numpy<=1.23.0' # see https://github.com/OpenSourceBrain/osb-model-validation/issues/91
33+
34+
pip install matplotlib "cython<3.1.0" # let omv handle other deps...
3635
3736
3837
- name: Run OMV tests on engine ${{ matrix.engine }}

NeuroML2/ConnectionsTest.net.nml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<notes>
33
This NeuroML 2 file has been generated from:
44
PyNN v0.11.0
5-
libNeuroML v0.6.3
6-
pyNeuroML v1.3.7
5+
libNeuroML v0.6.8
6+
pyNeuroML v1.3.19
77
</notes>
88
<IF_cond_alpha id="IF_cond_alpha_pop_pre" cm="1.0" i_offset="0.9" tau_syn_E="2.0" tau_syn_I="5.0" v_init="-65.0" tau_m="20.0" tau_refrac="5.0" v_reset="-65.0" v_rest="-65.0" v_thresh="-50.0" e_rev_E="0.0" e_rev_I="-70.0"/>
99
<IF_cond_alpha id="IF_cond_alpha_pop_post" cm="1.0" i_offset="0.9" tau_syn_E="2.0" tau_syn_I="5.0" v_init="-65.0" tau_m="20.0" tau_refrac="5.0" v_reset="-65.0" v_rest="-65.0" v_thresh="-50.0" e_rev_E="0.0" e_rev_I="-70.0"/>
@@ -17,38 +17,38 @@
1717
<property tag="radius" value="5"/>
1818
<property tag="color" value="0 0.6 0"/>
1919
<instance id="0">
20-
<location x="-9.771402205615921" y="41.107735197887862" z="8.380479496098125"/>
20+
<location x="67.968888080621582" y="-70.657158602734654" z="-18.315070185150397"/>
2121
</instance>
2222
<instance id="1">
23-
<location x="11.787241779479075" y="-22.917415323944468" z="-69.969358778846896"/>
23+
<location x="60.184476562654041" y="60.493279624680454" z="-4.759239011557659"/>
2424
</instance>
2525
<instance id="2">
26-
<location x="24.148166862976762" y="-10.126267539995236" z="-6.507356698049249"/>
26+
<location x="27.189024038368114" y="-73.036270319949594" z="-25.447207420452678"/>
2727
</instance>
2828
<instance id="3">
29-
<location x="-14.878199498615952" y="49.650874267039804" z="18.835272881150388"/>
29+
<location x="-24.852298939173203" y="-12.272599182378062" z="3.750079672379081"/>
3030
</instance>
3131
<instance id="4">
32-
<location x="37.92567221050809" y="-22.437678624311431" z="-38.190180651135641"/>
32+
<location x="24.133497816283622" y="10.517195276874403" z="-29.329915036014633"/>
3333
</instance>
3434
</population>
3535
<population id="pop_post" component="IF_cond_alpha_pop_post" size="5" type="populationList">
3636
<property tag="radius" value="5"/>
3737
<property tag="color" value="0 0.2 0.6"/>
3838
<instance id="0">
39-
<location x="-30.357177121657621" y="148.821597074248928" z="41.550393258456353"/>
39+
<location x="24.765200337632276" y="242.663676551724933" z="75.097696646567741"/>
4040
</instance>
4141
<instance id="1">
42-
<location x="-75.487951984450333" y="241.449664932469261" z="4.06371645195327"/>
42+
<location x="45.028559466580795" y="226.140823198868731" z="48.181218144946691"/>
4343
</instance>
4444
<instance id="2">
45-
<location x="53.196249421914075" y="144.47758109254687" z="46.851975572138628"/>
45+
<location x="52.54517028397283" y="161.954657204140887" z="-5.258407353297101"/>
4646
</instance>
4747
<instance id="3">
48-
<location x="-20.844985362062317" y="188.239068673352108" z="-57.809991974759043"/>
48+
<location x="-33.575509675391338" y="195.289896982416423" z="-19.682584593824927"/>
4949
</instance>
5050
<instance id="4">
51-
<location x="41.000859853632619" y="279.306766456403295" z="35.048479751214437"/>
51+
<location x="-14.798277951638838" y="173.216535964582647" z="93.772913738872958"/>
5252
</instance>
5353
</population>
5454
<projection id="pop_pre__TO__pop_post" presynapticPopulation="pop_pre" postsynapticPopulation="pop_post" synapse="syn__pop_pre__TO__pop_post">

NeuroML2/Inputs.net.nml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<notes>
33
This NeuroML 2 file has been generated from:
44
PyNN v0.11.0
5-
libNeuroML v0.6.3
6-
pyNeuroML v1.3.7
5+
libNeuroML v0.6.8
6+
pyNeuroML v1.3.19
77
</notes>
88
<pulseGenerator id="DCSource_DCSource_0" delay="50.0ms" duration="350.0ms" amplitude="0.9nA"/>
99
<compoundInput id="ACSource_ACSource_1">

NeuroML2/LEMS_Sim_Inputs.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<!--
44
This LEMS file has been generated from:
55
PyNN v0.11.0
6-
libNeuroML v0.6.3
7-
pyNeuroML v1.3.7
6+
libNeuroML v0.6.8
7+
pyNeuroML v1.3.19
88
-->
99

1010
<!-- Specify which component to run -->

NeuroML2/LEMS_Sim_PyNN_NeuroML2_Export.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<!--
44
This LEMS file has been generated from:
55
PyNN v0.11.0
6-
libNeuroML v0.6.3
7-
pyNeuroML v1.3.7
6+
libNeuroML v0.6.8
7+
pyNeuroML v1.3.19
88
-->
99

1010
<!-- Specify which component to run -->

NeuroML2/Positions.net.nml.h5

46 Bytes
Binary file not shown.

NeuroML2/PyNN_NeuroML2_Export.net.nml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<notes>
33
This NeuroML 2 file has been generated from:
44
PyNN v0.11.0
5-
libNeuroML v0.6.3
6-
pyNeuroML v1.3.7
5+
libNeuroML v0.6.8
6+
pyNeuroML v1.3.19
77
</notes>
88
<IF_curr_alpha id="IF_curr_alpha_pop_IF_curr_alpha" cm="1.0" i_offset="0.9" tau_syn_E="2.0" tau_syn_I="5.0" v_init="-65.0" tau_m="20.0" tau_refrac="10.0" v_reset="-62.0" v_rest="-65.0" v_thresh="-52.0"/>
99
<IF_curr_exp id="IF_curr_exp_pop_IF_curr_exp" cm="1.0" i_offset="1.0" tau_syn_E="2.0" tau_syn_I="5.0" v_init="-65.0" tau_m="20.0" tau_refrac="8.0" v_reset="-70.0" v_rest="-65.0" v_thresh="-50.0"/>

PyNN/InputsTest.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,14 @@
5151
data = pop.get_data('v', gather=False)
5252
analogsignal = data.segments[0].analogsignals[0]
5353
name = analogsignal.name
54-
source_ids = analogsignal.annotations['source_ids']
54+
55+
def get_source_ids_as(analogsignal):
56+
if 'source_ids' in analogsignal.annotations:
57+
return analogsignal.annotations['source_ids']
58+
elif 'channel_ids' in analogsignal.annotations: # See https://github.com/NeuralEnsemble/PyNN/pull/762
59+
return analogsignal.annotations['channel_ids']
60+
61+
source_ids = get_source_ids_as(analogsignal)
5562
filename = "%s_%s.dat"%(pop.label,name)
5663
print('Saving data recorded for %s in pop %s, global ids: %s to %s'%(name, pop.label, source_ids, filename))
5764
times_vm_a = []
@@ -94,7 +101,7 @@ def get_source_id(spiketrain):
94101
sim.end()
95102

96103
if '-gui' in sys.argv:
97-
if simulator_name in ['neuron', 'nest', 'brian']:
104+
if simulator_name in ['neuron', 'nest', 'brian2']:
98105
import matplotlib.pyplot as plt
99106

100107
print("Plotting results of simulation in %s"%simulator_name)

PyNN/LEMS_2007One_pynn.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
1010
1111
This PyNN file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export)
12-
org.neuroml.export v1.10.1
13-
org.neuroml.model v1.10.1
14-
jLEMS v0.11.1
12+
org.neuroml.export v1.11.0
13+
org.neuroml.model v1.11.0
14+
jLEMS v0.12.0
1515
1616
'''
1717
# Main PyNN script for: net1

PyNN/RS.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=RS type=izhikevich2007Cell)
33
COMMENT
44

55
This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export)
6-
org.neuroml.export v1.10.1
7-
org.neuroml.model v1.10.1
8-
jLEMS v0.11.1
6+
org.neuroml.export v1.11.0
7+
org.neuroml.model v1.11.0
8+
jLEMS v0.12.0
99

1010
ENDCOMMENT
1111

0 commit comments

Comments
 (0)