Finding upstream and downstream sections and segments

Managing anatomically complex model cells with the CellBuilder. Importing morphometric data with NEURON's Import3D tool or Robert Cannon's CVAPP. Where to find detailed morphometric data.

Finding upstream and downstream sections and segments

Postby Corinne » Sun Feb 12, 2012 11:19 pm

Hello,

I was wondering if there was an elegant way to find all of the upstream and downstream sections and segments from a node. For example, say I wanted to find the average voltage of all sections upstream from an current injection point. To do this I would need to know the voltage at all the nodes upstream from the cite of my injection. Is there a way to find out what the upsteam sections and segments are, or do I need to make a list by hand?

Thanks!!
Corinne
 
Posts: 37
Joined: Wed Feb 09, 2011 8:13 pm

Re: Finding upstream and downstream sections and segments

Postby ted » Mon Feb 13, 2012 11:14 am

Code: Select all
objref sl
sl = new SectionList()
foo sl.children() // appends all children of foo to sl

SectionRef class has useful methods--parent, child, parent etc.
ted
Site Admin
 
Posts: 3587
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine

Re: Finding upstream and downstream sections and segments

Postby Corinne » Fri Feb 17, 2012 2:07 am

I knew there would be a fabulous way to do it!

Is there an equally fabulous way to make a list of all the distal most sections of an arbor? I couldn't quite figure it out using the recommended statements.

Thanks!
Corinne
 
Posts: 37
Joined: Wed Feb 09, 2011 8:13 pm

Re: Finding upstream and downstream sections and segments

Postby ted » Fri Feb 17, 2012 11:02 am

First make a SectionList that contains all children of the arbor's root section. Assuming the root section's name is foo
Code: Select all
objref tree
tree = new SectionList()
foo tree.wholetree()
Then iterate over all the sections in that SectionList to identify those that have no children
Code: Select all
objref terminals, thisone
terminals = new SectionList()
forsec tree {
  thisone = new SectionRef()
  if (thisone.nchild == 0) terminals.append()
}
objref thisone // destroy link between thisone and the last referenced section
  // for the sake of safety
ted
Site Admin
 
Posts: 3587
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine


Return to Anatomically detailed models

Who is online

Users browsing this forum: No registered users and 0 guests

cron