vjs347 wrote:ted wrote:. . . NEURON is not a Poisson solver. It offers no way to represent the electrical properties of a conductive medium. It provides no way to represent any current source or sink that may exist in a conductive medium.
. . . There is an extracellular "mechanism" which merely adds equations that represent one or more concentric layers around the cable that results from creating and connecting sections. Furthermore, the extracellular mechanism is not a surrogate for a conductive medium.
. . . Even if NEURON provided a way to represent the extracelluar medium, point processes couldn't inject current into it.
So we're stuck having to represent extracellular stimulation either by inserting extracellular into sections and then modulating e_extracellular potential in the course of a simulation, or using the "activating function" approach (approximating the effect of the extracellular field by injecting current into each compartment). Just mentioning this here for the benefit of others who may read this thread in the future.
You want to simulate the effect of a series of rectangular current pulses applied to a resistive medium, and you have a Vector that contains a sequence of times at which the pulses start. Is that correct?
Yes, that's absolutely what I am trying to do.
Then the easiest way to proceed is to use the same approach that is used by the files in extracellular_stim_and_rec.zip. Everything related to constructing the stimulus waveform is contained in the file stim.hoc, which is loaded by the statement
load_file("stim.hoc")
in initxstim.hoc. You need to create a new file called vstim.hoc that does these things:
1. reads your file that contains the sequence of stimulus start times
2. uses that information to construct a pair of Vectors called stim_amp and stim_time that define the stimulus waveform.
Then you need to change the statement
load_file("stim.hoc")
in initxstim.hoc to
Code: Select all
// load_file("stim.hoc")
load_file("vstim.hoc") // reads stimulus times from a file and constructs stim vectors
and you'll be ready to go.
I have already made such a vstim.hoc file and will email it to you, along with a file that contains some example stimulus times.