Page 1 of 1
Length with the 3-D method.
Posted: Mon Dec 13, 2010 7:43 pm
by Nin
I am running some dummy tests to create cells with the 3D methods and I realized that the length of a segment changes after running pt3dadd(). Is this normal?
For example, if I run this:
Code: Select all
/* dummy.hoc */
create soma
access soma
soma.L = 10
soma.diam = 10
// 3-D method (see page 146)
soma {
pt3dadd(0, 0, 0, soma.diam)
pt3dadd(soma.L, 0, 0 , soma.diam) /* move in x direction
}
If I print in the hoc interpreter soma.L, this will give me 1e-09, in stead of 10. I am pretty sure that I am doing something wrong, but I cannot figure out what
Thanks a lot in advance
Jose
Re: Length with the 3-D method.
Posted: Mon Dec 13, 2010 11:46 pm
by ted
Nin wrote:I am pretty sure that I am doing something wrong, but I cannot figure out what
Being too clever by half is what. Section geometry can be specified in one of two styles:
stylized, in which one assigns values to L and diam, and which is most suitable for "stick figure" model cells,
and pt3d, in which one specifies a series of x, y, z, d (for "diameter") quintuples, and which is most suitable for model cells whose shape is based on data obtained from detailed morphometric reconstructions. A model cell can have some sections specified by the stylized method, and others by the pt3d method, but for any one section just be sure to pick one style and stick with it. Don't change from one to the other in the middle of specifying the geometry of a section and expect the interpreter to guess what the dickens you intend.
Re: Length with the 3-D method.
Posted: Tue Dec 14, 2010 2:43 am
by Nin
Thanks a lot for your advice!!!
Ted
Don't change from one to the other in the middle of specifying the geometry of a section
What a dumb thing from my side! I expected that both geometric methods would interact with each other in a section :P. Actually, the problem arose when I overwrote the geometry of a Python cell class with other class with more complex geometry. To keep a single geometry method sounds very reasonable, indeed
Thanks!
Re: Length with the 3-D method.
Posted: Tue Dec 14, 2010 9:05 am
by ted
Nin wrote:What a dumb thing from my side!
Not really. It's computers that are dumb.
I expected that both geometric methods would interact with each other in a section
which requires that the programming language, whether hoc or Python, know what you expected to happen if you mix the stylized and 3D geometry specifications. Actually these two methods do interact, but in a way that most people would probably not find to be useful.