Locates peaks and/or troughs in a column of data by using SG-differentiation.

  • ycol (index) – the column name or index of the data in which to search for peaks

  • width (int or float) – the expected minium halalf-width of a peak in terms of the number of data points (int) or distance in x (float). This is used in the differnetiation code to find local maxima. Bigger equals less sensitive to experimental noise, smaller means better eable to see sharp peaks

  • poly (int) – the order of polynomial to use when differentiating the data to locate a peak. Must >=2, higher numbers will find sharper peaks more accurately but at the risk of finding more false positives.

Keyword Arguments
  • significance (float) – used to decide whether a local maxmima is a significant peak. Essentially just the curvature of the data. Bigger means less sensistive, smaller means more likely to detect noise. Default is the maximum curvature/(2*width)

  • xcol (index or None) – name or index of data column that p[rovides the x-coordinate (default None)

  • peaks (bool) – select whether to measure peaks in data (default True)

  • troughs (bool) – select whether to measure troughs in data (default False)

  • sort (bool) – Sor the results by significance of peak

  • modify (book) – If true, then the returned object is a copy of self with only the peaks/troughs left in the data.

  • full_data (bool) – If True (default) then all columns of the data at which peaks in the ycol column are found. modify true implies full_data is also true. If full_data is False, then only the x-column values of the peaks are returned.


(various) – If modify is true, then returns a the AnalysisMixin with the data set to just the peaks/troughs. If modify is false (default), then the return value depends on ycol and xcol. If ycol is not None and xcol is None, then returns conplete rows of data corresponding to the found peaks/troughs. If xcol is not None, or ycol is None and xcol is None, then returns a 1D array of the x positions of the peaks/troughs.

See also

User guide section Peak Finding