dynsight.utilities.find_extrema_points¶
- dynsight.utilities.find_extrema_points(x_axis, y_axis, extrema_type, prominence)[source]¶
Find the extrema points of a mathematical function (minima or maxima).
- Parameters:
x_axis (ndarray[Any, dtype[float64]]) – The x values of the function.
y_axis (ndarray[Any, dtype[float64]]) – The y values of the function.
extrema_type (Literal['min', 'max']) – The type of extrema to find, which can be “min” for minima or “max” for maxima.
prominence (float) – The required prominence of peaks. Higher values will provide only well-defined and sharp peaks, excluding softer ones.
- Returns:
A NumPy array with dimensions (n_peaks, 2), containing the x and y coordinates for each peak.
- Return type:
ndarray[Any, dtype[float64]]