trac a branch!

The basics of how to develop, test, and use models.
Post Reply
reza_rzm

trac a branch!

Post 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?
ted
Site Admin
Posts: 6394
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

Use the SectionRef class's methods.
http://www.neuron.yale.edu/neuron/stati ... ecref.html
reza_rzm

Post 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,
Raj
Posts: 220
Joined: Thu Jun 09, 2005 1:09 pm
Location: Groningen, The Netherlands
Contact:

Post 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.
Post Reply