forked from nest/nestml
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathiaf_chxk_2008.nestml
122 lines (93 loc) · 4.05 KB
/
iaf_chxk_2008.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
"""
iaf_chxk_2008 - Conductance based leaky integrate-and-fire neuron model used in Casti et al. 2008
#################################################################################################
Description
+++++++++++
iaf_chxk_2008 is an implementation of a spiking neuron using IAF dynamics with
conductance-based synapses [1]_. A spike is emitted when the membrane potential
is crossed from below. After a spike, an afterhyperpolarizing (AHP) conductance
is activated which repolarizes the neuron over time. Membrane potential is not
reset explicitly and the model also has no explicit refractory time.
The AHP conductance and excitatory and inhibitory synaptic input conductances
follow alpha-function time courses as in the iaf_cond_alpha model.
.. note ::
In the original Fortran implementation underlying [1]_, all previous AHP activation was discarded when a new spike
occurred, leading to reduced AHP currents in particular during periods of high spiking activity. Set ``ahp_bug`` to
``true`` to obtain this behavior in the model.
References
++++++++++
.. [1] Casti A, Hayot F, Xiao Y, Kaplan E (2008) A simple model of retina-LGN
transmission. Journal of Computational Neuroscience 24:235-252.
DOI: https://doi.org/10.1007/s10827-007-0053-7
See also
++++++++
iaf_cond_alpha
"""
neuron iaf_chxk_2008:
initial_values:
V_m mV = E_L # membrane potential
g_ahp nS = 0 nS # AHP conductance
g_ahp' nS/ms = 0 nS/ms # AHP conductance
end
equations:
kernel g_in = (e/tau_syn_in) * t * exp(-t/tau_syn_in)
kernel g_ex = (e/tau_syn_ex) * t * exp(-t/tau_syn_ex)
g_ahp'' = -2 * g_ahp' / tau_ahp - g_ahp / tau_ahp**2
inline I_syn_exc pA = convolve(g_ex, spikesExc) * ( V_m - E_ex )
inline I_syn_inh pA = convolve(g_in, spikesInh) * ( V_m - E_in )
inline I_ahp pA = g_ahp * ( V_m - E_ahp )
inline I_leak pA = g_L * ( V_m - E_L )
V_m' = ( -I_leak - I_syn_exc - I_syn_inh - I_ahp + I_e + I_stim ) / C_m
end
parameters:
V_th mV = -45.0 mV # Threshold Potential
E_ex mV = 20 mV # Excitatory reversal potential
E_in mV = -90 mV # Inhibitory reversal potential
g_L nS = 100 nS # Leak Conductance
C_m pF = 1000.0 pF # Membrane Capacitance
E_L mV = -60.0 mV # Leak reversal Potential (aka resting potential)
tau_syn_ex ms = 1 ms # Synaptic Time Constant Excitatory Synapse
tau_syn_in ms = 1 ms # Synaptic Time Constant for Inhibitory Synapse
tau_ahp ms = 0.5 ms # Afterhyperpolarization (AHP) time constant
G_ahp nS = 443.8 nS # AHP conductance
E_ahp mV = -95 mV # AHP potential
ahp_bug boolean = false # If true, discard AHP conductance value from previous spikes
# constant external input current
I_e pA = 0 pA
end
internals:
# Impulse to add to DG_EXC on spike arrival to evoke unit-amplitude conductance excursion.
PSConInit_E nS/ms = nS * e / tau_syn_ex
# Impulse to add to DG_INH on spike arrival to evoke unit-amplitude conductance excursion.
PSConInit_I nS/ms = nS * e / tau_syn_in
PSConInit_AHP real = G_ahp * e / tau_ahp * (ms/nS)
end
input:
spikesInh nS <- inhibitory spike
spikesExc nS <- excitatory spike
I_stim pA <- current
end
output: spike
update:
vm_prev mV = V_m
integrate_odes()
if vm_prev < V_th and V_m >= V_th:
# Neuron is not absolute refractory
# Find precise spike time using linear interpolation
sigma real = ( V_m - V_th ) * resolution() / ( V_m - vm_prev ) / ms
alpha real = exp( -sigma / tau_ahp )
delta_g_ahp real = PSConInit_AHP * sigma * alpha
delta_dg_ahp real = PSConInit_AHP * alpha
if ahp_bug == true:
# Bug in original code ignores AHP conductance from previous spikes
g_ahp = delta_g_ahp * nS
g_ahp' = delta_dg_ahp * nS/ms
else:
# Correct implementation adds initial values for new AHP to AHP history
g_ahp += delta_g_ahp * nS
g_ahp' += delta_dg_ahp * nS/ms
end
emit_spike()
end
end
end