Gist 9fc112cb6c66d8ea755a
✓ Published0🌍 Public
Aahmohamed
Last edited Mar 1, 2012
Created on Apr 3, 2015
This example demonstrates peak detection on a synthetic signal composed of multiple sine waves with added Gaussian noise, plotting the original waveform and identifying local maxima and minima. The code generates the test data using NumPy’s `linspace` and `random.randn`, then applies a custom `peakdetect` function adapted from a MATLAB script. It also includes a parabola-fitting routine via `scipy.optimize.curve_fit` to refine peak positions and amplitudes, and visualizes results with `pylab`. The plot shows both the raw noisy signal and the detected peaks over the x-axis range.
AI-generated description