-
Notifications
You must be signed in to change notification settings - Fork 2
/
setrx.hoc
42 lines (35 loc) · 1.09 KB
/
setrx.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
/*--------------------------------------------------------------------
Calculates the transfer resistances between extracellular electrode(s) and a modelled fibre section. Suppose a
stimulus current of amplitude Is, applied to a particular configuration of extracellular electrode(s), produces a
potential Vext(x,y,z) at location (x,y,z). Then the transfer resistance between the electrode(s) and (x,y,z) is
rx(x,y,z) = Vext(x,y,z) / Is.
----------------------------------------------------------------------*/
forall {
insert extracellular
insert xtra
}
objectvar f
f = new File()
f.ropen("rx_xtra_interpolated.txt")
proc grindaway() {
forall {
if (ismembrane("xtra")) {
for (x,0) {
rx_xtra(x) = f.scanvar() / 1e6
}
}
}
}
proc setpointers() { local done
// determines interpolated locations of nodes
grindaway()
forall {
if (ismembrane("xtra")) {
for (x, 0) {
setpointer im_xtra(x), i_membrane(x)
setpointer ex_xtra(x), e_extracellular(x)
}
}
}
}
setpointers()