Page 1 of 1

integration in NEURON (and differences with Brian)

Posted: Mon Oct 24, 2011 12:41 pm
by btorb
I stumbled upon some issue related to the way of integration in NEURON and don't exactly know what's going behind the scenes.

I made a simple one-compartmental model that has one current (some fast K current) and simulated this model both in NEURON and in brian (as well as, actually, analytically in a linearized form). Since my voltage deflection are very small i can assume linearity around the resting potential.

In the simulation i inject normal white-noise and the current traces of NEURON and Brian are very similar. Moreover also the voltages look very similar but you can observe a discrepancy of around 0.1 mV. For all purposes this should be a good match considering the different (?) integration methods used in both simulators.

However, when computing the impedance there is a very large discrepancy between the peaks of the impedances! The brian simulation and the analytical/linearized solution are roughly the same but my NEURON implementation has an impedance with a peak that is nearly double (180 vs 300 Hz). Especially in in slow-frequency (<300Hz) there is a large difference. At higher components the impedances computed from the NEURON and brian traces seem to converge again.

In NMODL (for the non-linear version of) the K-current specifies the "euler" method for integration because that's the only method that is both available in NEURON and brian.

Any idea where the difference comes from? (The brian model uses the same non-linear K-current and all other parameters seem to be the same)

Re: integration in NEURON (and differences with Brian)

Posted: Mon Oct 24, 2011 2:34 pm
by ted
Most strange. Could you send me your NEURON code so I could try it myself?
ted dot carnevale at yale dot edu

Re: integration in NEURON (and differences with Brian)

Posted: Thu Oct 27, 2011 9:51 am
by btorb
A tempest in a teapot. thanks to the alertness of Mike and Ted it was found that a time-constant was missing a factor in one of the files.