biophysics_fittingephysSTEP_time_to_first_spike

STEP_time_to_first_spike

biophysics_fitting.ephys.STEP_time_to_first_spike(t, v, stim_onset, thresh=None)

Computes the time to first spike (TTFS) of a voltage trace for a step stimulus.

Note

The time to a spike is taken to be the time until the peak of the spike, not e.g. the peak of the second derivative.

Parameters:
  • t (numpy.ndarray) – Array of time values.

  • v (numpy.ndarray) – Array of voltage values.

  • thresh (float, optional) – Voltage threshold for spike detection. Defaults to None.

Returns:

Time to first spike.

Return type:

float