Skip to content

Commit 9cccbab

Browse files
authored
Merge pull request #112 from openworm/development
To v0.10.1; improved cellW2D
2 parents aded92a + f8c4869 commit 9cccbab

File tree

208 files changed

+25391
-721
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+25391
-721
lines changed

.github/workflows/non_omv.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
runs-on: [ubuntu-latest, macos-13, macos-latest ]
17-
python-version: [ 3.8, 3.9, "3.10", "3.11" ]
17+
python-version: [ 3.9, "3.10", "3.11", "3.12" ]
1818
exclude:
1919
- runs-on: macos-latest
2020
python-version: "3.8"
@@ -42,12 +42,6 @@ jobs:
4242
pip install WormNeuroAtlas
4343
pip list
4444
45-
- name: Test OpenWormReader with owmeta
46-
if: ${{ matrix.python-version != '3.11' }}
47-
run: |
48-
pip install owmeta>=0.12.3
49-
owm bundle remote --user add ow 'https://raw.githubusercontent.com/openworm/owmeta-bundles/master/index.json'
50-
python -m c302.OpenWormReader
5145
5246
- name: Test WormNeuroAtlasReader
5347
run: |

c302/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.10.0"
1+
__version__ = "0.10.1"

c302/cell_W2D.xml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<Lems>
22

33
<ComponentType name="cellW2D"
4-
extends="baseCellMembPot"
4+
extends="baseCellMembPotCap"
55
description="Cell based on Worm2D model">
66

77
<Parameter name="bias" dimension="none" description="..."/>
88
<Parameter name="gain" dimension="none" description="..."/>
99
<Parameter name="tau" dimension="time"/>
1010

1111
<Constant name="COND_SCALE" dimension="conductance" value="1nS"/>
12-
<DerivedParameter name="C" dimension="capacitance" value="tau*COND_SCALE"/>
1312

1413
<!--
1514
Defined in baseCellMembPotCap:
1615
<Parameter name="C" dimension="capacitance"/>
1716
-->
17+
<DerivedParameter name="C" dimension="capacitance" value="tau*COND_SCALE"/>
1818

1919
<!-- Initial Conditions -->
2020
<Parameter name="state0" dimension="none"/>
@@ -65,11 +65,15 @@
6565

6666
</ComponentType>
6767

68-
<cellW2D id="GenericNeuronCell" tau="1s" bias="1" gain="1" state0=".5"/>
69-
<cellW2D id="GenericMuscleCell" tau="1s" bias="1" gain="1" state0=".5"/>
68+
<cellW2D id="GenericNeuronCell" tau="100ms" bias="1" gain="1" state0="0"/>
69+
<cellW2D id="GenericMuscleCell" tau="100ms" bias="1" gain="1" state0="0"/>
70+
71+
<cellW2D id="GenericNeuronCellW2D" tau="1s" bias="1" gain="1" state0=".5"/>
72+
<cellW2D id="GenericMuscleCellW2D" tau="1s" bias="1" gain="1" state0=".5"/>
7073

71-
<outputSynapse id="neuron_to_neuron_w2d"/>
72-
<outputSynapse id="neuron_to_muscle_w2d"/>
74+
<outputSynapse id="neuron_to_neuron_exc_w2d" sign="1"/>
75+
<outputSynapse id="neuron_to_neuron_inh_w2d" sign="-1"/>
76+
<outputSynapse id="neuron_to_muscle_w2d" sign="1"/>
7377

7478
</Lems>
7579

c302/custom_synapses.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
extends="baseGradedSynapse"
1313
description="For Worm2D...">
1414

15+
<Parameter name="sign" dimension="none"/>
16+
1517
<Property name="weight" dimension="none" defaultValue="1"/>
1618

1719
<Constant name="PAMP_SCALE" dimension="current" value="1pA"/>
@@ -24,7 +26,7 @@
2426

2527
<Dynamics>
2628
<DerivedVariable name="outputpeer" dimension="none" select="peer/output"/>
27-
<DerivedVariable name="i" exposure="i" value="weight * outputpeer * PAMP_SCALE"/>
29+
<DerivedVariable name="i" exposure="i" value="weight * sign * outputpeer * PAMP_SCALE"/>
2830
</Dynamics>
2931
</ComponentType>
3032

c302/parameters_W2D.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ def create_offsetcurrent(self):
7171
)
7272

7373
def create_neuron_to_neuron_syn(self):
74-
self.neuron_to_neuron_exc_syn = OutputSynapse(id="neuron_to_neuron_w2d")
74+
self.neuron_to_neuron_exc_syn = OutputSynapse(id="neuron_to_neuron_exc_w2d")
75+
self.neuron_to_neuron_inh_syn = OutputSynapse(id="neuron_to_neuron_inh_w2d")
7576

7677
self.neuron_to_neuron_elec_syn = GapJunction(
7778
id="neuron_to_neuron_elec_syn",
@@ -101,7 +102,7 @@ def get_exc_syn(self, pre_cell, post_cell, type):
101102
return self.neuron_to_neuron_exc_syn
102103

103104
def get_inh_syn(self, pre_cell, post_cell, type):
104-
return self.neuron_to_neuron_exc_syn
105+
return self.neuron_to_neuron_inh_syn
105106

106107

107108
from c302.bioparameters import NonNeuroMLCustomType

0 commit comments

Comments
 (0)