RangeVarPlot .origin(x) usage?

The basics of how to develop, test, and use models.
Post Reply
eacheon
Posts: 97
Joined: Wed Jan 18, 2006 2:20 pm

RangeVarPlot .origin(x) usage?

Post 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?
ted
Site Admin
Posts: 6394
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post 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?
eacheon
Posts: 97
Joined: Wed Jan 18, 2006 2:20 pm

Post 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)
ted
Site Admin
Posts: 6394
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post 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.
Post Reply