single_cell_parser ❭ analyze ❭ membrane_potential_analysis ❭ simple_spike_detection
simple_spike_detection¶
- single_cell_parser.analyze.membrane_potential_analysis.simple_spike_detection(t, v, tBegin=None, tEnd=None, threshold=0.0, mode='regular')¶
Detect spike times in a voltage trace.
Simple spike detection method. Identifies spike times within optional window
[tBegin, tEnd]by determiningthresholdcrossing times from below.- Parameters:¶
t (array) – Time vector
v (array) – Membrane potential vector.
tBegin (float, optional) – Start time of the detection window. Default is
None(begin of voltage trace).tEnd (float, optional) – End time of the detection window. Default is
None(end of voltage trace).threshold (float, optional) – Threshold for spike detection (mV). Default is \(0.0 mV\).
mode (str, optional) – Mode for spike detection. Default is
regular. -regular: Checks if the membrane potential crosses an absolutethreshold. -slope: Checks if \(dV/dt\) is larger than athreshold.
- Returns:¶
List of spike times.
- Return type:¶
list