STEP_fast_ahp_depth

biophysics_fitting.ephys.STEP_fast_ahp_depth(t, v, thresh=None, time_scale=5, start=1)

Computes the average depth of the fast afterhyperpolarization (fAHP) of a voltage trace for a step stimulus.

The fAHP is computed as the deepest point right after (i.e. within timescale) the spike.

Note

If two consecutive spikes are less than timescale apart, the fAHP is computed as simply minimum between the first spike and the next spike, and there is no difference between fast and slow AHP.

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.

time_scale : float, optional

Time scale in milliseconds. Defaults to 5.

start : int

Index of the first AP to be considered. Defaults to 1: Omit the first AP with index 0.

Returns:

Depth of the fAHP.

Return type:

float