Skip to content

jnml generated NEURON cell.position(x,y,z) translates cells by more than specified in x,y,zΒ #55

@JustasB

Description

@JustasB

Extracting the cell+lems files in the attached zip:
TestCell.zip

Then converting to neuron:
jnml Mitral_0_0.cell.nml_TestBed.xml -neuron

Results in a Mitral_0_0.hoc file that contains the following function, which is used for positioning cells in NML network files:

proc position() { local i
    forsec all {
        for i = 0, n3d()-1 {
            pt3dchange(i, $1+x3d(i), $2+y3d(i), $3+z3d(i), diam3d(i))
        }
    }
    x = $1  y = $2  z = $3
}

Then running the following python code:

from neuron import h,gui
h.load_file('Mitral_0_0.hoc')
mc = h.Mitral_0_0()
h.x3d(0,sec=mc.soma) # Returns x pos as 0 -- as expected
mc.position(1,1,1)        # x,yz, should be translated by 1
h.x3d(0,sec=mc.soma) # Problem: returns 20.0 - expected 1.0

Similar problem with y & z, and for other sections.

I get this with latest dev jnml and NEURON 7.4 or 7.5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    πŸ”– Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions