Skip to content

Commit 68f5ece

Browse files
authored
Clean up models syntax; fix for floating point division (#1296)
1 parent 079fec6 commit 68f5ece

File tree

270 files changed

+3836
-3081
lines changed

Some content is hidden

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

270 files changed

+3836
-3081
lines changed

doc/models_library/aeif_cond_alpha_neuron.rst

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
aeif_cond_alpha_neuron
22
######################
33

4-
54
aeif_cond_alpha - Conductance based exponential integrate-and-fire neuron model
65

6+
77
Description
88
+++++++++++
99

@@ -15,8 +15,8 @@ The membrane potential is given by the following differential equation:
1515
1616
C_m \frac{dV_m}{dt} =
1717
-g_L(V_m-E_L)+g_L\Delta_T\exp\left(\frac{V_m-V_{th}}{\Delta_T}\right) -
18-
g_e(t)(V_m-E_e) \\
19-
-g_i(t)(V_m-E_i)-w + I_e
18+
g_e(t)(V_m-E_e) \\
19+
-g_i(t)(V_m-E_i)-w + I_e
2020
2121
and
2222

@@ -33,7 +33,6 @@ Note that the membrane potential can diverge to positive infinity due to the exp
3333
time step, which can lead to exploding spike numbers and extreme slow-down of simulations.
3434
To avoid such unphysiological behavior, you should set a refractory time ``refr_t > 0``.
3535

36-
3736
References
3837
++++++++++
3938

@@ -42,12 +41,30 @@ References
4241
activity. Journal of Neurophysiology. 943637-3642
4342
DOI: https://doi.org/10.1152/jn.00686.2005
4443
45-
4644
See also
4745
++++++++
4846

4947
iaf_cond_alpha, aeif_cond_exp
5048

49+
Copyright statement
50+
+++++++++++++++++++
51+
52+
This file is part of NEST.
53+
54+
Copyright (C) 2004 The NEST Initiative
55+
56+
NEST is free software: you can redistribute it and/or modify
57+
it under the terms of the GNU General Public License as published by
58+
the Free Software Foundation, either version 2 of the License, or
59+
(at your option) any later version.
60+
61+
NEST is distributed in the hope that it will be useful,
62+
but WITHOUT ANY WARRANTY; without even the implied warranty of
63+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64+
GNU General Public License for more details.
65+
66+
You should have received a copy of the GNU General Public License
67+
along with NEST. If not, see <http://www.gnu.org/licenses/>.
5168

5269

5370
Parameters
@@ -57,21 +74,21 @@ Parameters
5774
:widths: auto
5875

5976

60-
"C_m", "pF", "281.0pF", "Membrane Capacitance"
77+
"C_m", "pF", "281.0pF", "Membrane capacitance"
6178
"refr_T", "ms", "2ms", "Duration of refractory period"
62-
"V_reset", "mV", "-60.0mV", "Reset Potential"
63-
"g_L", "nS", "30.0nS", "Leak Conductance"
64-
"E_L", "mV", "-70.6mV", "Leak reversal Potential (aka resting potential)"
79+
"V_reset", "mV", "-60.0mV", "Reset potential"
80+
"g_L", "nS", "30.0nS", "Leak conductance"
81+
"E_L", "mV", "-70.6mV", "Leak reversal potential (a.k.a. resting potential)"
6582
"a", "nS", "4nS", "Subthreshold adaptation"
6683
"b", "pA", "80.5pA", "Spike-triggered adaptation"
6784
"Delta_T", "mV", "2.0mV", "Slope factor"
6885
"tau_w", "ms", "144.0ms", "Adaptation time constant"
69-
"V_th", "mV", "-50.4mV", "Threshold Potential"
86+
"V_th", "mV", "-50.4mV", "Spike initiation threshold"
7087
"V_peak", "mV", "0mV", "Spike detection threshold"
71-
"E_exc", "mV", "0mV", "Excitatory reversal Potential"
72-
"tau_syn_exc", "ms", "0.2ms", "Synaptic Time Constant Excitatory Synapse"
73-
"E_inh", "mV", "-85.0mV", "Inhibitory reversal Potential"
74-
"tau_syn_inh", "ms", "2.0ms", "Synaptic Time Constant for Inhibitory Synapse"
88+
"E_exc", "mV", "0mV", "Excitatory reversal potential"
89+
"tau_syn_exc", "ms", "0.2ms", "Synaptic time constant excitatory synapse"
90+
"E_inh", "mV", "-85.0mV", "Inhibitory reversal potential"
91+
"tau_syn_inh", "ms", "2.0ms", "Synaptic time constant for inhibitory synapse"
7592
"I_e", "pA", "0pA", "Constant external input current"
7693

7794

@@ -86,8 +103,7 @@ State variables
86103

87104
"V_m", "mV", "E_L", "Membrane potential"
88105
"w", "pA", "0pA", "Spike-adaptation current"
89-
"refr_t", "ms", "0ms", "Refractory period timer"
90-
"is_refractory", "boolean", "false", ""
106+
"refr_t", "ms", "0ms", "Refractory period timer"
91107

92108

93109

@@ -103,6 +119,9 @@ Equations
103119
.. math::
104120
\frac{ dw } { dt }= \frac 1 { \tau_{w} } \left( { (a \cdot (V_{bounded} - E_{L}) - w) } \right)
105121
122+
.. math::
123+
\frac{ drefr_{t} } { dt }= \frac{ -1000.0 \cdot \mathrm{ms} } { \mathrm{s} }
124+
106125
107126
108127
Source code
@@ -115,4 +134,4 @@ The model source code can be found in the NESTML models repository here: `aeif_c
115134

116135
.. footer::
117136

118-
Generated at 2024-05-22 14:51:14.532753
137+
Generated at 2026-02-04 14:40:55.297935

doc/models_library/aeif_cond_exp_neuron.rst

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
aeif_cond_exp_neuron
22
####################
33

4-
54
aeif_cond_exp - Conductance based exponential integrate-and-fire neuron model
65

6+
77
Description
88
+++++++++++
99

@@ -17,7 +17,7 @@ The membrane potential is given by the following differential equation:
1717
1818
C_m \frac{dV_m}{dt} =
1919
-g_L(V_m-E_L)+g_L\Delta_T\exp\left(\frac{V_m-V_{th}}{\Delta_T}\right) - g_e(t)(V_m-E_e) \\
20-
-g_i(t)(V_m-E_i)-w +I_e
20+
-g_i(t)(V_m-E_i)-w +I_e
2121
2222
and
2323

@@ -28,10 +28,11 @@ and
2828
Note that the membrane potential can diverge to positive infinity due to the exponential term. To avoid numerical instabilities, instead of :math:`V_m`, the value :math:`\min(V_m,V_{peak})` is used in the dynamical equations.
2929

3030
.. note::
31-
The default refractory period for ``aeif`` models is zero, consistent with the model definition in
32-
Brette & Gerstner [1]_. Thus, an ``aeif`` neuron with default parameters can fire multiple spikes in a single
33-
time step, which can lead to exploding spike numbers and extreme slow-down of simulations.
34-
To avoid such unphysiological behavior, you should set a refractory time ``refr_t > 0``.
31+
32+
The default refractory period for ``aeif`` models is zero, consistent with the model definition in
33+
Brette & Gerstner [1]_. Thus, an ``aeif`` neuron with default parameters can fire multiple spikes in a single
34+
time step, which can lead to exploding spike numbers and extreme slow-down of simulations.
35+
To avoid such unphysiological behavior, you should set a refractory time ``refr_t > 0``.
3536

3637

3738
References
@@ -48,6 +49,25 @@ See also
4849

4950
iaf_cond_exp, aeif_cond_alpha
5051

52+
Copyright statement
53+
+++++++++++++++++++
54+
55+
This file is part of NEST.
56+
57+
Copyright (C) 2004 The NEST Initiative
58+
59+
NEST is free software: you can redistribute it and/or modify
60+
it under the terms of the GNU General Public License as published by
61+
the Free Software Foundation, either version 2 of the License, or
62+
(at your option) any later version.
63+
64+
NEST is distributed in the hope that it will be useful,
65+
but WITHOUT ANY WARRANTY; without even the implied warranty of
66+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
67+
GNU General Public License for more details.
68+
69+
You should have received a copy of the GNU General Public License
70+
along with NEST. If not, see <http://www.gnu.org/licenses/>.
5171

5272

5373
Parameters
@@ -57,21 +77,21 @@ Parameters
5777
:widths: auto
5878

5979

60-
"C_m", "pF", "281.0pF", "membrane parametersMembrane Capacitance"
80+
"C_m", "pF", "281.0pF", "membrane parametersMembrane capacitance"
6181
"refr_T", "ms", "2ms", "Duration of refractory period"
62-
"V_reset", "mV", "-60.0mV", "Reset Potential"
63-
"g_L", "nS", "30.0nS", "Leak Conductance"
64-
"E_L", "mV", "-70.6mV", "Leak reversal Potential (aka resting potential)"
82+
"V_reset", "mV", "-60.0mV", "Reset potential"
83+
"g_L", "nS", "30.0nS", "Leak conductance"
84+
"E_L", "mV", "-70.6mV", "Leak reversal potential (a.k.a. resting potential)"
6585
"a", "nS", "4nS", "spike adaptation parametersSubthreshold adaptation"
6686
"b", "pA", "80.5pA", "Spike-triggered adaptation"
6787
"Delta_T", "mV", "2.0mV", "Slope factor"
6888
"tau_w", "ms", "144.0ms", "Adaptation time constant"
69-
"V_th", "mV", "-50.4mV", "Threshold Potential"
89+
"V_th", "mV", "-50.4mV", "Spike initiation threshold"
7090
"V_peak", "mV", "0mV", "Spike detection threshold"
71-
"E_exc", "mV", "0mV", "synaptic parametersExcitatory reversal Potential"
72-
"tau_syn_exc", "ms", "0.2ms", "Synaptic Time Constant Excitatory Synapse"
73-
"E_inh", "mV", "-85.0mV", "Inhibitory reversal Potential"
74-
"tau_syn_inh", "ms", "2.0ms", "Synaptic Time Constant for Inhibitory Synapse"
91+
"E_exc", "mV", "0mV", "synaptic parametersExcitatory reversal potential"
92+
"tau_syn_exc", "ms", "0.2ms", "Synaptic Time Constant excitatory synapse"
93+
"E_inh", "mV", "-85.0mV", "Inhibitory reversal potential"
94+
"tau_syn_inh", "ms", "2.0ms", "Synaptic time constant for inhibitory synapse"
7595
"I_e", "pA", "0pA", "constant external input current"
7696

7797

@@ -86,8 +106,7 @@ State variables
86106

87107
"V_m", "mV", "E_L", "Membrane potential"
88108
"w", "pA", "0pA", "Spike-adaptation current"
89-
"refr_t", "ms", "0ms", "Refractory period timer"
90-
"is_refractory", "boolean", "false", ""
109+
"refr_t", "ms", "0ms", "Refractory period timer"
91110

92111

93112

@@ -103,6 +122,9 @@ Equations
103122
.. math::
104123
\frac{ dw } { dt }= \frac 1 { \tau_{w} } \left( { (a \cdot (V_{bounded} - E_{L}) - w) } \right)
105124
125+
.. math::
126+
\frac{ drefr_{t} } { dt }= \frac{ -1000.0 \cdot \mathrm{ms} } { \mathrm{s} }
127+
106128
107129
108130
Source code
@@ -115,4 +137,4 @@ The model source code can be found in the NESTML models repository here: `aeif_c
115137

116138
.. footer::
117139

118-
Generated at 2024-05-22 14:51:14.484055
140+
Generated at 2026-02-04 14:40:55.412977
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
aeif_psc_alpha_neuron
2+
#####################
3+
4+
aeif_psc_alpha - Conductance based exponential integrate-and-fire neuron model
5+
6+
7+
Description
8+
+++++++++++
9+
10+
aeif_psc_alpha is the adaptive exponential integrate and fire neuron according to Brette and Gerstner (2005), with post-synaptic conductances in the form of a bi-exponential ("alpha") function.
11+
12+
The membrane potential is given by the following differential equation:
13+
14+
.. math::
15+
16+
C_m \frac{dV_m}{dt} =
17+
-g_L(V_m-E_L)+g_L\Delta_T\exp\left(\frac{V_m-V_{th}}{\Delta_T}\right) - g_e(t)(V_m-E_e) \\
18+
-g_i(t)(V_m-E_i)-w + I_e
19+
20+
and
21+
22+
.. math::
23+
24+
\tau_w \frac{dw}{dt} = a(V_m-E_L) - w
25+
26+
Note that the membrane potential can diverge to positive infinity due to the exponential term. To avoid numerical instabilities, instead of :math:`V_m`, the value :math:`\min(V_m,V_{peak})` is used in the dynamical equations.
27+
28+
29+
References
30+
++++++++++
31+
32+
.. [1] Brette R and Gerstner W (2005). Adaptive exponential
33+
integrate-and-fire model as an effective description of neuronal
34+
activity. Journal of Neurophysiology. 943637-3642
35+
DOI: https://doi.org/10.1152/jn.00686.2005
36+
37+
38+
See also
39+
++++++++
40+
41+
iaf_psc_alpha, aeif_psc_exp
42+
43+
44+
Parameters
45+
++++++++++
46+
.. csv-table::
47+
:header: "Name", "Physical unit", "Default value", "Description"
48+
:widths: auto
49+
50+
51+
"C_m", "pF", "281.0pF", "membrane parametersMembrane capacitance"
52+
"refr_T", "ms", "2ms", "Duration of refractory period"
53+
"V_reset", "mV", "-60.0mV", "Reset potential"
54+
"g_L", "nS", "30.0nS", "Leak conductance"
55+
"E_L", "mV", "-70.6mV", "Leak reversal potential (a.k.a. resting potential)"
56+
"a", "nS", "4nS", "spike adaptation parametersSubthreshold adaptation"
57+
"b", "pA", "80.5pA", "Spike-triggered adaptation"
58+
"Delta_T", "mV", "2.0mV", "Slope factor"
59+
"tau_w", "ms", "144.0ms", "Adaptation time constant"
60+
"V_th", "mV", "-50.4mV", "Threshold potential"
61+
"V_peak", "mV", "0mV", "Spike detection threshold"
62+
"tau_exc", "ms", "0.2ms", "synaptic parametersSynaptic time constant for excitatory synapse"
63+
"tau_inh", "ms", "2.0ms", "Synaptic time constant for inhibitory synapse"
64+
"I_e", "pA", "0pA", "constant external input current"
65+
66+
67+
68+
State variables
69+
+++++++++++++++
70+
71+
.. csv-table::
72+
:header: "Name", "Physical unit", "Default value", "Description"
73+
:widths: auto
74+
75+
76+
"V_m", "mV", "E_L", "Membrane potential"
77+
"w", "pA", "0pA", "Spike-adaptation current"
78+
"refr_t", "ms", "0ms", "Refractory period timer"
79+
"I_syn_exc", "pA", "0pA", "AHP conductance"
80+
"I_syn_exc", "pA / ms", "0pA / ms", "AHP conductance"
81+
"I_syn_inh", "pA", "0pA", "AHP conductance"
82+
"I_syn_inh", "pA / ms", "0pA / ms", "AHP conductance"
83+
84+
85+
86+
87+
Equations
88+
+++++++++
89+
90+
91+
92+
.. math::
93+
\frac{ d^2 I_{syn,exc} } { dt^2 }= \frac{ -2 \cdot I_{syn,exc}' } { \tau_{exc} } - \frac{ I_{syn,exc} } { { \tau_{exc} }^{ 2 } }
94+
95+
.. math::
96+
\frac{ d^2 I_{syn,inh} } { dt^2 }= \frac{ -2 \cdot I_{syn,inh}' } { \tau_{inh} } - \frac{ I_{syn,inh} } { { \tau_{inh} }^{ 2 } }
97+
98+
.. math::
99+
\frac{ dV_{m} } { dt }= \frac 1 { C_{m} } \left( { (-g_{L} \cdot (V_{bounded} - E_{L}) + I_{spike} + I_{syn,exc} - I_{syn,inh} - w + I_{e} + I_{stim}) } \right)
100+
101+
.. math::
102+
\frac{ dw } { dt }= \frac 1 { \tau_{w} } \left( { (a \cdot (V_{bounded} - E_{L}) - w) } \right)
103+
104+
.. math::
105+
\frac{ drefr_{t} } { dt }= \frac{ -1000.0 \cdot \mathrm{ms} } { \mathrm{s} }
106+
107+
108+
109+
Source code
110+
+++++++++++
111+
112+
The model source code can be found in the NESTML models repository here: `aeif_psc_alpha_neuron <https://github.com/nest/nestml/tree/master/models/neurons/aeif_psc_alpha_neuron.nestml>`_.
113+
114+
.. include:: aeif_psc_alpha_neuron_characterisation.rst
115+
116+
117+
.. footer::
118+
119+
Generated at 2026-02-04 14:40:55.799577

0 commit comments

Comments
 (0)