failure to "update" diam
Posted: Fri Jul 15, 2005 1:17 pm
I would like to get an explaination for the behaviour demonstrated by this code (using NEURON v5.7). On my machine, the section diameters of the imaginary neuron are reported as 500 um before the shape display is created, but are correct afterwards.
We discovered this in attempting to use a morphology file from the Duke-Southampton archive (from which we adapted the syntax and structure for the example code). At the end of our script, the diameters will not update until we create a shape object. We have circumvented the problem for now by creating a shape object and then immediately discarding it. This works, but seems inelegant. I'd like to understand the underlying problem.
I suspect the documentation for "pt3dconst" holds some clues: "after a call to an internal function such as area() or finitialize(), the 3d point info will be used to determine the values of the segment diameters." So it appears that one must force the diameters to be updated by calling some "internal function", one of which must be called in the creation of a shape object. Is there a better way to do this?
Brad
Code: Select all
create dendrite[5]
dendrite[0] {
pt3dadd(0,0,0,1)
pt3dadd(2,2,2,1)
}
{dendrite[0] connect dendrite[1](0), 1}
dendrite[1] {
pt3dadd(2,2,2,1)
pt3dadd(4,2,2,2)
}
{dendrite[1] connect dendrite[2](0), 1}
dendrite[2] {
pt3dadd(4,2,2,2)
pt3dadd(4,2,5,1.5)
}
{dendrite[2] connect dendrite[3](0), 1}
dendrite[3] {
pt3dadd(4,2,5,1.5)
pt3dadd(10,0,0,2)
}
{dendrite[3] connect dendrite[4](0), 1}
dendrite[4] {
pt3dadd(10,0,0,2)
pt3dadd(12,0,0,1)
}
print "seg diameters before shape is created: "
forall print diam
objref s
s = new Shape()
s.show(0)
print "seg diameters after shape is created: "
forall print diam
I suspect the documentation for "pt3dconst" holds some clues: "after a call to an internal function such as area() or finitialize(), the 3d point info will be used to determine the values of the segment diameters." So it appears that one must force the diameters to be updated by calling some "internal function", one of which must be called in the creation of a shape object. Is there a better way to do this?
Brad