项目作者: anaxilaus

项目描述 :
Simple peak detection
高级语言: Python
项目地址: git://github.com/anaxilaus/peakdetect.git
创建时间: 2019-07-29T18:20:53Z
项目社区:https://github.com/anaxilaus/peakdetect

开源协议:

下载


Peakdetect

PyPI
Build
Python Version

Simple peak detection library for Python based on Billauer’s work and this gist. If you can improve this project, feel free to contribute.

Installation

Pip:

  1. $ pip install peakdetect

Clone repository:

  1. $ git clone https://github.com/avhn/peakdetect
  2. $ python peakdetect/setup.py install

Requirements: numpy and scipy. Setup installs requirements itself.

Usage

Example usage:

  1. >>> import peakdetect
  2. >>> peaks = peakdetect.peakdetect(y_axis, x_axis, lookahead, delta)

Documentation on peakdetect function, keyword arguments:

  1. y_axis -- A list containing the signal over which to find peaks
  2. x_axis -- A x-axis whose values correspond to the y_axis list and is used
  3. in the return to specify the position of the peaks. If omitted an
  4. index of the y_axis is used.
  5. (default: None)
  6. lookahead -- distance to look ahead from a peak candidate to determine if
  7. it is the actual peak
  8. (default: 200)
  9. '(samples / period) / f' where '4 >= f >= 1.25' might be a good value
  10. delta -- this specifies a minimum difference between a peak and
  11. the following points, before a peak may be considered a peak. Useful
  12. to hinder the function from picking up false peaks towards to end of
  13. the signal. To work well delta should be set to delta >= RMSnoise * 5.
  14. (default: 0)
  15. When omitted delta function causes a 20% decrease in speed.
  16. When used Correctly it can double the speed of the function