Open iomaganaris opened 4 years ago
On another topic regarding LFP, can one extract, in Neuron, segment coordinates (in a reference frame cell specific) in the same way as one can extract positions of the section arc? Thanks.
The details really depend on the details. We need an example model to examine. In NEURON the attempt to match imembrane with a manual addition of all the expected currents from the RANGE variables is straightforward only with the variable time step method where everything is defined at the same value of t. With the fixed step method, different current categories may have to be adjusted from their presented values at t-dt/2 (when secondorder=2
) or an even more complicated mixed processing (secondorder=0 or 1
) that is too tedious to go into here. If the questions are interpreted at a more superficial level, it helps to see the electrical equivalent circuit of the mode on which one can point to the membrane current, axial currents,and electrode currents.
can one extract, in Neuron, segment coordinates
That has been written many times and it is an oversight that it is not a built-in method for nrn.Segment called xyz that would return the coordinate tuple. For now one must compute it from the 3d information of a Section and the segment x*L value.. ie the linear interpolation of the 3-d points along the centroid that span the center of the segment.
Similar to the calculation of fast_imem in NEURON we added the same functionality for reporting
i_membrane
in CoreNEURON. There are still some details about this current that need clarification. According to @nrnhines :Regarding this, Sirio from BBP tried to figure out how i_membrane calculation in CoreNEURON corresponds to NEURON and to find out which currents sum up to 0 here. The following graph sums up his findings.
i_membrane
report in CoreNEURON is the same as thei_membrane
report in NEURON (using the fast_imem calculation) while the summation report ofi_membrane+IClamp
in NEURON is not summing up to 0. The question that rises here is what other current should be summed up to reach to 0.Trying to reproduce this simulation I also figured out that
i_membrane+IClamp
summation report in NEURON is almost the same as thei_membrane
compartment report, apart from the first segment of a cell, where theIClamp
current in non zero.i_membrane
compartment report in NEURON (fast_imem)i_membrane+IClamp
summation report in NEURONFurthermore, for the LFP calculation specifically there is the question whether the
IClamp
current should be used in the calculation or simply thei_membrane
current is only needed, given that there is some stimulus current. In case that theIClamp
should be added to the calculation of LFP, then this means that the reporting of theIClamp
current should be implemented in CoreNEURON, so that the two currents can be added after the simulation and then used as input to calculate the LFP.cc: @jamesgking @pramodk @bdelmarm