Skip to content

Commit 3662973

Browse files
authored
Merge pull request #111 from openworm/ow_test_cect3
Much improved cellw2d
2 parents 40c1b24 + 1ea1eee commit 3662973

File tree

207 files changed

+25390
-714
lines changed

Some content is hidden

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

207 files changed

+25390
-714
lines changed

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)