Peaks Detection

Peak detection

peak detection icon

Peak detection is a crucial preprocessing step in spectral analysis that aims to identify and locate the prominent peaks within a spectrum. These peaks often correspond to specific chemical or physical properties of the sample being analyzed, and their accurate identification is essential for various applications, such as quantitative analysis, compound identification, and spectral deconvolution. Peak detection can be performed either automatically using algorithms or manually through user interaction.

Auto Peak Detection

Auto peak detection is a method that automatically identifies and locates the peaks in a spectrum based on predefined criteria. This approach is particularly useful when dealing with large datasets or when manual peak picking is impractical or time-consuming.

Configurable Parameters:
  • Prominence (%): This parameter specifies the minimum prominence of a peak, which is the vertical distance between the peak and its lowest contour line. The prominence is expressed as a percentage of the signal's amplitude range. A higher prominence value will result in fewer peaks being detected, as only the most prominent peaks will satisfy the condition. A lower prominence value will allow for the detection of smaller peaks.
  • Height: This parameter specifies the minimum height required for a peak to be considered significant. Any peaks below this height threshold will be ignored.
  1. Let x=[x1,x2,,xn]x = [x_1, x_2, \ldots, x_n] be the input 1-D array of length nn.
  2. For each index ii in the range 1<i<n1 < i < n, check if xix_i is a local maximum by comparing it with its neighbors:

xixi1x_i \geq x_{i - 1} and xixi+1x_i \geq x_{i + 1}

  1. If this condition is satisfied, xix_i is considered a potential peak. For each potential peak xix_i, calculate its prominence pip_i, which is the vertical distance between xix_i and its lowest contour line. The lowest contour line is determined by extending horizontal lines to the left and right of xix_i until they intersect with lower peaks or the signal borders. Mathematically, if xlx_l and xrx_r are the intersection points to the left and right of xix_i, respectively, then:

pi=ximax(xl,xr)p_i = x_i - \max(x_l, x_r)

  1. The remaining peaks after applying the prominence and height filters are considered the detected peaks.

You have a spectrum representing the absorption of a sample at different wavelengths. You want to identify the prominent peaks in this spectrum, which may correspond to the presence of specific chemical compounds. By setting the prominence parameter to a higher value (e.g., 10%), you can ensure that only the most significant peaks are detected, ignoring smaller fluctuations or noise. Additionally, you can set a minimum height threshold to further filter out any peaks that are below a certain intensity level.

Manual Peak Picking

Manual peak picking is a method that allows the user to visually identify and select peaks of interest in a spectrum. This approach is particularly useful when the user already has prior knowledge about a subset of peaks and wants to examine their heights or compare them across different measurements.

The manual peak picking tool transforms the annotations made by the user over the spectrum into a set of points.

Imagine you are analyzing spectra of different chemical compound mixtures, and you are particularly interested in identifying the relative concentrations of a specific chemical bond. Based on prior knowledge or reference data, you know the peak location associated with this chemical bond. By employing manual peak picking, you can relatively quantify the presence of the bond across the different mixtures.