How can I identify peaks in spectra?

  • Thread starter Thread starter khdani
  • Start date Start date
  • Tags Tags
    Spectra
Click For Summary

Discussion Overview

The discussion revolves around identifying peaks in spectral data, exploring various algorithms and methods for peak detection. Participants share their experiences with different approaches and the challenges they face in achieving accurate results.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested

Main Points Raised

  • One participant suggests a basic algorithm that identifies peaks by comparing adjacent data points, but notes that this may lead to false positives due to random fluctuations.
  • Another participant expresses skepticism about the effectiveness of the simple algorithm and mentions attempts with more complex methods involving slope analysis, which did not yield successful results.
  • A later reply questions what constitutes "correct results" in the context of peak identification, indicating a need for clarity on desired outcomes.
  • Further suggestions include using thresholding algorithms, low-pass filters for noise reduction, and creating comb filters based on known peak locations, while emphasizing the importance of knowing the expected peak characteristics.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best method for peak identification, with multiple competing views and approaches discussed throughout the thread.

Contextual Notes

Limitations include the potential for false positives in peak detection, the need for clarity on what constitutes a peak, and the dependence on prior knowledge of peak locations and characteristics.

khdani
Messages
53
Reaction score
0
hello,
i've Spectra(set of data points) and i need to identify the peaks of the spectra.
are there any algorithms for that ?
 
Technology news on Phys.org
Sure, just go through your array collecting points where a[i-1] < a > a[i+1]. Of course, that might give you "peaks" that are just random fluctuations in your data. You could try to prevent that by replacing each a with a weighted average of nearby elements beforehand, smoothing the function.
 
it's a very simple algorithm which will give incorrect results...
i've tried more complex algorithms, like looking for slopes from left sides of peak and right sides,
but with no success...
 
Well, what are the "correct results" you're looking for?

- Warren
 
That's true; now you just need to determine the location of the relevant peaks (whether it be the spectral width of the peak, or using a simple thresholding algorithm--if it's above value X then it's a peak--or running the data through a low-pass filter to smooth out the noise prior to finding the peaks).

Or, if you know a priori where the peaks ought to be, you can use these peak locations to create an appropriate comb filter which filters out only the values at those wavelengths (and of a certain spectral width, once again). But again, you'd need to know exactly what you're looking for, and either compensate for spectral shifting or make the comb sufficiently wide that you don't end up cutting off the peak.
 
Last edited:

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
8
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
456
  • · Replies 29 ·
Replies
29
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K