Length with the 3-D method.

The basics of how to develop, test, and use models.
Post Reply
Nin
Posts: 41
Joined: Thu May 03, 2007 4:04 pm
Location: Institute of Science and Technology (IST Austria)
Contact:

Length with the 3-D method.

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

Re: Length with the 3-D method.

Post 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.
Nin
Posts: 41
Joined: Thu May 03, 2007 4:04 pm
Location: Institute of Science and Technology (IST Austria)
Contact:

Re: Length with the 3-D method.

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

Re: Length with the 3-D method.

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