-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMC_save.hoc
67 lines (50 loc) · 1.15 KB
/
MC_save.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
DT = 0.2
objref f1
f1 = new File()
strdef filepath, filename
filepath = "celldata/"
objref time, Vt, Vp, Vs, Vd
time = new Vector()
Vt = new Vector()
Vp = new Vector()
Vs = new Vector()
Vd = new Vector()
time.record(&t, DT)
Vt.record(&mit.tuft.v(0.5), DT)
Vp.record(&mit.prim.v(0.5), DT)
Vs.record(&mit.soma.v(0.5), DT)
Vd.record(&mit.dend.v(0.5), DT)
//====================================================
// Save DATA
//====================================================
proc save_data() {
// Simulation time
sprint(filename, "%st",filepath)
f1.wopen(filename)
time.printf(f1)
f1.close()
// Somatic spike time
sprint(filename, "%sMT",filepath)
f1.wopen(filename)
mit.spiketimes.printf(f1)
f1.close()
// Voltage
sprint(filename, "%sVs",filepath)
f1.wopen(filename)
Vs.printf(f1)
f1.close()
/*
sprint(filename, "%sVt",filepath)
f1.wopen(filename)
Vt.printf(f1)
f1.close()
sprint(filename, "%sVp",filepath)
f1.wopen(filename)
Vp.printf(f1)
f1.close()
sprint(filename, "%sVd",filepath)
f1.wopen(filename)
Vd.printf(f1)
f1.close()
*/
}