max_spike_position

nrv.ui.max_spike_position(blocked_spike_positionlist, position_max, spike_begin='down')[source]

Extend a blocked-spike position index to the corresponding local extremum.

Parameters:
  • blocked_spike_positionlist (list[float] | np.ndarray) – Ordered list of blocked-spike positions.

  • position_max (int) – Initial index of the spike position under inspection.

  • spike_begin (str, optional) – Direction used to follow the spike front, either "down" or the opposite direction.

Returns:

Index of the detected local extremum in blocked_spike_positionlist.

Return type:

int