single_cell_parseranalyzemembrane_potential_analysissimple_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 determining threshold crossing 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 absolute threshold. - slope: Checks if \(dV/dt\) is larger than a threshold.

Returns:

List of spike times.

Return type:

list