Page 1 of 1

spike duration

Posted: Mon Jan 26, 2009 1:14 pm
by thats_karlo
Hello,

when an action potential propagates, how can we determine the duration of action potential Vs. distance from soma?
For a single compartment model, we can record membrane potential and time, then easily we can determine the the duration of signals. But for a multi-compartment model, that's not an efficient way, and sometimes impossible. Any suggestion?

Re: spike duration

Posted: Tue Jan 27, 2009 7:19 pm
by ted
To begin to answer your question, it is necessary to know your operational definition of "action potential duration."

Re: spike duration

Posted: Tue Jan 27, 2009 7:57 pm
by thats_karlo
Spike duration is measured from the peak of the spike to when membrane potential declines to 33% of peak amplitude.

Re: spike duration

Posted: Tue Jan 27, 2009 9:24 pm
by ted
thats_karlo wrote:Spike duration is measured from the peak of the spike to when membrane potential declines to 33% of peak amplitude.
Please provide an operational definition of peak amplitude.

Re: spike duration

Posted: Tue Jan 27, 2009 9:40 pm
by thats_karlo
I'm using the following code (as *.mod file) to detect maximum of signal amplitude:

Code: Select all

NEURON { 
        SUFFIX fmax     
        RANGE vmax tmax
} 
ASSIGNED { 
        v (millivolt) 
        vmax (millivolt) 
        tmax (ms) 
        } 
INITIAL { 
        vmax = v 
        tmax = t 
} 
BREAKPOINT { 

VERBATIM 
                if (v > vmax) { 
                vmax = v; 
                tmax = t;               
                }           
   
ENDVERBATIM 
}               
 

Re: spike duration

Posted: Tue Jan 27, 2009 10:37 pm
by ted
The NMODL code will record the most positive potential at each node during a simulation, but that is not what any experimentalist would call the amplitude of a spike. Spike amplitude is generally measured from resting potential. So does your definition of spike amplitude take resting potential into account? Will your model cell have any background synaptic activity or spontaneous fluctuations of membrane potential that make the concept of "resting potential" ambiguous?

But, regardless of how you define spike amplitude:
Determining spike duration at any point requires determining two times: t1 when membrane potential at that point crosses some level vx in a depolarizing direction, and t2 when it crosses vx again but in a hyperpolarizing direction. If vx depends on spike amplitude, and spike amplitude varies with anatomical location (it will, for any model of spike propagation that has significant but finite anatomical extent), then vx will depend on anatomical location. Furthermore, vx cannot be known until the simulation has already gone past t1.

So, unless you ignore the fact that vx depends on location, you must do this
For a single compartment model, we can record membrane potential and time, then easily we can determine the the duration of signals.
even for a multicompartment model.

Re: spike duration

Posted: Tue Jan 27, 2009 11:27 pm
by thats_karlo
Dear Ted,

Thanks for your reply and as always it was useful.

As i know,to determine the amplitude of action potential, experimentalist -at least in our laboratory- usually finds it by: difference between the membrane at onset of action potential, where dv/dt >12(10-15), and the maximum value of membrane potential. then the AP duration could be defined as 33% of peak amplitude or sometimes the width of AP when it has 50% of AP amplitude.
For a multi-compartment model, i believe, it is not reasonable way, to record AP at each compartment and then determine AP duration. So, i'm looking for any advice to find a good way, if there is any!

Thanks again,

Re: spike duration

Posted: Wed Jan 28, 2009 9:42 am
by ted
thats_karlo wrote:For a multi-compartment model, i believe, it is not reasonable way, to record AP at each compartment and then determine AP duration.
Why do you believe it is not a reasonable way?

Re: spike duration

Posted: Wed Jan 28, 2009 10:25 am
by thats_karlo
probably, i could say computational expensive! 1000 compartments -> 1000 vectors to save membrane potential.. i thought maybe there is another way to find spike duration without recording at each compartment.
If there is no other way, then i'm going to record Vm of all compartments.

Thank you so much.

Re: spike duration

