Page 1 of 1

RangeVarPlot .origin(x) usage?

Posted: Fri Sep 22, 2006 6:52 pm
by eacheon
I read in the reference it says,

Code: Select all

...
.origin(x)

DESCRIPTION

   x position of the currently accessed section that is treated as the origin (location 0) of the space plot.
However in the neurondemo "stylized" model, in control.hoc the usage seems to be

Code: Select all

sg.original(soma.L)
So I am confused about what should be the right argument of .origin method, an L or x?

Posted: Fri Sep 22, 2006 10:32 pm
by ted
Not clear what you are having trouble with. Is it the notion of symbolic substitution? For
example, if the documentation for sin() said
sin(phi) returns the sine of the angle phi
and you came across code that contained this statement
y = sin(theta)
would you be asking whether the proper argument of sin() was theta or phi?

Posted: Sat Sep 23, 2006 2:02 am
by eacheon
right. I am wondering should I pass in .origin an arc length as x (0<=x<=1, say 0.5), or should I pass in length with unit um (e.g. a distance value, say, 0.5*L).

is it

Code: Select all

dend rvp.origin(0.5) 
or

Code: Select all

 dend rvp.origin(0.5*L)

Posted: Sat Sep 23, 2006 12:20 pm
by ted
The documentation of the RangeVarPlot class's origin() method
http://www.neuron.yale.edu/neuron/stati ... tml#origin
is indeed ambiguous. The question is how to interpret this phrase:
position of the currently accessed section that is treated as the origin (location 0) of the space plot.
My interpretation is colred by the fact that a RangeVarPlot's x axis is always anatomical
distance, in microns--so I'd say that the x in origin(x) is not arc length (normalized distance
or "range") but actual anatomical distance from the 0 end of the currently accessed section.

Enough with Talmudic discussions of such ambiguities. Where software and its
documentation are concerned, often the quickest way to discover the truth is to run a test.
Pick an interpretation, try it, and see if what you get is what you thought you would get. If
that doesn't work, try the other interpretation.