Action potential counting
AP Counting provides automatic detection of action potentials (APs) and calculation of:
- Inter-spike interval
- Spike-frequency accommodation
- Local variation of inter-spike intervals
- First-spike latency
- Rheobase
Run spike counting analysis
Clicking the Detect APs button on the AP Counting analysis panel will run the analysis. By default, every record in the file is analyzed. To select specific records to analyze, set the Records to Analyze box at the bottom of the analysis panel.
To restrict the analysis to a specific time period, click Set bounds. To change the spike-detection algorithm, use the drop-down menu in the Detection box on the analysis panel. More detail on these detection algorithms is given below.

To keep settings after closing and reopening the software, use Save as Defaults at the bottom of the AP Counting panel. This also saves the region positions for bounds analysis and manually entered current-step values. The Records to Analyze range is not saved.
Spike detection methods
Three spike-detection algorithms are provided, Auto. Threshold Record, Auto. Threshold Spike, and Manual Threshold, which differ in their sensitivity and approach.
Detection approaches
Auto. Threshold Spike – Detects action potentials using the threshold parameters described below. This option is useful for dynamic spike waveforms and instances where non-linear trends in the peak amplitudes preclude use of a straight-line threshold.
Auto. Threshold Record – Provides a robust alternative to individual action potential detection by averaging across all detected spikes to generate an absolute threshold.
First, an Auto. Threshold Spike approach is used to detect action potentials. Then, the median amplitude mid-point \(V_\mathrm{m}\) is calculated from all detected action potentials. This is used as a straight-line threshold over which any spike crossing is considered an action potential.
This method reduces the number of erroneously detected action potentials, particularly in noisy data as edge-case spikes are downweighted. This is the default setting for spike detection.
Manual Threshold – The simplest method. When selected, a red threshold bar appears on the plot. Any spike which rises above then falls below this threshold will be counted as an action potential.
Detection parameters
Automatic spike detection uses five parameters to detect spikes:
Amplitude (mV) – Minimum amplitude of a spike to be considered an action potential.
Rise (mV/ms) – This captures the rising phase of the action potential. Spikes must exceed this threshold to be considered an action potential.
Fall (mV/ms) – This captures the repolarizing phase of the action potential. This threshold criterion will only be applied if the rise threshold is passed within the period set by Width (ms).
Width (ms) – Period to search for a sample crossing the fall threshold after the rise threshold is crossed.
Min. distance between APs – The minimum distance in milliseconds between two action potentials. When two APs are closer than this distance, the smaller will be excluded.
These parameters can be adjusted through Options › Action Potential Counting Options.
Defaults for these detection parameters are saved separately from the defaults on the AP Counting analysis panel.

AP Counting Metrics
Mean ISI
The mean inter-spike interval (ISI) is calculated automatically. The ISI is calculated as the difference between the times of consecutive action potential peaks.
SFA (divisor method)
Spike frequency accommodation (SFA) refers to a reduction in firing rate during a prolonged current injection. It can be measured by dividing the first ISI of the spike train by its final ISI.
Local Variation
Introduced by Shinomoto et al. (2003), this measure quantifies variation between consecutive inter-spike intervals (see Appendix I).
First-spike latency
The first spike latency is defined as the time it takes for the first action potential to fire from the start of the current injection. If selected, users will be prompted to input the time (in seconds) that the current injection starts. First spike latency will be calculated for all analyzed records that contain action potentials.
Current injection, (Im)
Current injections are required for rheobase calculation and may also be useful for downstream input–output (I–O) analysis. Measuring or manually entering current injections is enabled by clicking the Im checkbox.
If the recording has a current trace as a secondary channel, check Im and select Bounds. The baseline region and steady-state region will appear and should be positioned before (baseline) and during (steady state) the current injections.
To create a current injection protocol if the recording does not have one, use Generate Stim. Protocol.
Alternatively, select User-input to enter the current steps manually. For each record, enter the baseline-subtracted current step. For example, if an injection goes from \(-50\) to \(-30\ \mathrm{pA}\), enter \(20\ \mathrm{pA}\). You must enter one step for every record.
Rheobase
Rheobase refers to the smallest current injection that elicits an action potential. Current injections (Im) are required to compute the rheobase.
The rheobase can be calculated as:
Record – \(I_\mathrm{m}\) injection for the record at which the first AP is detected (baseline subtracted).
Exact – \(I_\mathrm{m}\) at the exact time-point of the first detected AP peak (baseline subtracted).
For Record, when using Bounds, the current injection (\(\Delta I_\mathrm{m} = \text{steady state} - \text{baseline}\)) on the first record with a spike is used. When using User-input, the current step entered for that record is used.
For Exact, the \(I_\mathrm{m}\) at the first AP peak (minus baseline) is used (i.e. steady state and \(\Delta I_\mathrm{m}\) are ignored for Exact rheobase calculation). User-input is not supported for Exact rheobase calculation.
Manual spike selection and editing
Following AP Counting, detected events may be discarded or undetected events manually selected.
To select an AP, click the Manual Select button on the AP Counting panel. The cursor will change to a crosshair and clicking and dragging on the graph will draw a circle allowing selection of an AP peak. To allow maximum flexibility, these selections are not thresholded and the maximum \(V_\mathrm{m}\) in the selected region will be taken as the new spike peak.
To discard detected APs, click twice on the filled red circle at the peak of an AP. The first click will prime the AP for deletion (the peak circle will turn blue) and the second click will delete the event from analysis.
Manual editing of detected action potentials will update all existing results (e.g. rheobase, first-spike latency, mean inter-spike interval, spike-frequency accommodation).