-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpBGrecord.hoc
58 lines (34 loc) · 1.27 KB
/
pBGrecord.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
//----------------------------------------------------------------------------
// Initialize global variables
//----------------------------------------------------------------------------
objref timesDBSGPi[numGPi], ncadGPiTha[numGPi], nil
for i=0,numGPi-1 {
timesDBSGPi[i] = new Vector()
}
//----------------------------------------------------------------------------
// Functions to set up network from current value of global variables
//----------------------------------------------------------------------------
proc RECconnectNet() {
for i=0,numGPi-1 {
if (pnm.gid_exists(cellID(ID_GPi,i))) {
ncadGPiTha[i] = new NetCon(adGPiTha[i], nil)
ncadGPiTha[i].record(timesDBSGPi[i])
}
}
}
proc RECupdateWeights() {
for i=0,numGPi-1 {
if (pnm.gid_exists(cellID(ID_GPi,i))) {
ncadGPiTha[i].weight = 0
ncadGPiTha[i].delay = 0
}
}
}
//----------------------------------------------------------------------------
// Call setup functions when .hoc file is loaded
//----------------------------------------------------------------------------
RECconnectNet()
RECupdateWeights()
//----------------------------------------------------------------------------
// Dialog to update parameter values
//----------------------------------------------------------------------------