小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

scipy.signal.find_peaks

 LibraryPKU 2019-11-16
  • scipy.signal.find_peaks(x, height=None, threshold=None, distance=None, prominence=None, width=None, wlen=None, rel_height=0.5, plateau_size=None)[source]

  • Find peaks inside a signal based on peak properties.

    This function takes a one-dimensional array and finds all local maxima by simple comparison of neighbouring values. Optionally, a subset of these peaks can be selected by specifying conditions for a peak’s properties.

    • Parameters

      • xsequence

      • A signal with peaks.

      • heightnumber or ndarray or sequence, optional

      • Required height of peaks. Either a number, None, an array matchingx or a 2-element sequence of the former. The first element is always interpreted as the minimal and the second, if supplied, as the maximal required height.

      • thresholdnumber or ndarray or sequence, optional

      • Required threshold of peaks, the vertical distance to its neighbouring samples. Either a number, None, an array matching x or a 2-element sequence of the former. The first element is always interpreted as the minimal and the second, if supplied, as the maximal required threshold.

      • distancenumber, optional

      • Required minimal horizontal distance (>= 1) in samples between neighbouring peaks. Smaller peaks are removed first until the condition is fulfilled for all remaining peaks.

      • prominencenumber or ndarray or sequence, optional

      • Required prominence of peaks. Either a number, None, an array matching x or a 2-element sequence of the former. The first element is always interpreted as the minimal and the second, if supplied, as the maximal required prominence.

      • widthnumber or ndarray or sequence, optional

      • Required width of peaks in samples. Either a number, None, an array matching x or a 2-element sequence of the former. The first element is always interpreted as the minimal and the second, if supplied, as the maximal required width.

      • wlenint, optional

      • Used for calculation of the peaks prominences, thus it is only used if one of the arguments prominence or width is given. See argumentwlen in peak_prominences for a full description of its effects.

      • rel_heightfloat, optional

      • Used for calculation of the peaks width, thus it is only used if widthis given. See argument rel_height in peak_widths for a full description of its effects.

      • plateau_sizenumber or ndarray or sequence, optional

      • Required size of the flat top of peaks in samples. Either a number,None, an array matching x or a 2-element sequence of the former. The first element is always interpreted as the minimal and the second, if supplied as the maximal required plateau size.

        New in version 1.2.0.

      • Examples

      • To demonstrate this function’s usage we use a signal x supplied with SciPy (see scipy.misc.electrocardiogram). Let’s find all peaks (local maxima) in x whose amplitude lies above 0.

      • >>>

        >>> import matplotlib.pyplot as plt>>> from scipy.misc import electrocardiogram>>> from scipy.signal import find_peaks>>> x = electrocardiogram()[2000:4000]>>> peaks, _ = find_peaks(x, height=0)>>> plt.plot(x)>>> plt.plot(peaks, x[peaks], "x")>>> plt.plot(np.zeros_like(x), "--", color="gray")>>> plt.show()
      • ../_images/scipy-signal-find_peaks-1_00_00.png

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多