findpeaks is for the detection of peaks and valleys in a 1D vector and 2D array (image).
Project description
findpeaks
Key Features
| Feature | Description | Medium | Gumroad & Podcast |
|---|---|---|---|
| Topology Detection | Mathematically grounded peak detection using persistent homology. | - | - |
| Peakdetect Method | Peak detection algorithm for noisy signals. | link | link |
| Mask Detection | Local maximum filtering for 2D image analysis. | - | - |
| Caerus Method | Specialized algorithm for financial time series analysis. | - | - |
| Preprocessing | Denoising, scaling, interpolation, and image preprocessing. | - | - |
| Visualization | Rich plotting capabilities including persistence diagrams and 3D mesh plots. | - | - |
Resources and Links
- Example Notebooks: Examples
- Blog Posts: Medium
- Documentation: Website
- Bug Reports and Feature Requests: GitHub Issues
Background
-
Topology Method: The most robust detection method based on persistent homology from topological data analysis. It quantifies peak significance through persistence scores and provides mathematically stable results even in noisy data.
-
Peakdetect Method: Traditional algorithm that excels at finding local maxima and minima in noisy signals without requiring extensive preprocessing. Uses a lookahead approach to distinguish between true peaks and noise-induced fluctuations.
-
Mask Method: Local maximum filtering approach specifically designed for 2D data (images). Employs 8-connected neighborhood analysis and background removal for spatial peak detection.
-
Preprocessing Pipeline: Comprehensive preprocessing capabilities including interpolation, denoising (Lee, Frost, Kuan filters), scaling, and image resizing to improve detection accuracy.
Installation
Install findpeaks from PyPI
pip install findpeaks
Install from Github source
pip install git+https://github.com/erdogant/findpeaks
Import Library
import findpeaks
print(findpeaks.__version__)
# Import library
from findpeaks import findpeaks
Quick Start
# Import library
from findpeaks import findpeaks
# Initialize with topology method (most robust)
fp = findpeaks(method='topology')
# Example data
X = fp.import_example('1dpeaks')
# Peak detection
results = fp.fit(X)
# Plot results
fp.plot()
# Plot persistence diagram
fp.plot_persistence()
Examples
1D Signal Analysis
2D Image Analysis
Financial Time Series
SAR/SONAR Image Processing
Image Denoising
References
- https://github.com/erdogant/findpeaks
- https://github.com/Anaxilaus/peakdetect
- https://www.sthu.org/blog/13-perstopology-peakdetection/index.html
Contributors
Special thanks to the contributors!
Maintainer
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file findpeaks-2.7.5.tar.gz.
File metadata
- Download URL: findpeaks-2.7.5.tar.gz
- Upload date:
- Size: 65.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a84f2badc9cb8bde444e0348e24834ff0522a152db35ee3b86ba561417641c91
|
|
| MD5 |
c20d6801bfd32709dd558870f0b6b086
|
|
| BLAKE2b-256 |
a9a3c137c2ecd08b8c7909e71fa52ea3514af0b72201ae7fcc20e4d00ffe5219
|
File details
Details for the file findpeaks-2.7.5-py3-none-any.whl.
File metadata
- Download URL: findpeaks-2.7.5-py3-none-any.whl
- Upload date:
- Size: 75.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b88cc187883bf91c88223e9f2c5e2b851f2d71b38d088101daf7d9af3c6a678c
|
|
| MD5 |
183aa19410fa390c6e149e4ddb0eefd3
|
|
| BLAKE2b-256 |
78d2217bbf72279c954f4859c8e2e6978edbfcc7173b01c2fd4c614996c606fa
|