Code Monkey home page Code Monkey logo

peakdetect's Introduction

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:

$ pip install peakdetect

Clone repository:

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

Requirements: numpy and scipy. Setup installs requirements itself.

Usage

Example usage:

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

Documentation on peakdetect function, keyword arguments:

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

peakdetect's People

Contributors

avhn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.