Hi all,
I'm aware that the distance function returns the straight line distance between two points, but are there any functions built into neuron that would allow me to trace and return the distance along a dendrite?
Thanks
trace distance along dendrite
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: trace distance along dendrite
Did you read that somewhere? The documentationneurite wrote:I'm aware that the distance function returns the straight line distance between two points
http://www.neuron.yale.edu/neuron/stati ... l#distance
says
"Compute the path distance between two points on a neuron."
but perhaps something different is posted elsewhere on the WWW.
If this needs disambiguation, create a model with known structure and use it to discover
what value distance returns. This
Code: Select all
create soma
access soma
pt3dclear()
pt3dadd(0,0,0,1)
pt3dadd(10,0,0,1)
pt3dadd(0,1,0,1)
distance()
at (0,1,0), and specifies that the 0 end of this model is the origin for distance measurements. If your interpretation is correct, distance(1) should return a value of 1.
Thanks Ted, that means I don't have to change things in the code I wrote after all. I do remember reading, although not from the documentation itself, about distance tracing a straight line distance. Perhaps what I read was worded poorly or I just misinterpreted it, but next time I will make sure double check in the documentation. Thanks again.
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
For the benefit of future readers of this thread: distance(1) will return 20 (the path distancethat means I don't have to change things in the code I wrote after all.
from the soma's 1 end to its 0 end), not 1 (the pythagorean, or "straight line," distance
between (0,1,0) and (0,0,0)).
It would be helpful to know the source so that the statement can be corrected. The officialI do remember reading, although not from the documentation itself, about distance tracing a straight line distance.
documentation itself is not always as explicit as it could be, so that some statements may
be subject to alternative interpretations. In such cases, it is often easiest to discover the
correct interpretation by constructing a simple test program that produces an unambiguous
result.