Be the first to rate this file! 155 downloads (last 30 days) File Size: 6.24 KB File ID: #23850

iPeak: Interactive Peak Detector (Version 1.1)

by Tom O'Haver

 

21 Apr 2009 (Updated 25 Apr 2009)

Code covered by BSD License  

Interactive peak detector function.

Download Now | Watch this File

File Information
Description

function P=ipeak(DataMatrix,PeakD,AmpT,SlopeT,SmoothW,FitW)
Keyboard-operated Interactive Peak Finder for data in data matrix "DataMatrix", with x values in row 1 and y values in row 2. Returns the peak table in P (Peak #, Position, Height, Width.) See http://terpconnect.umd.edu/~toh/spectrum/PeakFindingandMeasurement.htm
T. C. O'Haver (toh@umd.edu), Version 1.1, April 2009.
 
EXAMPLE 1: x=[0:.1:100];
              y=(x.*sin(x)).^2;
              ipeak([x' y']);
Displays DataMatrix [x' y'] with arbitrary starting
values for peak parameters AmpT, SlopeT, SmoothW, FitW.

 EXAMPLE 2: x=[0:.1:100];
            y=5+5.*cos(x)+randn(size(x));
            ipeak([x' y'],10);
The additional argument (10) is an estimate of the peak density (maximum number of peaks that would fit into the data record).

 EXAMPLE 3: ipeak([x' y'],0,.0001,33,33);
As above, but specifies exact initial values of AmpT, SlopeT, SmoothW, FitW.

Keyboard Controls:
Pan signal left and right: Coarse pan: < and >
                    Fine pan: left and right cursor arrow keys
Zoom in and out: Coarse zoom: / and '
                    Fine zoom: up and down cursor arrow keys
Adjust AmpThreshold: A,Z (A increases, Z decreases)
Adjust SlopeThreshold: S,X (S increases, X decreases)
Adjust SmoothWidth: D,C (D increases, C decreases)
Adjust FitWidth: F,V (F increases, Z decreases)
Baseline: B, then click left and right baseline
Print peak table: P Prints Peak #, Position, Height, Width
Print commands: K Prints this list
Print parameters Q (Prints AmpT, SlopeT, SmoothW, FitW)
Print report R Prints Peak table and parameters
Peak labels ON/OFF L Toggles peak labels in upper panel

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Peak finding and measurement (version 2)

MATLAB release MATLAB 6.5 (R13)
Zip File Content  
Other Files iPeak.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 (1)
27 Apr 2009 Tom O'Haver

Version 1.1 posted 25 Apr 2009 adds keypress command "L" which toggles ON and OFF peak labels in the upper panel (zoomed-in segment). Each peak in that segment is labeled with peak position, height, and width. The labels change in real-time as the peak detection parameters are modified.

Please login to add a comment or rating.
Updates
21 Apr 2009

Revised description

25 Apr 2009

Version 1.1 adds "L" keypress to toggle peak labels in upper panel ON and OFF. Peak shown in the upper panel (zoom-in view) are labeled with peak position, height, and width, which changes in real-time as the peak detection parameters are varied.

Tag Activity for this File
Tag Applied By Date/Time
analytical chemistry Tom O'Haver 21 Apr 2009 14:23:31
chemistry Tom O'Haver 21 Apr 2009 14:23:31
instrumental analysis Tom O'Haver 21 Apr 2009 14:23:31
physics Tom O'Haver 21 Apr 2009 14:23:31
peak detection Tom O'Haver 21 Apr 2009 14:23:31
signal processing Tom O'Haver 21 Apr 2009 20:08:27
 

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