-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMF_template.hoc
70 lines (50 loc) · 954 Bytes
/
MF_template.hoc
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
//DEFINITION OF CELL TEMPLATE
begintemplate fibre
public Presynapse
public x,y,z
public StimTrigger
objref StimTrigger
public nclist
objectvar nclist
//counting spikes
public spiketimes,spikecount
objref spiketimes,spikecount
public syn
objectvar syn
public voltagem
objref voltagem
create Presynapse //create compartment
proc init() {
x=$1
y=$2
z=$3
spiketimes=new Vector()
lastspikecount=0
voltagem=new Vector()
Presynapse {
//initialise and clear the 3D information
pt3dclear()
pt3dadd(x,y,z,10) //set position of cell
pt3dadd(x,y,z+10,10)
diam=1.0
L=1
nclist=new List()
StimTrigger=new NetStim(0.5) //Adding spike generator
nseg=1
diam=10.0
L=5
Ra=123
insert hh //Hodgkin-Huxley channels
gnabar=0.25
gl_hh=.0001666
el_hh=-60
syn=new ExpSyn(0) //Adding synapse
//counting spikes
spikecount=new APCount(0.5)
spikecount.thresh=-20
spikecount.record(spiketimes)
//Saving Vm
voltagem.record(&v(0.5))
}
}
endtemplate fibre