forked from nest/nestml
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmat2_psc_exp.nestml
132 lines (103 loc) · 4.4 KB
/
mat2_psc_exp.nestml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
"""
mat2_psc_exp - Non-resetting leaky integrate-and-fire neuron model with exponential PSCs and adaptive threshold
###############################################################################################################
Description
+++++++++++
mat2_psc_exp is an implementation of a leaky integrate-and-fire model
with exponential-kernel postsynaptic currents (PSCs). Thus, postsynaptic
currents have an infinitely short rise time.
The threshold is lifted when the neuron is fired and then decreases in a
fixed time scale toward a fixed level [3]_.
The threshold crossing is followed by a total refractory period
during which the neuron is not allowed to fire, even if the membrane
potential exceeds the threshold. The membrane potential is NOT reset,
but continuously integrated.
.. note::
If tau_m is very close to tau_syn_ex or tau_syn_in, numerical problems
may arise due to singularities in the propagator matrics. If this is
the case, replace equal-valued parameters by a single parameter.
For details, please see ``IAF_neurons_singularity.ipynb`` in
the NEST source code (``docs/model_details``).
References
++++++++++
.. [1] Rotter S and Diesmann M (1999). Exact simulation of
time-invariant linear systems with applications to neuronal
modeling. Biologial Cybernetics 81:381-402.
DOI: https://doi.org/10.1007/s004220050570
.. [2] Diesmann M, Gewaltig M-O, Rotter S, Aertsen A (2001). State
space analysis of synchronous spiking in cortical neural
networks. Neurocomputing 38-40:565-571.
DOI:https://doi.org/10.1016/S0925-2312(01)00409-X
.. [3] Kobayashi R, Tsubo Y and Shinomoto S (2009). Made-to-order
spiking neuron model equipped with a multi-timescale adaptive
threshold. Frontiers in Computuational Neuroscience 3:9.
DOI: https://doi.org/10.3389/neuro.10.009.2009
Author
++++++
Thomas Pfeil (modified iaf_psc_exp model of Moritz Helias)
"""
neuron mat2_psc_exp:
state:
V_th_alpha_1 mV # Two-timescale adaptive threshold
V_th_alpha_2 mV # Two-timescale adaptive threshold
r integer # counts number of tick during the refractory period
end
initial_values:
V_abs mV = 0 mV # Membrane potential
V_m mV = V_abs + E_L # Relative membrane potential.
# I.e. the real threshold is (V_m-E_L).
end
equations:
kernel I_kernel_in = exp(-1/tau_syn_in*t)
kernel I_kernel_ex = exp(-1/tau_syn_ex*t)
# V_th_alpha_1' = -V_th_alpha_1/tau_1
# V_th_alpha_2' = -V_th_alpha_2/tau_2
inline I_syn pA = convolve(I_kernel_in, in_spikes) + convolve(I_kernel_ex, ex_spikes)
V_abs' = -V_abs / tau_m + (I_syn + I_e + I_stim) / C_m
end
parameters:
tau_m ms = 5 ms # Membrane time constant
C_m pF = 100 pF # Capacity of the membrane
t_ref ms = 2 ms # Duration of absolute refractory period (no spiking)
E_L mV = -70.0 mV # Resting potential
tau_syn_ex ms = 1 ms # Time constant of postsynaptic excitatory currents
tau_syn_in ms = 3 ms # Time constant of postsynaptic inhibitory currents
tau_1 ms = 10 ms # Short time constant of adaptive threshold
tau_2 ms = 200 ms # Long time constant of adaptive threshold
alpha_1 mV = 37.0 mV # Amplitude of short time threshold adaption [3]
alpha_2 mV = 2.0 mV # Amplitude of long time threshold adaption [3]
omega mV = 19.0 mV # Resting spike threshold (absolute value, not relative to E_L)
# constant external input current
I_e pA = 0 pA
end
internals:
h ms = resolution()
P11th real = exp( -h / tau_1 )
P22th real = exp( -h / tau_2 )
RefractoryCounts integer = steps(t_ref) # refractory time in steps
end
input:
ex_spikes pA <- excitatory spike
in_spikes pA <- inhibitory spike
I_stim pA <- current
end
output: spike
update:
# evolve membrane potential
integrate_odes()
# evolve adaptive threshold
V_th_alpha_1 = V_th_alpha_1 * P11th
V_th_alpha_2 = V_th_alpha_2 * P22th
if r == 0: # not refractory
if V_abs >= omega + V_th_alpha_1 + V_th_alpha_2: # threshold crossing
r = RefractoryCounts
# procedure for adaptive potential
V_th_alpha_1 += alpha_1 # short time
V_th_alpha_2 += alpha_2 # long time
emit_spike()
end
else:
r = r - 1
end
end
end