-
Notifications
You must be signed in to change notification settings - Fork 1
/
afhcsyn_i0.mod
86 lines (73 loc) · 1.43 KB
/
afhcsyn_i0.mod
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
COMMENT
Alpha function Hair Cell synapse
activation follows Poisson rate (atau) time constant
alpha(t) = t/tau * exp( -t/tau )
ENDCOMMENT
VERBATIM
extern double du_dev0( );
extern double dexp_dev(double);
ENDVERBATIM
NEURON {
POINT_PROCESS afhcsyn_i0
RANGE i, tau, atau, sw, del
NONSPECIFIC_CURRENT i
}
PARAMETER {
e = 0 (mV) : equib potential
tau = 1.3 (ms) : time constant of alpha current
atau = 0 (ms) : time constant of activation (default=0 => inactive )
sw = 0.1 (pS) : default synaptic weight
del = 0.1 (ms) : default delay
idebug = 0
}
ASSIGNED {
v (mV)
i (nanoamp)
}
STATE {
a (pS)
g (pS)
}
UNITS {
(mV) = (millivolt)
(pS) = (picosiemens)
PI = (pi) (1)
}
INITIAL {
net_send( 0, 1 )
g = 0
}
BREAKPOINT {
SOLVE state METHOD sparse
i = g*( v - e )*(1e-06)
}
KINETIC state {
~ a <-> g ( 1/tau, 0 )
~ g -> ( 1/tau )
}
NET_RECEIVE( weight (pS)) {
LOCAL wait
UNITSOFF
if( idebug ) {
printf( "Net_receive afhcsyn: t %g flag %g", t, flag )
if( flag == 0 ){ printf( " weight %g", weight ) }
printf( "\n" )
}
if( flag == 0 ){
a = a + weight * exp(1)
}
if( flag == 1 && atau > 0 ){
wait = del
net_send( wait, 2 )
}
if( flag == 2 && atau > 0 ){
wait = dexp_dev( 1(ms)/atau )
net_send( wait, 3 )
}
if( flag == 3 && atau > 0 ){
a = a + sw *exp(1)
wait = dexp_dev( 1/atau )
net_send( wait, 1 )
}
UNITSON
}