依舊是官方文檔先行scipy.signal.find_peaks
由于需要監(jiān)測波形的峰值,因此找到該函數(shù) 該函數(shù)通過與周圍位置的比較找到峰值 輸入: x: 帶有峰值的信號序列 height: 低于指定height的信號都不考慮 threshold: 其與相鄰樣本的垂直距離 distance: 相鄰峰之間的最小水平距離, 先移除較小的峰,直到所有剩余峰的條件都滿足為止。 prominence: 個人理解是突起程度,詳見peak_prominences width: 波峰的寬度,詳見peak_widths plateau_size: 保證峰對應(yīng)的平頂數(shù)目大于給定值
輸出: peaks: x對應(yīng)的峰值的索引 properties: height--> ‘peak_heights’ threshold-->‘left_thresholds’, ‘right_thresholds’ prominence-->‘prominences’, ‘right_bases’, ‘left_bases’ width-->‘width_heights’, ‘left_ips’, ‘right_ips’ plateau_size-->‘plateau_sizes’, left_edges’, ‘right_edges’
對于噪聲情況較大的,應(yīng)采用smoothing 信號再取峰值或者使用小波變換find_peaks_cwt實現(xiàn)峰值查找
|