Posted: Wed Jan 28, 2009 11:34 am
by ted
If your model gives exactly the same result each time it is run, there is a strategy by which you could save storage at the cost of increased code complexity and simulation time. The strategy is
1. run a simulation that determines peak spike amplitude in each compartment.
2. run a second simulation that uses the prevously measured spike peak amplitudes to determine spike width.

Slightly clever programming is required to make this happen. Here is the rough outline of such a program:
1. code that specifies properties of model cell
2. code that specifies stimulator and tstop (tstop must be long enough for spike to propagate throughout entire model)
3. into all sections of interest, insert a density mechanism that captures maximum depolarization
4. run a "calibration" simulation
5. in all internal nodes of all sections of interest, find spike amplitude by subtracting resting potential from the maximum depolarization
6. into all sections of interest, insert a density mechanism that will capture the times t1 and t2 at which v will cross the voltage vx at which you want to measure spike width
7. in all internal nodes of all sections of interest, use spike amplitude to set the value of vx
8. run a "spike width measurement" simulation
9. in all internal nodes of all sections of interest, calculate spike width as t2-t1
10. report results

This will work only if the model cell produces exactly the same voltage trajectories during the "calibration" and "spike width measurement" simulations. If the cell produces multiple spikes, the reported spike widths will be those of the last spikes that happened during the simulation.

You already have NMODL code for a density mechanism that captures maximum depolarization (but the RANGE statement needs a comma after vmax, i.e. RANGE vmax, tmax). Here is the code for a density mechanism that uses a user-specified "threshold" to determine t1, t2, and tw (spike width):

Code: Select all

NEURON {
        SUFFIX ftx
        RANGE vx, t1, t2, tw
}
ASSIGNED {
        v (millivolt)
        vx (millivolt) : "threshold" for time measurements
        t1 (ms) : when v rises above vx
        t2 (ms) : when v falls back below vx
        tw (ms) : spike width
	prespike (1) : 1 if spike hasn't started
	postspike (1) : 1 if spike has finished
}
INITIAL {
	prespike = 1
	postspike = 0
        t1 = -1
        t2 = -2 : so tx > 0 only if a spike has finished
}
BREAKPOINT {
VERBATIM
  if (prespike==1) {
    if (v>vx) {
      t1 = t;
      prespike = 0;
    }
  } else {
    if (postspike==0) {
      if (v<vx) {
        t2 = t;
        postspike = 1;
      }
    }
  }
ENDVERBATIM
  tw = t2 - t1 : < 0 means spike hasn't finished
}
Here is the hoc code for a program that does what the code outline specifies, and finds spike "half widths" (width halfway between resting potential and spike peak).

Code: Select all

load_file("nrngui.hoc")
load_file("cell.ses")
load_file("rig.ses") // RunControl, graph, point process manager as IClamp

forall insert fmax
run() // capture spike peak depolarization

forall insert ftx

forall for (x,0) { // omit nodes at 0 and 1
  // to find half width,
  // put vx_ftx halfway between spike peak
  // and hh resting potential (-65)
  vx_ftx(x) = 0.5*(vmax_fmax(x) - 65)
}
run()

forall for (x,0) print secname(), " ", x, tw_ftx(x)

Re: spike duration

Posted: Fri Jan 30, 2009 10:24 am
by thats_karlo
Dear Ted,

Thank you so much.I am always learning a lot from my mistakes and your comments.

Just as last question in this topics:

I used shape plot/space plot to have tw_ftx Vs. distance form soma. But, when i increased compartments number (nseg*=3), in order to get a smoother curve, the curve gets a zigzag shape. even by changing dt to 0.0001 the results has not improved. Then, my question is , how can i get better result ; smoother curve?

Re: spike duration

Posted: Fri Jan 30, 2009 2:29 pm
by ted
Make a new space plot.

Re: spike duration

Posted: Fri Jan 30, 2009 2:44 pm
by thats_karlo
I checked for new space plot and still the same problem. i have sent the code to e-mail address.