Page 1 of 1

Implementing "Extracellular stimulation and recording"

Posted: Thu Sep 27, 2012 12:28 pm
by pascal
I have inherited some code that implements the "Extracellular stimulation and recording" code, and it is *almost* working perfectly, except for one glitch. The network simulation is composed of 5-compartment pyramidal cells and 1-compartment basket cells. Recording the contribution of each compartment of the pyramidal cells works perfectly well (I can tell this by saving the field traces from individual neurons), but recording from basket cells does not work. For some reason, the field recorded from basket cells is flat-lined, even when the cells are spiking. I'm pretty sure the error lies somewhere in the following process, which is defined in the template for basket cells:

Code: Select all

proc fieldrec() {
		forall if (ismembrane("xtra")) {
			//for (x,0) cvode.record(&er_xtra(x), extraRec, TRec)
x is not defined in the function, so something is obviously amiss. However, I tried commenting extraRec.record(&er_xtra(x)) and uncommenting for (x,0) cvode.record(&er_xtra(x), extraRec, TRec), and it did nothing to solve the problem. I've also tried various other modifications, and none of them have worked. Any ideas would be much appreciated. Thanks!

Re: Implementing "Extracellular stimulation and recording"

Posted: Thu Sep 27, 2012 4:03 pm
by ted
A model cell implemented as a single compartment can produce no electrical effect on anything outside of it. This is related to Gauss's law / Maxwell's equations. Think about it. To represent a cell with a single compartment is to make the (tacit) assumption that all ionic and capacitive membrane currents are uniformly distributed over the surface of the cell.* Therefore they must cancel each other out over the entire surface of the cell. The membrane ionic currents and membrane potential of the cell can follow any trajectory whatever, but there will be no detectable effect on the electrical field or potential outside of the cell.

*--or, if you prefer to think of equivalent circuits, the intracellular side of each mechanism through which some component of transmembrane flows is connected to one node, and the extracellular side of each of them is attached to a second node. The outside world can only see the extracellular node and cannot be affected by whatever happens to the intracellular node. The potential at the extracellular node is governed by whatever in the outside world that it is attached to.

"Oh, but so-and-so implemented a network model with lots of single compartment model cells, and it generates 'fields'."

It emulates field generation by summing one or more of the transmembrane ionic currents from each cell (or maybe the transmembrane capacitive current from each cell). This produces plausible looking results, and one might propose that it is a rough approximation to a network in which each model cell was implemented with two compartments, one active and the other passive, but without the computational burden of having twice as many compartments. You can always implement something like that, if you wish, and add it to the field produced by your multicompartment model cell, but you'll have to write the code yourself and come up with a rationale for the weights that are applied to the emulated field contributions that the single compartment model cells generate. It may help to know that every section has a range variable called i_cap that reports capacitive membrane current.

Re: Implementing "Extracellular stimulation and recording"

Posted: Sat Sep 29, 2012 10:18 pm
by pascal
Thanks, Ted, that is very helpful.