Find Peaks
This example demonstrates how to find peaks in a noisy one-dimensional signal using the d3-peaks library. The signal is rendered as a black line, and detected peaks are highlighted with crimson circles and connected by a cardinal-interpolated path. The code applies the findPeaks API with a Ricker wavelet kernel, configured widths, and signal-to-noise ratio thresholds to identify both positive and inverted peaks. It also shades areas around each detected peak using d3.svg.area, with axes drawn via d3.svg.axis.
AI-generated descriptionThis example illustrates how to use the findPeaks API. You can download the library from https://github.com/efekarakus/d3-peaks.
The algorithm is based on "Improved peak detection in mass spectrum by incorporating continuous wavelet transform-based pattern matching" by Pan Du, Warren A. Kibbe and Simon M. Lin. The paper can be found here.
forked from <a href='http://bl.ocks.org/efekarakus/'>efekarakus</a>'s block: <a href='http://bl.ocks.org/efekarakus/cc7303456841523f37dd'>Find Peaks</a>