Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JustasB opened this issue Jan 24, 2018 · 0 comments

Comments

@JustasB
Copy link

JustasB commented Jan 24, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant