raman.find_peaks

raman.find_peaks(y, wnd=9, ath=0.01, sth=1.0, bl=-1, useMMBL=True, show=False, sorted=False)

Automated peak finding algorithm based on zero crossings of smoothed derivative as well as on slope and amplitude thresholds.

Changed in version 01-04-2016: Added more control possibilities over the type of baseline removal. Supports now baseline_correction and FT_baseline_correction, optionally followed by a moving-median filter step.

Parameters:
  • y (array) – Spectrum.
  • wnd (int) – Smoothing window size. Has to be an odd integer (default = 9).
  • ath (float) – Amplitude threshold in units of maximum amplitude (default = 0.01).
  • sth (float) – Slope threshold in units of estimated noise standard deviation (default = 1.0).
  • bl (in) –

    Control baseline removal.

    • If bl > 0: Initial window size divisor for automated baseline removal.
    • If bl == None: No baseline removal is performed.
    • If bl == -1: Perform automated Fourier transform baseline removal (default).
  • useMMBL (bool) – If True, use a moving-median baseline correction following the initial baseline removal (default).
  • show (bool) – If True, make a plot showing the extracted peak positions in the spectrum.
  • sorted (bool) – If True, return sorted by amplitude (highest first). If False, returns sorted by frequency.
Returns:

A list of peak position INDICES, not wavenumbers.