-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmakeWindows.hoc
274 lines (256 loc) · 9.94 KB
/
makeWindows.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
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
///////////////////////////////////////////////////////////////////////////////
// makeWindows.hoc: creates the user interface for the simulation
///////////////////////////////////////////////////////////////////////////////
//////////////////// declarations /////////////////////////////////////////////
objectvar save_window
{pwman_place(0,0,0)}
//////////////////// procedure calls /////////////////////////////////////
// Runcontrol panel
{
xpanel("RunControl", 0)
xvalue("Init","v_init", 1,"stdinit()", 1, 1 )
xbutton("Initialize & Run Simulation","run_sim()")
xbutton("Stop","stoprun=1")
runStopAt = 5
xvalue("Continue til","runStopAt", 1,"{continuerun(runStopAt) stoprun=1}", 1, 1 )
runStopIn = 1
xvalue("Continue for","runStopIn", 1,"{continuerun(t + runStopIn) stoprun=1}", 1, 1 )
xbutton("Single Step","steprun()")
t = 0
xvalue("t","t", 2 )
xvalue("Tstop","tstop", 1,"tstop_changed()", 0, 1 )
xvalue("dt","dt", 1,"setdt()", 0, 1 )
steps_per_ms = 40
xvalue("Points plotted/ms","steps_per_ms", 1,"setdt()", 0, 1 )
screen_update_invl = 0.05
xvalue("Scrn update invl","screen_update_invl", 1,"", 0, 1 )
realtime = 0
xvalue("Real Time","realtime", 0,"", 0, 1 )
xpanel(13,325)
}
// Shape plot for point process tracking
{
save_window = new Shape()
save_window.size(-245.449,315.449,-160,330)
for i = 0,gaba_paired.count()-1 {
save_window.point_mark(gaba_paired.o(i), 2, "O", 4) // 2 = red; o = small unfilled circle; 4 = pixel size
}
for i = 0,gaba_unpaired.count()-1 {
save_window.point_mark(gaba_unpaired.o(i), 4, "O", 4) // 3 = blue; o = small unfilled circle; 4 = pixel size
}
flush_list.append(save_window)
save_window.flush()
save_window.save_name("PointProcesses")
save_window.exec_menu("Show Diam")
save_window.exec_menu("View = plot")
}
// Voltage plot
{
save_window = new Graph(0)
save_window.size(0,tstop,-80,70)
{save_window.view(0, -80, tstop, 150, 500, 30, 300.48, 200.32)}
graphList[0].append(save_window)
save_window.save_name("graphList[0].")
save_window.addexpr("V soma","v(.5)", 7, 1, 0.8, 0.9, 2)
save_window.addexpr("V prox","dend[65].v(.5)", 2, 1, 0.8, 0.9, 2)
save_window.addexpr("V mid","dend[160].v(.5)", 5, 1, 0.8, 0.9, 2)
save_window.addexpr("V dist","dend[138].v(.5)", 8, 1, 0.8, 0.9, 2)
}
// Chloride internal concentration plot
{
save_window = new Graph(0)
save_window.size(0,tstop,3.99,4.5)
{save_window.view(0, 3.99, tstop, 0.51, 860, 30, 300.48, 200.32)}
graphList[0].append(save_window)
save_window.save_name("graphList[0].")
save_window.addexpr("[Cl-]i soma","cli(.5)", 7, 1, 0.8, 0.9, 2)
save_window.addexpr("[Cl-]i prox","dend[65].cli(.5)", 2, 1, 0.8, 0.9, 2)
save_window.addexpr("[Cl-]i mid","dend[160].cli(.5)", 5, 1, 0.8, 0.9, 2)
save_window.addexpr("[Cl-]i dist","dend[138].cli(.5)", 8, 1, 0.8, 0.9, 2)
}
// Chloride reversal potential plot
{
save_window = new Graph(0)
save_window.size(0,tstop,-90, -50)
{save_window.view(0, -90, tstop, 40, 1220, 30, 300.48, 200.32)}
graphList[0].append(save_window)
save_window.save_name("graphList[0].")
save_window.addexpr("E_Cl- soma","ecl(.5)", 7, 1, 0.8, 0.9, 2)
save_window.addexpr("E_Cl- prox","dend[65].ecl(.5)", 2, 1, 0.8, 0.9, 2)
save_window.addexpr("E_Cl- mid","dend[160].ecl(.5)", 5, 1, 0.8, 0.9, 2)
save_window.addexpr("E_Cl- dist","dend[138].ecl(.5)", 8, 1, 0.8, 0.9, 2)
}
// Chloride current plot
{
save_window = new Graph(0)
save_window.size(0,tstop,0,1)
{save_window.view(0, 0, tstop, 1, 1550, 30, 300.48, 200.32)}
graphList[0].append(save_window)
save_window.save_name("graphList[0].")
save_window.addexpr("i_Cl- soma","icl", 7, 1, 0.8, 0.9, 2)
save_window.addexpr("i_Cl- prox","dend[4].icl", 2, 1, 0.8, 0.9, 2)
save_window.addexpr("i_Cl- mid","dend[160].icl", 5, 1, 0.8, 0.9, 2)
save_window.addexpr("i_Cl- dist","dend[135].icl", 8, 1, 0.8, 0.9, 2)
}
//// Calcium current plot
// {
// save_window = new Graph(0)
// save_window.size(0,tstop,2.8e-05,0.000125)
// {save_window.view(0, 2.8e-05, tstop, 9.7e-05, 664, 749, 702.72, 200.32)}
// graphList[0].append(save_window)
// save_window.save_name("graphList[0].")
// save_window.addexpr("i_Ca soma", "soma.ica( 0.0454545 )", 7, 1, 0.8, 0.9, 2)
// save_window.addexpr("i_Ca prox", "dend[4].ica(0.8)", 2, 1, 0.8, 0.9, 2)
// save_window.addexpr("i_Ca mid", "dend[160].ica(0.5)", 5, 1, 0.8, 0.9, 2)
// save_window.addexpr("i_Ca dist", "dend[138].ica(0.5)", 8, 1, 0.8, 0.9, 2)
// }
//
//// Calcium concentration plot
// {
// save_window = new Graph(0)
// save_window.size(0,tstop,2.8e-05,0.000125)
// {save_window.view(0, 2.8e-05, tstop, 9.7e-05, 864, 749, 702.72, 200.32)}
// graphList[0].append(save_window)
// save_window.save_name("graphList[0].")
// save_window.addexpr("[Ca2+]i soma", "soma.cai( 0.0454545 )", 7, 1, 0.8, 0.9, 2)
// save_window.addexpr("[Ca2+]i prox", "dend[4].cai(0.8)", 2, 1, 0.8, 0.9, 2)
// save_window.addexpr("[Ca2+]i mid", "dend[160].cai(0.5)", 5, 1, 0.8, 0.9, 2)
// save_window.addexpr("[Ca2+]i dist", "dend[138].cai(0.5)", 8, 1, 0.8, 0.9, 2)
// }
// Soma KCC2 distribution plot
{
save_window = new Graph(0)
save_window.size(0,tstop,0,1)
{save_window.view(0, 0, tstop, 1, 1576, 726, 300.48, 200.32)}
graphList[0].append(save_window)
save_window.save_name("graphList[2].")
save_window.addexpr("[M] Soma", "soma.memb_KCC2( 0.0454545 )", 3, 1, 0.8, 0.9, 2)
save_window.addexpr("[Mp] Soma", "soma.membp_KCC2( 0.0454545 )", 4, 1, 0.8, 0.9, 2)
save_window.addexpr("[C] Soma", "soma.cyt_KCC2( 0.0454545 )", 1, 1, 0.8, 0.9, 2)
}
// // Prox KCC2 distribution plot
// {
// save_window = new Graph(0)
// save_window.size(0,tstop,0,1)
// {save_window.view(0, 0, tstop, 1, 1576, 726, 300.48, 200.32)}
// graphList[0].append(save_window)
// save_window.save_name("graphList[2].")
// save_window.addexpr("[M] Prox", "dend[4].memb_KCC2(0.8)", 3, 1, 0.8, 0.9, 2)
// save_window.addexpr("[Mp] Prox", "dend[4].membp_KCC2(0.8)", 4, 1, 0.8, 0.9, 2)
// save_window.addexpr("[C] Prox", "dend[4].cyt_KCC2(0.8)", 1, 1, 0.8, 0.9, 2)
// }
// // Mid KCC2 distribution plot
// {
// save_window = new Graph(0)
// save_window.size(0,tstop,0,1)
// {save_window.view(0, 0, tstop, 1, 1576, 726, 300.48, 200.32)}
// graphList[0].append(save_window)
// save_window.save_name("graphList[2].")
// save_window.addexpr("[M] Mid", "dend[160].memb_KCC2(0.5)", 3, 1, 0.8, 0.9, 2)
// save_window.addexpr("[Mp] Mid", "dend[160].membp_KCC2(0.5)", 4, 1, 0.8, 0.9, 2)
// save_window.addexpr("[C] Mid", "dend[160].cyt_KCC2(0.5)", 1, 1, 0.8, 0.9, 2)
// }
// // Dist KCC2 distribution plot
// {
// save_window = new Graph(0)
// save_window.size(0,tstop,0,1)
// {save_window.view(0, 0, tstop, 1, 1576, 726, 300.48, 200.32)}
// graphList[0].append(save_window)
// save_window.save_name("graphList[2].")
// save_window.addexpr("[M] Dist", "dend[138].memb_KCC2(0.5)", 3, 1, 0.8, 0.9, 2)
// save_window.addexpr("[Mp] Dist", "dend[138].membp_KCC2(0.5)", 4, 1, 0.8, 0.9, 2)
// save_window.addexpr("[C] Dist", "dend[138].cyt_KCC2(0.5)", 1, 1, 0.8, 0.9, 2)
// }
//// Kinase and Phosphatase Activity plot
// {
// save_window = new Graph(0)
// save_window.size(0,tstop,0,1)
// {save_window.view(0, 0, tstop, 1, 1526, 520, 300.48, 200.32)}
// graphList[0].append(save_window)
// save_window.save_name("graphList[2].")
// save_window.addexpr("soma.kin_active_KCC2( 0.0454545 )", 7, 1, 0.8, 0.9, 2)
// save_window.addexpr("soma.phos_active_KCC2( 0.0454545 )", 3, 1, 0.8, 0.9, 2)
// }
//
// make the shape plot for chloride
{
save_window = new PlotShape(0)
save_window.size(-245.449,315.449,-160,330)
save_window.variable("cli")
{save_window.view(-245.449, -160, 560.898, 490, 1200, 300, 350.4, 304.96)}
fast_flush_list.append(save_window)
save_window.save_name("fast_flush_list.")
save_window.exec_menu("Shape Plot")
save_window.exec_menu("Show Diam")
save_window.exec_menu("View = plot")
save_window.scale(3.999,4.5)
}
//
// make the shape plot for voltage
{
save_window = new PlotShape(0)
save_window.size(-245.449,315.449,-160,330)
save_window.variable("v")
{save_window.view(-245.449, -160, 560.898, 490, 800, 300, 350.4, 304.96)}
fast_flush_list.append(save_window)
save_window.save_name("fast_flush_list.")
save_window.exec_menu("Shape Plot")
save_window.exec_menu("Show Diam")
save_window.exec_menu("View = plot")
save_window.scale(-90, 50)
}
// make the clamp window
// strdef label
// if (!strcmp(clamptype,"VClamp")) {
// {
// sprint(label,"SEClamp[0] at %s[%d](%1.1f)", location, index, position)
// xpanel(label, 0)
// xlabel(label)
// clamp.rs = rs
// xvalue("rs","clamp.rs", 1,"", 0, 1 )
// clamp.dur1 = dur1
// xvalue("dur1","clamp.dur1", 1,"", 0, 1 )
// clamp.amp1 = amp1
// xvalue("amp1","clamp.amp1", 1,"", 0, 1 )
// clamp.dur2 = dur2
// xvalue("dur2","clamp.dur2", 1,"", 0, 1 )
// clamp.amp2 = amp2
// xvalue("amp2","clamp.amp2", 1,"", 0, 1 )
// clamp.dur3 = dur3
// xvalue("dur3","clamp.dur3", 1,"", 0, 1 )
// clamp.amp3 = amp3
// xvalue("amp3","clamp.amp3", 1,"", 0, 1 )
// clamp.i = 0
// xvalue("i","clamp.i", 0,"", 0, 1 )
// clamp.vc = 0
// xvalue("vc","clamp.vc", 0,"", 0, 1 )
// xpanel(334,376)
// }
// } else if(!strcmp(clamptype,"IClamp")) {
// {
// sprint(label,"IClamp[0] at %s[%d](%1.1f)", location, index, position)
// xpanel(label, 0)
// xlabel(label)
// clamp.del = del
// xvalue("del","clamp.del", 1,"", 0, 1 )
// clamp.dur = dur
// xvalue("dur","clamp.dur", 1,"", 0, 1 )
// clamp.amp = amp
// xvalue("amp","clamp.amp", 1,"", 0, 1 )
// clamp.i = 0
// xvalue("i","clamp.i", 0,"", 0, 1 )
// xpanel(341,472)
// }
// }
// make the movie run panel
// {
// xpanel("Movie Run", 0)
// xbutton("Init & Run","movierun()")
// movie_frame_dur_ = 0.001
// xvalue("Seconds per step","movie_frame_dur_", 1,"", 0, 1 )
// xpanel(77,147)
// }
//
// update all the panels
objectvar scene_vector_[1]
{doNotify()}