Skip to main content

findpeaks

Python Pypi Docs LOC Downloads Downloads License Forks Issues Project Status DOI Colab Medium Donate

findpeaks is a comprehensive Python library for robust detection and analysis of peaks and valleys in both 1D vectors and 2D arrays (images). The library provides multiple detection algorithms including topology-based persistent homology (most robust), mask-based local maximum filtering, and traditional peakdetect approaches. It can be used for time series analysis, signal processing, image analysis, and spatial data. ⭐️Star it if you like it⭐️

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


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

Contributors

Special thanks to the contributors!

Maintainer

  • Erdogan Taskesen, github: erdogant
  • Contributions are welcome.
  • Yes! This library is entirely free but it runs on coffee! :) Feel free to support with a Coffee.

Buy me a coffee

Release files for findpeaks 2.7.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for findpeaks 2.7.5
File Size Uploaded
findpeaks-2.7.5.tar.gz 65.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for findpeaks 2.7.5
File Interpreter ABI Platform
findpeaks-2.7.5-py3-none-any.whl Python 3 none any Details

Total release size: 140.7 kB

Release files / findpeaks-2.7.5.tar.gz

Download URL findpeaks-2.7.5.tar.gz
Size 65.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a84f2badc9cb8bde444e0348e24834ff0522a152db35ee3b86ba561417641c91
BLAKE2b-256 checksum
How to use checksums
a9a3c137c2ecd08b8c7909e71fa52ea3514af0b72201ae7fcc20e4d00ffe5219
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / findpeaks-2.7.5-py3-none-any.whl

Download URL findpeaks-2.7.5-py3-none-any.whl
Size 75.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b88cc187883bf91c88223e9f2c5e2b851f2d71b38d088101daf7d9af3c6a678c
BLAKE2b-256 checksum
How to use checksums
78d2217bbf72279c954f4859c8e2e6978edbfcc7173b01c2fd4c614996c606fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

2.7.5 This release

2 release files

2.7.4

2 release files

2.7.3

2 release files

2.7.2

2 release files

2.7.1

2 release files

2.7.0

2 release files

2.6.6

2 release files

2.6.5

2 release files

2.6.4

2 release files

2.6.3

2 release files

2.6.2

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.5

2 release files

2.5.4

2 release files

2.5.3

2 release files

2.5.2

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.7

2 release files

2.4.6

2 release files

2.4.5

2 release files

2.4.4

2 release files

2.4.3

2 release files

2.4.2

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.4

2 release files

2.3.3

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.7

2 release files

2.1.6

2 release files

2.1.5

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page