FindPeaks

FindPeaks[data]

gives positions and values of the detected peaks in data.

FindPeaks[data,σ]

finds peaks that survive Gaussian blurring up to scale σ.

FindPeaks[data,σ,s]

finds peaks with minimum sharpness s.

FindPeaks[data,σ,s,t]

finds only peaks with values greater than t.

FindPeaks[data,σ,{s,σs},{t,σt}]

uses different scales for thresholding sharpness and value.

Details and Options

  • FindPeaks finds local maxima using the given constraints, returning the result as {{x1,f1},{x2,f2},}.
  • Input data can be of one of the following forms:
  • {y1,y2,}a list of values
    TimeSeries[]regularly sampled time series object
    EventSeries[]regularly sampled event series object
  • FindPeaks[data] automatically chooses constraints to return a set of peaks.
  • FindPeaks[data,0,0,-] returns all the peaks.
  • FindPeaks[data,σ,s,t] is equivalent to FindPeaks[data,σ,{s,σ},{t,0}].
  • The following options can be given:
  • InterpolationOrderAutomaticspline interpolation order of up to order 3
    Padding"Reversed"padding scheme to use

Examples

open allclose all

Basic Examples  (1)

Find position and height of dominant peaks in a list:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Visualize list and the detected peaks:

In[3]:=
Click for copyable input
Out[3]=

Scope  (12)

Options  (3)

Applications  (3)

See Also

PeakDetect  FindMaximum  FindArgMax  FindMinimum  MaxDetect  MaximalBy  EstimatedBackground  Fourier

Introduced in 2014
(10.0)