Of course, I'm aiming to get the Python version to generate the same output as the hoc version.
There's still a subtle difference, which I've tracked down to a particular synapse. I need a way to look more closely at that synapse, to find what's going wrong.
My next logical step, I think, is to look at RANGE variables of the synaptic mechanism in both the hoc and Python versions. (I doubt there's a bug in the .mod file itself -- I'm just trying to "corner" my bug into a sufficiently small region of code that I can see it.)
Here is the declaration of the RANGE:
Code: Select all
NEURON {
POINT_PROCESS GABAa_S
RANGE C, R, R0, R1, g, Cmax
<snip>
Code: Select all
<snip>
Additional mechanisms from files
<snip> myTemplate.tem <snip>
<snip>
oc> objref myVec,mySyn,myCell
oc> load_file("myTemplate.tem")
1
oc> myCell = new myTemplate()
oc> myCell.soma mySyn = new GABAa_S(0.5)
oc> myVec = new Vector()
oc> myVec.record(&mySyn.R)
1
oc>
Code: Select all
>>> import nrn
>>> import neuron
>>> h = neuron.h
>>> h.nrn_load_dll('./i686/.libs/libnrnmech.so')
Additional mechanisms from files
<snip> GABAa_S.mod <snip>
<snip>
>>> h.load_file('./myTemplate.tem')
1.0
>>> myCell = h.myTemplate()
>>> mySyn = h.GABAa_S(0.5,myCell.soma)
>>> myVec = h.Vector()
>>> myVec.record(mySyn._ref_R,sec=myCell.soma)
Traceback (most recent call last):
File "stdin", line 1, in <module>
TypeError: Hoc pointer error, i is not a hoc variable
>>>
Code: Select all
>>> myVec.record(myCell.soma(0.5)._ref_v, sec=myCell.soma)