Finding Peaks

I'm in the process of writing some code to find peaks (beginning, maximum, and end) of very large datasets (each file is 50000 + rows) and there are 100s of files), so I need it to be fast.
I've looked at a couple of methods and was wondering what other peoples opinions are about accomplishing this task.
  1. Method 1:
  2. 1) Simply finding the max(signal) and x value of the max index of the baseline corrected signal.
  3. 2) find the first and last occurrence of a signal that is 3*sigma of the baseline.
-this method finds the peaks OK, but the peak extents are horrible since my data is quite noisy.
  1. Method 2:
  2. 1) find maximum similar to method 1, or use the minimum of the 2nd derivative to find the max signal
  3. 2) then use the 3rd derivative to find the peak extents
better, but more computationally intensive.
  1. Method 3
  2. 1) use built in functions of the Mass Spectrometry portion of the Bioinformatics toolbox:
  3. -msbackadj (to adjust for noisy background)
  4. -mspeaks (to find a list of peaks, fwhm, and extents)
  5. again, easier, but sometimes the extents are way off.
So I'm just curious about how other people have done this and see what people feel is the most robust method of finding peaks in some noisy signal.
Cheers!

Answers (3)

Sean de Wolski
Sean de Wolski on 19 Oct 2011

0 votes

I'll just put in my vote AGAINST taking the derivative of noisy data - especially three of 'em. Derivatives of noise amplify noise.
Wayne King
Wayne King on 19 Oct 2011

0 votes

I agree with Sean.
mspeaks implements some wavelet denoising, but perhaps you would be better to experiment with wden() first if you have the Wavelet Toolbox, there you have access to many more wavelets (so perhaps you can select a better option for your data then the one used in mspeaks).
Also, you have more options for adjusting the denoising. Perhaps, you can:
  1. Denoise the signal using wavelet denoising
  2. Apply findpeaks to the output of #1.
Image Analyst
Image Analyst on 19 Oct 2011

0 votes

Here's another one: http://billauer.co.il/peakdet.html or you can find some more in the File Exchange.

Products

Asked:

on 19 Oct 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!