peak_detection module

tihi.tihi_utils.peak_detection.find_peaks(class_interpolate, window_size=10, threshold=0.01, min_amp=0.0)

Find peaks in the interpolated signal based on the second derivative.

Parameters:
  • class_interpolate (Interpolate) – Instance of Interpolate containing interpolated data.

  • window_size (int, optional) – Size of the window for peak detection. Defaults to 10.

  • threshold (float, optional) – Threshold for peak detection. Defaults to 0.01.

  • min_amp (float, optional) – Minimum amplitude of peaks. Defaults to 0.0.

Returns:

List of indices where peaks are detected.

Return type:

peaks (list)

tihi.tihi_utils.peak_detection.second_derivative(class_interpolate)

Compute the second derivative of the interpolated signal.

Parameters:

class_interpolate (Interpolate) – Instance of Interpolate containing interpolated data.

Returns:

Array of second derivative values.

Return type:

second_deriv (np.array)