Page 1 of 1

trac a branch!

Posted: Mon Nov 06, 2006 3:46 pm
by reza_rzm
Hi,
Look at the following scehamtic bracnh of cell!

Code: Select all

                                                   dend1[3] 
                                                         /                       dend1[5]
                                    dend1[2]------                       /
                                   /                    \ -- dend1[4]---
                 dend1[1]----                                            \ dend1[6] 
                 /                \dedn1[7]
                /
dend1[0]--
                \                   dend1[9]--dend1[10]
                 \                 /                   
                 dend1[8]----                    dend1[12]
                                   \                  /
                                     dend1[11]--
                                                      \dedn1[13]-dend1[14]

for this branch,i like to create a section list, which contains

[last section in trace-----first section in the trac ]
e.g
section[1]= [ dedn1[14] dedn1[13] dedn1[11] dedn1[8] dedn1[0] ]
or
section[2]=[ dedn1[10] dedn1[9] dedn1[8] dedn1[0] ]

and ....

I hope my question was clear.

Do you have any idea , how can i do that?

Posted: Mon Nov 06, 2006 6:49 pm
by ted
Use the SectionRef class's methods.
http://www.neuron.yale.edu/neuron/stati ... ecref.html

Posted: Mon Nov 06, 2006 9:19 pm
by reza_rzm
Thanks ted,

Yes, probably thats the way to use SectionRef. But i can not find a good way.

Can you give me some advices?

Thanks,

Posted: Tue Nov 07, 2006 4:25 am
by Raj
With sectionref's parent method you can find the parent of a section. So writing a while loop in which you get a new parent untill you are at the root should not be a problem.

With sectionref's nchild method you can establish the number of children, if this is zero you are at an endsegment.

With forall or forsec you can go over all section to test these conditions, but you will have to generate a temporary secref for each section on which you can call these methods.

It would be nice to have a thissection secref which would be automatically available but I'm am not aware of such a construct, Therefore to find all endsegments you will have to do something like:

Code: Select all

objref endSections, tmpSecRef
endSections=new SectionList()
forsec "myDendrite" {
        tmpSecRef=new SectionRef()
        if (tmpSecRef.nchild==0) {
            endSections.append()
        }                          
    } 
With similar code you should be able to build the path from endsegments to the soma.