scidash / neuronunit

A package for data-driven validation of neuron and ion channel models using SciUnit
http://neuronunit.scidash.org
38 stars 24 forks source link

PyNN Izhikevitch models, and NeuroML NEURON Izhikevitch models do not produce the same results with a user naive run. #166

Closed russelljjarvis closed 6 years ago

russelljjarvis commented 6 years ago

PyNN Izhikitetch models, and NeuroML NEURON Izhikitch models do not produce the same results on a rheobase search with a user naive run, although inspecting the model using NEURONs psection() shows the same fundamental model attributes.

Via pyNN NEURON:

(Pdb) model1 = ReducedModel(get_neab.LEMS_MODEL_PATH, name= str('vanilla'), backend=('pyNN', {'DTC':dtc}))
INFO:PyNN:Initializing membrane potential of 0 cells and 0 Populations.
INFO:PyNN:Initializing membrane potential of 0 cells and 0 Populations.
{'c': -55.0, 'a': 0.94499999999999995, 'i_offset': 0.014, 'd': 0.20000000000000001, 'b': -2.5000000000000001e-09}
__nrnsec_0x3d6fa60 { nseg=1  L=10  Ra=35.4
    /*location 0 attached to cell 0*/
    /* First segment only */
    insert morphology { diam=3.1831}
    insert capacitance { cm=1}
    insert IClamp { del=0 dur=1e+12 amp=0.014}
    insert Izhikevich { a=0.02 b=0.2 c=-65 d=6 vthresh=30 uinit=-14}
}
Via the neuron backend to NEURON:
``` python.
(Pdb) model1 = ReducedModel(get_neab.LEMS_MODEL_PATH, name= str('vanilla'), backend=('NEURON', {'DTC':dtc}))
Mechanisms already loaded from path: /home/jovyan/neuronunit/neuronunit/models/NeuroML2.  Aborting.

    Starting simulation in NEURON of 1000.0ms generated from NeuroML2 model...

Population RS_pop contains 1 instance(s) of component: RS of type: izhikevich2007Cell
{'c': -55.0, 'b': -2.5000000000000001e-09, 'd': 0.20000000000000001, 'a': 0.94499999999999995, 'v0': -45.0}
{'c': -55.0, 'b': -2.5000000000000001e-09, 'd': 0.20000000000000001, 'a': 0.94499999999999995, 'v0': -45.0} <<< attributes noneified
__nrnsec_0x3d6fa60 { nseg=1  L=10  Ra=35.4
    /*location 0 attached to cell 0*/
    /* First segment only */
    insert morphology { diam=3.1831}
    insert capacitance { cm=1}
    insert IClamp { del=0 dur=1e+12 amp=0.014}
    insert Izhikevich { a=0.02 b=0.2 c=-65 d=6 vthresh=30 uinit=-14}
}
(Pdb) model1._backend
<neuronunit.models.backends.neuron.NEURONBackend object at 0x7f38af04cef0>
(Pdb) model0._backend
<neuronunit.models.backends.neuron.NEURONBackend object at 0x7f38ed178908>
(Pdb) 
rgerkin commented 6 years ago

Let's make PyNN a Model class and not a Backend and this will go away.