forked from nest/nestml
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathiaf_psc_delta.nestml
134 lines (103 loc) · 4.02 KB
/
iaf_psc_delta.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
133
134
"""
iaf_psc_delta - Current-based leaky integrate-and-fire neuron model with delta-kernel post-synaptic currents
############################################################################################################
Description
+++++++++++
iaf_psc_delta is an implementation of a leaky integrate-and-fire model
where the potential jumps on each spike arrival.
The threshold crossing is followed by an absolute refractory period
during which the membrane potential is clamped to the resting potential.
Spikes arriving while the neuron is refractory, are discarded by
default. If the property ``with_refr_input`` is set to true, such
spikes are added to the membrane potential at the end of the
refractory period, dampened according to the interval between
arrival and end of refractoriness.
The general framework for the consistent formulation of systems with
neuron like dynamics interacting by point events is described in
[1]_. A flow chart can be found in [2]_.
Critical tests for the formulation of the neuron model are the
comparisons of simulation results for different computation step
sizes. sli/testsuite/nest contains a number of such tests.
The iaf_psc_delta is the standard model used to check the consistency
of the nest simulation kernel because it is at the same time complex
enough to exhibit non-trivial dynamics and simple enough compute
relevant measures analytically.
References
++++++++++
.. [1] Rotter S, 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
See also
++++++++
iaf_psc_alpha, iaf_psc_exp
Authors
+++++++
Diesmann, Gewaltig (September 1999)
"""
neuron iaf_psc_delta:
state:
refr_spikes_buffer mV = 0 mV
r integer # counts number of tick during the refractory period
end
initial_values:
V_abs mV = 0 mV
end
equations:
kernel G = delta(t)
recordable inline V_m mV = V_abs + E_L # Membrane potential.
V_abs' = -V_abs / tau_m + (mV / pA / ms) * convolve(G, spikes) + (I_e + I_stim) / C_m
end
parameters:
tau_m ms = 10 ms # Membrane time constant.
C_m pF = 250 pF # Capacity of the membrane
t_ref ms = 2 ms # Duration of refractory period.
tau_syn ms = 2 ms # Time constant of synaptic current.
E_L mV = -70 mV # Resting membrane potential.
V_reset mV = -70 mV - E_L # Reset potential of the membrane.
Theta mV = -55 mV - E_L # Spike threshold.
V_min mV = -inf * 1 mV # Absolute lower value for the membrane potential
with_refr_input boolean = false # If true, do not discard input during refractory period. Default: false.
# constant external input current
I_e pA = 0 pA
end
internals:
h ms = resolution()
RefractoryCounts integer = steps(t_ref) # refractory time in steps
end
input:
spikes pA <- spike
I_stim pA <- current
end
output: spike
update:
if r == 0: # neuron not refractory
integrate_odes()
# if we have accumulated spikes from refractory period,
# add and reset accumulator
if with_refr_input and refr_spikes_buffer != 0.0 mV:
V_abs += refr_spikes_buffer
refr_spikes_buffer = 0.0 mV
end
# lower bound of membrane potential
V_abs = V_abs < V_min?V_min:V_abs
else: # neuron is absolute refractory
# read spikes from buffer and accumulate them, discounting
# for decay until end of refractory period
# the buffer is clear automatically
if with_refr_input:
refr_spikes_buffer += spikes * exp(-r * h / tau_m) * mV/pA
end
r -= 1
end
if V_abs >= Theta: # threshold crossing
r = RefractoryCounts
V_abs = V_reset
emit_spike()
end
end
end