Placing a point process at a known 3D location

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.
Post Reply
DavidSwygart
Posts: 8
Joined: Mon Dec 03, 2018 6:50 pm

Placing a point process at a known 3D location

Post by DavidSwygart » Tue Dec 11, 2018 11:45 am

Using import3D I have created an anatomically detailed model of a cell from an SWC file. I now want to add synapses to this model. I know the 3D location of each synapse and have determined the 3D point from the SWC file that each synapse is closest to. Now, what is the best way to add these synapses? Once I know the section ID, I can use arc3d() to determine how far down the section I want to put my synapse, correct? However, I don't know the best way to determine which section contains my 3D point. Is there a simple command to do this?

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

Re: Placing a point process at a known 3D location

Post by ted » Wed Dec 12, 2018 10:20 am

Everything is not built into NEURON, but NEURON provides simple tools that enable building what you need with hoc and/or Python. For each section whose geometry has been specified using pt3d syntax, NEURON maintains an internal table of x,y,z coordinates and the corresponding diameter. Now would be a good time to read
https://www.neuron.yale.edu/neuron/stat ... metry.html
and especially the part about "3-D specification of geometry".

Here is an algorithm in pseudocode for identifying where to attach synapses:

Code: Select all

AFTER the model cell's topology, geometry,
and spatial discretization have been completed--

for each set of xyz coordinates at which a synapse should be located
  for each section in the model
    look for a point with matching coordinates (i.e. check every x3d, y3d, and z3d that belongs to the section)
      when it is found, attach a synapse to this location
This algorithm isn't marvellously efficient, but it should work, and it would be easy to implement.

DavidSwygart
Posts: 8
Joined: Mon Dec 03, 2018 6:50 pm

Re: Placing a point process at a known 3D location

Post by DavidSwygart » Tue Dec 18, 2018 3:13 pm

Thanks! I was thinking of doing something like this, but I just thought I would check because I often use way too many for loops to solve simple problems. I did implement the strategy you outlined and it worked great.

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

Re: Placing a point process at a known 3D location

Post by ted » Tue Dec 18, 2018 6:39 pm

Excellent!

Post Reply