Code: Select all
forall delete_section()
create a, b, c, d, e
connect b(0), a(1)
connect c(1), b(1)
connect d(0), b(1)
connect e(0), a(0)
forall nseg=20
forall L=100
forall diam(0:1) = 10:40
objref s
s = new Shape()
s.show(0)
a s.color(2)
topology()
finitialize()
forall {
print secname()
for i=0,n3d()-1 print i, x3d(i), y3d(i), z3d(i), diam3d(i)
}
Code: Select all
from neuron import h, gui
soma=h.Section(name='soma')
dend=h.Section(name='dend')
soma.diam = soma.L = 20
dend.diam = 2
dend.L=200
#define connectivity between sections
dend.connect(soma,0,0) #connect 0 end of dend to 0 end of soma
#none of these lines of code helps solve the problem
#h.topology()
#h.finitialize()
#h.define_shape()
for sec in h.allsec():
print "section=",sec.name()
for i in xrange(int(h.n3d())): print i, h.x3d(i), h.y3d(i), h.z3d(i), h.diam3d(i)
I am obviously missing something very basic here. Thanks in advance for the help.