Crates.io | peak_finder |
lib.rs | peak_finder |
version | 1.0.1 |
source | src |
created_at | 2021-10-07 18:30:35.437536 |
updated_at | 2022-05-26 18:24:29.943802 |
description | An algorithm for identifying peaks from line data, such as from accelerometer or spectral data. |
homepage | |
repository | https://github.com/msimms/PeakFinder/ |
max_upload_size | |
id | 461903 |
size | 11,449 |
A library for identifying peaks in line data with implementations in multiple languages. The line data could be from accelerometer data, spectral data, stock price history, almost anything.
Here's a graphical example of how this works, indentifying the peaks and troughs in the given line data. The blue line is the original data and the green line shows the peaks identified by the algorithm:
The library is designed to be small and easy to use, with little or no dependencies (the python implementation requires numpy). It currently has interfaces for finding peaks where the maximum value exceeds a specified threshold as well as peaks above a given statistical limit. Additional algorithms may be added in the future.
Copy the files Peaks.cpp
and Peaks.h
into your project. Look at main.cpp
for an example of how to use the peak finding class.
GraphPeakList Peaks::findPeaksOverThreshold();
GraphPeakList Peaks::findPeaksOverStd();
Copy the file Peaks.jl
into your project. Look at PeakFinder.jl
for an example of how to use the peak finding class.
find_peaks_over_threshold(data::Array{GraphPoint}, threshold)
find_peaks_over_stddev(data::Array{GraphPoint}, sigmas)
Copy the file peaks.py
into your project, though I will eventually create a pip
installable package for it. Read peakfinder.py
to see example usage.
find_peaks_in_numeric_array_over_threshold(data, threshold)
find_peaks_in_numeric_array_over_stddev(data, sigmas)
Install the cargo package peak_finder
. If you really don't want the package dependency, you could just copy the file peaks.rs
into your project. Look at lib.rs
for example usage. The available functions are:
find_peaks_in_numeric_array_over_threshold(data, threshold)
find_peaks_in_numeric_array_over_stddev(data, sigmas)
v.1.0.0 - Initial release.
This library is released under the MIT license, see LICENSE for details.