Connect producing different results in hoc and python
Posted: Tue Dec 07, 2010 11:03 am
I am transporting some code from hoc to python and encountered this problem. The code loads a morphology using xopen and then after creating some sections connects them to the soma of the morphology thus:
When I did what I thought was the equivalent in python:
my shape plot looks weird (split into two separate halves, one each end of the axon). And I get the following error:
Code: Select all
soma connect hill(0), 1
hill connect iseg(0), 1
iseg connect myelin[0](0), 1
myelin[0] connect node[0](0), 1
for i=0,n_axon_seg-2 {
node[i] connect myelin[i+1](0), 1
myelin[i+1] connect node[i+1](0), 1
Code: Select all
n_axon_seg=5
h.soma.connect(hill,0,1)
hill.connect(iseg,0,1)
iseg.connect(myelin_sections[0],0,1)
myelin_sections[0].connect(node_sections[0],0,1)
for i in range(0,n_axon_seg-1):
node_sections[i].connect(myelin_sections[i+1](0),1)
myelin_sections[i+1].connect(node_sections[i+1],0,1)
I hope this is enough information to solve this problem?Notice: soma(0) had previously been connected to parent sapath(0)