/
add_spines.hoc
41 lines (41 loc) · 1.31 KB
/
add_spines.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
// --------------------------------------------------------------
// Spines
// --------------------------------------------------------------
// Based on the "Folding factor" described in
// Jack et al (1989), Major et al (1994)
// note, this assumes active channels are present in spines
// at same density as dendrites
spine_dens = 1
// just using a simple spine density model due to lack of data on some
// neuron types.
spine_area = 0.83 // um^2 -- K Harris
proc add_spines() { local a
is_spiny = 1
if (strcmp($s1,"dend") == 0) {
forall {
ifsec "dend" {
a = 0
for (x,0) {
a = a + area(x)
}
F = (L*spine_area*spine_dens + a)/a
//print F
L = L * F^(2/3)
for (x,0) {
diam(x) = diam(x) * F^(1/3)
}
//original algorithm;
//a = 0
//for (x) print x
//for(x) print diam(x)
//for(x) a=a+area(x)
//F = (L*spine_area*spine_dens + a)/a
//L = L * F^(2/3)
//for(x) diam(x) = diam(x) * F^(1/3)
//for(x) print diam(x)
}
}
}
define_shape()
}
add_spines("dend")