Skip to content

Commit 5f86fa0

Browse files
committed
update readme file
1 parent 24cbfad commit 5f86fa0

1 file changed

Lines changed: 83 additions & 43 deletions

File tree

README.md

Lines changed: 83 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,43 +14,98 @@
1414
[![Colab](https://colab.research.google.com/assets/colab-badge.svg?logo=github%20sponsors)](https://erdogant.github.io/findpeaks/pages/html/Documentation.html#colab-notebook)
1515
[![Medium](https://img.shields.io/badge/Medium-Blog-green)](https://erdogant.github.io/findpeaks/pages/html/Documentation.html#medium-blog)
1616
[![Donate](https://img.shields.io/badge/Support%20this%20project-grey.svg?logo=github%20sponsors)](https://erdogant.github.io/findpeaks/pages/html/Documentation.html#)
17-
<!---[![BuyMeCoffee](https://img.shields.io/badge/buymea-coffee-yellow.svg)](https://www.buymeacoffee.com/erdogant)-->
18-
<!---[![Coffee](https://img.shields.io/badge/coffee-black-grey.svg)](https://erdogant.github.io/donate/?currency=USD&amount=5)-->
1917

18+
<div>
19+
<a href="https://erdogant.github.io/findpeaks/"><img src="https://github.com/erdogant/findpeaks/blob/master/docs/figs/logo.png" width="350" align="left" /></a>
20+
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>
2022

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+
---
2224

25+
### Key Features
2326

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. |
2735

28-
#### Install findpeaks from PyPI
36+
---
2937

38+
### Resources and Links
39+
- **Example Notebooks:** [Examples](https://erdogant.github.io/findpeaks/pages/html/Examples.html)
40+
- **Blog Posts:** [Medium](https://erdogant.medium.com)
41+
- **Documentation:** [Website](https://erdogant.github.io/findpeaks)
42+
- **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.
55+
56+
---
57+
58+
### Installation
59+
60+
##### Install findpeaks from PyPI
3061
```bash
3162
pip install findpeaks
3263
```
3364

34-
#### Import findpeaks package
65+
##### Install from Github source
66+
```bash
67+
pip install git+https://github.com/erdogant/findpeaks
68+
```
3569

70+
##### Import Library
3671
```python
72+
import findpeaks
73+
print(findpeaks.__version__)
74+
75+
# Import library
3776
from findpeaks import findpeaks
3877
```
39-
#
4078

41-
### [Blog findpeaks](https://towardsdatascience.com/a-step-by-step-guide-to-accurately-detect-peaks-and-valleys-9abc49a2eac3)
42-
#
79+
---
80+
81+
### Quick Start
4382

44-
### [Documentation pages](https://erdogant.github.io/findpeaks/)
83+
```python
84+
# Import library
85+
from findpeaks import findpeaks
4586

46-
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')
4789

90+
# Example data
91+
X = fp.import_example('1dpeaks')
4892

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+
---
50104

51105
### Examples
52106

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)
54109

55110
<p align="left">
56111
<a href="https://erdogant.github.io/findpeaks/pages/html/Examples.html#find-peaks-in-low-sampled-dataset">
@@ -59,10 +114,7 @@ On the [documentation pages](https://erdogant.github.io/findpeaks/) you can find
59114
</a>
60115
</p>
61116

62-
63-
#
64-
65-
* [Example: Comparison peak detection methods](https://erdogant.github.io/findpeaks/pages/html/Examples.html#comparison-methods-1)
117+
* [Comparison of peak detection methods](https://erdogant.github.io/findpeaks/pages/html/Examples.html#comparison-methods-1)
66118

67119
<p align="left">
68120
<a href="https://erdogant.github.io/findpeaks/pages/html/Examples.html#comparison-methods-1">
@@ -71,9 +123,7 @@ On the [documentation pages](https://erdogant.github.io/findpeaks/) you can find
71123
</a>
72124
</p>
73125

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)
77127

78128
<p align="left">
79129
<a href="https://erdogant.github.io/findpeaks/pages/html/Examples.html#find-peaks-in-high-sampled-dataset">
@@ -87,9 +137,8 @@ On the [documentation pages](https://erdogant.github.io/findpeaks/) you can find
87137
</a>
88138
</p>
89139

90-
#
91-
92-
* [Example: Find peaks in an image (2D-array)](https://erdogant.github.io/findpeaks/pages/html/Examples.html#d-array-image)
140+
#### 2D Image Analysis
141+
* [Find peaks in an image (2D-array)](https://erdogant.github.io/findpeaks/pages/html/Examples.html#d-array-image)
93142

94143
<p align="left">
95144
<a href="https://erdogant.github.io/findpeaks/pages/html/Examples.html#d-array-image">
@@ -98,7 +147,7 @@ On the [documentation pages](https://erdogant.github.io/findpeaks/) you can find
98147
</a>
99148
</p>
100149

101-
* [Example: Conversion from 2d to 3d mesh plot)](https://erdogant.github.io/findpeaks/pages/html/Plots.html#d-mesh)
150+
* [3D mesh visualization](https://erdogant.github.io/findpeaks/pages/html/Plots.html#d-mesh)
102151

103152
<p align="left">
104153
<a href="https://erdogant.github.io/findpeaks/pages/html/Plots.html#d-mesh">
@@ -107,29 +156,25 @@ On the [documentation pages](https://erdogant.github.io/findpeaks/) you can find
107156
</a>
108157
</p>
109158

110-
111-
#
112-
113-
* [Example: Find peaks and valleys in stockmarkets (Bitcoin)](https://erdogant.github.io/findpeaks/pages/html/Use-cases.html#bitcoin)
114-
* [Example: Find peaks and valleys in stockmarkets (Facebook)](https://erdogant.github.io/findpeaks/pages/html/Use-cases.html#facebook-stocks)
159+
#### Financial Time Series
160+
* [Bitcoin price analysis](https://erdogant.github.io/findpeaks/pages/html/Use-cases.html#bitcoin)
161+
* [Facebook stock analysis](https://erdogant.github.io/findpeaks/pages/html/Use-cases.html#facebook-stocks)
115162

116163
<p align="left">
117164
<a href="https://erdogant.github.io/findpeaks/pages/html/Use-cases.html#facebook-stocks">
118165
<img src="https://github.com/erdogant/findpeaks/blob/master/docs/figs/fig_facebook_minperc5.png" width="600" />
119166
</a>
120167
</p>
121168

122-
#
123-
124-
* [Example: Find peaks in SAR/SONAR images)](https://erdogant.github.io/findpeaks/pages/html/Use-cases.html#sonar)
169+
#### SAR/SONAR Image Processing
170+
* [Peak detection in SAR/SONAR images](https://erdogant.github.io/findpeaks/pages/html/Use-cases.html#sonar)
125171

126172
<p align="left">
127173
<a href="https://erdogant.github.io/findpeaks/pages/html/Use-cases.html#sonar">
128174
<img src="https://github.com/erdogant/findpeaks/blob/master/docs/figs/sonar_plot.png" width="600" />
129175
</a>
130176
</p>
131177

132-
133178
<p align="left">
134179
<a href="https://erdogant.github.io/findpeaks/pages/html/Use-cases.html#sonar">
135180
<img src="https://github.com/erdogant/findpeaks/blob/master/docs/figs/sonar_mesh1.png" width="300" />
@@ -144,27 +189,22 @@ On the [documentation pages](https://erdogant.github.io/findpeaks/) you can find
144189
</a>
145190
</p>
146191

147-
148-
#
149-
150-
* [Example: Denoising images using Lee, Kuan, Fastnl, Bilateral, Frost, Mean, median)](https://erdogant.github.io/findpeaks/pages/html/Denoise.html#)
192+
#### Image Denoising
193+
* [Denoising with Lee, Kuan, Fastnl, Bilateral, Frost, Mean, Median filters](https://erdogant.github.io/findpeaks/pages/html/Denoise.html#)
151194

152195
<p align="left">
153196
<a href="https://erdogant.github.io/findpeaks/pages/html/Denoise.html#">
154197
<img src="https://github.com/erdogant/findpeaks/blob/master/docs/figs/noise_distr_examples.png" width="600" />
155198
</a>
156199
</p>
157200

158-
159-
<hr>
160-
201+
<hr>
161202

162203
### References
163204
* https://github.com/erdogant/findpeaks
164205
* https://github.com/Anaxilaus/peakdetect
165206
* https://www.sthu.org/blog/13-perstopology-peakdetection/index.html
166207

167-
168208
### Contributors
169209
Special thanks to the contributors!
170210

0 commit comments

Comments
 (0)