| Description |
Keyboard-operated Interactive Peak Finder for time series data. P=ipeak(DataMatrix) where DataMatrix = x,y vectors or 2-column matrix. Returns the peak table in P (Peak #, Position, Height, Width, Area)
http://terpconnect.umd.edu/~toh/spectrum/PeakFindingandMeasurement.htm
T. C. O'Haver (toh@umd.edu), Version 3.8 adds manual entry of AmpT after entering number of click points for background subtraction; adds '0' key to set minimum to zero.
EXAMPLE 1: x=[0:.1:100];
y=(x.*sin(x)).^2;
ipeak(x,y); Data in separate x and y vectors
EXAMPLE 2: datamatrix=[x;y];
ipeak(datamatrix); Data in two columns of a matrix
EXAMPLE 3: x=[0:.1:100];
y=5+5.*cos(x)+randn(size(x));
ipeak(x,y,10);
or ipeak(datamatrix,10);
The additional argument - 10 in this case - is an estimate of the maximum number of peaks that would fit into the data record). Small values detect fewer peaks; larger values > more peaks.
EXAMPLE 4: As above, but specifies initial values of AmpT, SlopeT, SmoothW, and FitW (see findpeaks subfunction for explanation)
>> ipeak([x;y],0,.5,.0001,20,20);
EXAMPLE 5: As above, but also specifies initial values of pan (xcenter) and zoom (xrange) in optional input arguments 7 and 8. In this example, a 0.7 unit region centered on 249.7 units is displayed in the upper window:
>> load data.mat
>> ipeak(Sample1,0,110,0.06,3,4,249.7,0.7);
EXAMPLE 6: As above, but also specifies MaxError, Positions, and Names in optional input arguments 8, 10, and 11, for peak identification function.
>> load data.mat
>> ipeak(Sample1,0,120,0.06,3,6,296,5,.1,Positions,Names);
Keyboard Controls:
Pan left and right..........Coarse pan: < and >
Fine pan: left and right cursor arrows
Nudge: [ ]
Zoom in and out.............Coarse zoom: / and "
Fine zoom: up and down cursor arrows
Resets pan and zoom.........ESC
Change plot color...........Enter (cycles through standard colors)
Adjust AmpThreshold.........A,Z (Larger values ignore short peaks)
Adjust SlopeThreshold.......S,X (Larger values ignore broad peaks)
Adjust SmoothWidth..........D,C (Larger values ignore sharp peaks}
Adjust FitWidth.............F,V (Adjust to cover just top part of peaks
Baseline subtraction........B, then click baseline at 8 points
Restore original signal.....G to cancel previous background subtraction
Invert signal...............- Invert (negate) the signal (flip + and -)
Set minimum to zero.........0 (Zero) Sets minumun signal to zero
Print report................R prints Peak table and parameters
Print peak table............P Peak #, Position, Height, Width, Area
Normal peak fit.............N Fit peaks in upper window with peakfit.m
Multiple peak fit...........M Fit all peaks in signal with peakfit.m
Print keyboard commands.....K prints this list
Print findpeaks arguments...Q prints findpeaks function with arguments
Print ipeak arguments.......W prints ipeak function with all arguments
Peak labels ON/OFF..........L displays peak parameters on upper graph
Peak ID ON/OFF..............I Identifies closest peaks in Names database.
Print table of peak IDs.....O Prints Name, Position, Error, Amplitude |