4.69231

4.7 | 13 ratings Rate this file 190 downloads (last 30 days) File Size: 27.73 KB File ID: #11755

Peak finding and measurement (version 2)

by Tom O'Haver

 

20 Jul 2006 (Updated 03 Sep 2009)

Code covered by the BSD License  

Function to locate and measure the positive peaks in noisy data sets.

Download Now | Watch this File

File Information
Description

A fast customizable function for locating and measuring the peaks in noisy time-series signals. Adjustable parameters allow discrimination of "real" signal peaks from noise and background. Determines the position, height, and width of each peak by least-squares curve-fitting. It can find and measure 1000 peaks in a 1,000,000 point signal in 8 seconds. Includes two interactive versions, one with mouse-controlled sliders and one with keyboard control, for adjusting the peak finding criteria in real-time. Self-contained demos show how it works. See http://www.wam.umd.edu/~toh/spectrum/PeakFindingandMeasurement.htm for details.

Acknowledgements
This submission has inspired the following:
iPeak: Interactive Peak Detector (Version 1.1)
MATLAB release MATLAB 6.5 (R13)
Zip File Content  
Other Files
InteractivePeakfinder2/AmpTSlider.m,
InteractivePeakfinder2/BGSlider.m,
InteractivePeakfinder2/condense.m,
InteractivePeakfinder2/DemoFindPeak.m,
InteractivePeakfinder2/DemoFindPeakSliders.m,
InteractivePeakfinder2/DemoFindPeakSliders2.m,
InteractivePeakfinder2/DemoFindPeakSlidersG.m,
InteractivePeakfinder2/deriv.m,
InteractivePeakfinder2/fastsmooth.m,
InteractivePeakfinder2/findpeaks.m,
InteractivePeakfinder2/FindPeakSliders.m,
InteractivePeakfinder2/FindPeakSlidersG.m,
InteractivePeakfinder2/findpeakslidersRedraw.m,
InteractivePeakfinder2/FitSlider.m,
InteractivePeakfinder2/gaussian.m,
InteractivePeakfinder2/lorentzian.m,
InteractivePeakfinder2/Peakfinder info.txt,
InteractivePeakfinder2/PeakSlider.m,
InteractivePeakfinder2/RedrawPeak.m,
InteractivePeakfinder2/rtslid.m,
InteractivePeakfinder2/secderiv.m,
InteractivePeakfinder2/SlopeTSlider.m,
InteractivePeakfinder2/SmoothSlider.m,
InteractivePeakfinder2/TestPeakfind.m,
InteractivePeakfinder2/Thumbs.db,
InteractivePeakfinder2/val2ind.m,
license.txt
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (20)
20 Aug 2006 Frank Anold

It is pretty good and easy to use. Yet some commercial software,such as origin, can do faster.

24 Aug 2006 Tom O'Haver

Version 1.2, dated August 24, 2006, is even faster than the previous version It can find and measure 1000 peaks in a 1,000,000 point signal in 13 seconds.

15 Sep 2006 K. Tampa

Get EXTREME.M in this site and you'll find the ALL peaks (minima and maxima!) of
rand(10^6,1) in less than a second, 10^7 in about 10 sec, and from matrix too, so...

03 Oct 2006 mcs swamy  
14 Oct 2006 Tom O'Haver

K. Tampa is correct; extreme.m is the one to use if you want to find ALL the minima and maxima. But "Peak finding and measurement" is intended to distinguish real peaks from noise in experimentally measured signals and to measure their height, position, and width. Two completely different purposes.

22 Dec 2006 BHARATH KUMAR  
20 Jan 2007 Dmitry Kazachk

Would be greate if it will do deconvolution and gave the areas for deconvolved peaks.
In general - great tool!

12 Apr 2007 Tom Driscoll

Perfect for scientific data processing. Good performance without being overly complicated. You just saved me a week of my time.

03 May 2007 Matthew Butcher

You saved my MEng project with this one. I credited you thogh, don't worry.
Many thanks Tom,
Matt.

10 Sep 2007 Li XinBo

Your algorithm is excellent.But I find a problem in it.
Your algorithm is limited only when the data are positive number.If all the data are negative and there is peak points.Your algorithm can't detect the peak points.
But I can translate the coordinate axis.
It is to make all the y data into positive number. Then using your algorithm we can find the peak points.
I think you can modify your algorithm and make it adapt to the situation that the data is all negative number.
If you can modify your algorithm,please send the message to my email.(lygwxr@yahoo.com.cn)
Thank your.
A student from BIT of China

06 Nov 2007 Karan Jain

This is a good algorithm but can it be changed to give peeks over a certain datum instead of the trough values.

20 Nov 2007 Hugo Banziger

Please gat back to me with your private phone number.

Regards,
Dr. Hugo.

11 Jan 2008 Julius Kusuma

Very useful interactive software! Thanks for sharing this.

29 Apr 2008 Ralph Ernstorfer

fast and reliable tool ... thanks for sharing!

21 Jun 2008 Christof Devriendt

Just what I needed! Thank you very much!

17 Apr 2009 Tom O'Haver

Latest version just uploaded corrects a bug in the FindPeakSlidersG script that caused a malfunction when individual peaks are viewed if the x-axis data series does not start with zero.

19 Aug 2009 Michael Coen

Very nifty idea but it crashes quickly in Matlab 2008b, 2009a, and 2009b. There are clearly some GUI incompatibilities.

19 Aug 2009 Michael Coen

Ah, commenting out line 337 of rtslid.m:

"figure(params.fig);"

eliminates crashes for later versions of Matlab...

19 Aug 2009 Michael Coen

And comment out line 372 of rtslid.m as well... :)

05 Jan 2010 ZULIN  
Please login to add a comment or rating.
Updates

Add or update the screenshot

24 Jul 2006

replace missing function in ZIP file

02 Aug 2006

Add or update the screenshot
Bug fixes

22 Aug 2006

Bug fixes and enhancements (Version 1.1)

25 Aug 2006

Enhancements: Version 1.2 is a faster version of the original findpeaks function.

18 Sep 2006

Change to file details (title, description, requirements, ...),
Enhancements,
Bug fixes.

22 Sep 2006

Change to file details (title, description, requirements, ...)

24 Oct 2006

Change to file details

01 Nov 2006

enhancements

07 Dec 2006

enhancements
Change to file details

17 Apr 2009

Fixes a bug in the FindPeakSlidersG script that caused a malfunction in the individual peak viewing mode when the x-axis data series did not start at zero.

03 Sep 2009

The rtslid.m function in this version has been
modified by commenting out lines 337 and 373
to prevent crashs on Matlab 20078 and 2009,
as recommended by Michael Coen's comment on
http://www.mathworks.com/matlabcentral/fileexchange/11755

Tag Activity for this File
Tag Applied By Date/Time
chemistry Tom O'Haver 22 Oct 2008 08:33:17
physics Tom O'Haver 22 Oct 2008 08:33:17
peak detection Tom O'Haver 22 Oct 2008 08:33:17
analytical chemistry Tom O'Haver 22 Oct 2008 08:33:17
instrumental analysis Tom O'Haver 22 Oct 2008 08:33:17
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com