Accessing synapses on a section

When Python is the interpreter, what is a good
design for the interface to the basic NEURON
concepts.

Moderator: hines

Post Reply
sgratiy
Posts: 41
Joined: Tue Mar 30, 2010 5:33 pm

Accessing synapses on a section

Post by sgratiy » Wed Oct 01, 2014 8:59 pm

Is there a way of getting a list of synapses existing on a section? It is assumed that synapse were created, of course.

I wanted to calculate x,y,z coordinates of synapses for visulaization purposes. So, I would like to be able to loop through sections in a particular cell and for each section get list of synapses. This would allow me to interpolate their xyz coords form 3d points easily.

Thanks

regger
Posts: 21
Joined: Sun Apr 22, 2012 9:49 pm

Re: Accessing synapses on a section

Post by regger » Thu Oct 02, 2014 5:22 am

I don't know about accessing synapses through sections, but the other way around is certainly possible.
Use a PointProcess's get_loc() method, which pushes the section the PointProcess is attached to onto the section stack and returns the relative position (x) along that section. Using the section's x3d()/y3d()/z3d() methods, you should be able to figure out whatever you need.

best,
Robert

ted
Site Admin
Posts: 5566
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Accessing synapses on a section

Post by ted » Thu Oct 02, 2014 11:18 am

Model setup strategies often involve appending each synaptic mechanism to a list when it is created. Implementational details vary depending on the implementer's strategy (each cell may have its own list whose members are all of the synapses attached to that cell, or there may be a single list that contains all synaptic mechanisms, or there may be separate lists for different kinds of synaptic mechanisms etc.), but once such lists exist it is easy to iterate over their contents to discover synaptic locations as regger suggests.

sgratiy
Posts: 41
Joined: Tue Mar 30, 2010 5:33 pm

Re: Accessing synapses on a section

Post by sgratiy » Thu Oct 02, 2014 4:23 pm

Thanks for pointing out the get_loc() method. I followed your recommendation and it works.

Post Reply