Cannot access range variable from external mechanism
Posted: Thu May 08, 2014 7:02 pm
I have problems with accessing a range variable defined in the custom mechanism when using python as a interpreter. However, when working directly in neuron I have no problem:
I create a cell object L2_BC[0] from class where I insert a custom mechanism xtra.mod (see at the end of file for the code)
which basically creates x,y,z range variables for coordinates of segment centers. I also have a member function which I call from to calculate those segment centers. Unfortunately, when running the code with python as interpreters I get this error:
when using neuron only however, my code works:
Could you please help me resolve the issue, so that I could run the code with python as an interpreter
below is my xtra.mod:
I create a cell object L2_BC[0] from class where I insert a custom mechanism xtra.mod (see at the end of file for the code)
which basically creates x,y,z range variables for coordinates of segment centers. I also have a member function which I call from
Code: Select all
proc init()
Code: Select all
>>> h.L2_BC[0].dend[17].x_xtra(0.3)
Traceback (most recent call last):
File "stdin", line 1, in <module>
TypeError: 'float' object is not callable
Code: Select all
oc>L2_BC[0].dend[17].x_xtra(0.3)
69.102923
below is my xtra.mod:
Code: Select all
NEURON {
SUFFIX xtra
RANGE x, y, z
}
PARAMETER {
x = 0 (1) : spatial coords
y = 0 (1)
z = 0 (1)
}
ASSIGNED {
v (millivolts)
area (micron2)
}
INITIAL {
}