forsec ... stack empty
Posted: Mon Aug 12, 2013 9:50 am
Hello,
I have a neuron model and I am trying to get the route from each leaf ( terminal ) to the routh.
First I use this code to get a list of all terminals
After running this code, sectionlist terminal contain all the terminals of the neuron.
Then I want to trace the route back to the root, I try to run this code:
But when I try to run the second part of the code I get this error:
I found out that the error is in
Because also if I try to run this code
I get the same error.
What exactly is the problem?
I have a neuron model and I am trying to get the route from each leaf ( terminal ) to the routh.
First I use this code to get a list of all terminals
Code: Select all
objref tree
tree = new SectionList()
soma[0] distance()
soma[0] tree.wholetree()
objref terminals, thisone
terminals = new SectionList()
forsec tree {
thisone = new SectionRef()
if (thisone.nchild == 0 ) terminals.append
}
objref thisone
Then I want to trace the route back to the root, I try to run this code:
Code: Select all
objref Leaff
Dist = new Vector()
forsec terminals {
Leaff = new SectionRef()
while (Leaff.has_parent){
Leaff.parent
.....
}
}
Code: Select all
/usr/local/nrn/x86_64/bin/nrniv: stack empty
I found out that the error is in
Code: Select all
Leaff.parent
Code: Select all
objref Leaff
Dist = new Vector()
forsec terminals {
Leaff = new SectionRef()
Leaff.parent
}
What exactly is the problem?