You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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⭐️
21
+
</div>
20
22
21
-
The library ``findpeaks`` aims to detect peaks in a 1-dimensional vector and 2-dimensional arrays (images) without making any assumption on the peak shape or baseline noise. To make sure that peaks can be detected across global and local heights, and in noisy data, multiple pre-processing and denoising methods are implemented.
23
+
---
22
24
25
+
### Key Features
23
26
24
-
#
25
-
**⭐️ Star this repo if you like it ⭐️**
26
-
#
27
+
| Feature | Description |
28
+
|--------|-------------|
29
+
|[**Topology Detection**](https://erdogant.github.io/findpeaks/pages/html/Topology.html)| Mathematically grounded peak detection using persistent homology. |
30
+
|[**Peakdetect Method**](https://erdogant.github.io/findpeaks/pages/html/Peakdetect.html)| Traditional peak detection algorithm for noisy signals. |
31
+
|[**Mask Detection**](https://erdogant.github.io/findpeaks/pages/html/Mask.html)| Local maximum filtering for 2D image analysis. |
32
+
|[**Caerus Method**](https://erdogant.github.io/findpeaks/pages/html/Caerus.html)| Specialized algorithm for financial time series analysis. |
33
+
|[**Preprocessing**](https://erdogant.github.io/findpeaks/pages/html/Pre-processing.html)| Denoising, scaling, interpolation, and image preprocessing. |
34
+
|[**Visualization**](https://erdogant.github.io/findpeaks/pages/html/Plots.html)| Rich plotting capabilities including persistence diagrams and 3D mesh plots. |
-**Bug Reports and Feature Requests:**[GitHub Issues](https://github.com/erdogant/findpeaks/issues)
43
+
44
+
---
45
+
46
+
### Background
47
+
48
+
***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.
49
+
50
+
***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.
51
+
52
+
***Mask Method**: Local maximum filtering approach specifically designed for 2D data (images). Employs 8-connected neighborhood analysis and background removal for spatial peak detection.
53
+
54
+
***Preprocessing Pipeline**: Comprehensive preprocessing capabilities including interpolation, denoising (Lee, Frost, Kuan filters), scaling, and image resizing to improve detection accuracy.
On the [documentation pages](https://erdogant.github.io/findpeaks/) you can find detailed information about the working of the ``findpeaks`` with many examples.
87
+
# Initialize with topology method (most robust)
88
+
fp = findpeaks(method='topology')
47
89
90
+
# Example data
91
+
X = fp.import_example('1dpeaks')
48
92
49
-
#
93
+
# Peak detection
94
+
results = fp.fit(X)
95
+
96
+
# Plot results
97
+
fp.plot()
98
+
99
+
# Plot persistence diagram
100
+
fp.plot_persistence()
101
+
```
102
+
103
+
---
50
104
51
105
### Examples
52
106
53
-
*[Example: Find peaks in 1D-vector with low number of samples](https://erdogant.github.io/findpeaks/pages/html/Examples.html#find-peaks-in-low-sampled-dataset)
107
+
#### 1D Signal Analysis
108
+
*[Find peaks in low sampled dataset](https://erdogant.github.io/findpeaks/pages/html/Examples.html#find-peaks-in-low-sampled-dataset)
@@ -71,9 +123,7 @@ On the [documentation pages](https://erdogant.github.io/findpeaks/) you can find
71
123
</a>
72
124
</p>
73
125
74
-
#
75
-
76
-
*[Example: Find peaks in 1D-vector with high number of samples](https://erdogant.github.io/findpeaks/pages/html/Examples.html#find-peaks-in-high-sampled-dataset)
126
+
*[Find peaks in high sampled dataset](https://erdogant.github.io/findpeaks/pages/html/Examples.html#find-peaks-in-high-sampled-dataset)
0 commit comments