Relative Content

Tag Archive for pythonscipy

scipy’s find_peaks method produces inconsistent results

import numpy as np import math import matplotlib.pyplot as plt from scipy.io import wavfile from scipy.signal import resample from scipy.signal._peak_finding_utils import _local_maxima_1d def select_by_peak_distance(peaks, priority, distance): “”” Evaluate which peaks fulfill the distance condition. Parameters ———- peaks : ndarray Indices of peaks in `vector`. priority : ndarray An array matching `peaks` used to determine priority […]