Code covered by the BSD License  

Highlights from
Interactive Peak Fitter (Version 11)

3.0

3.0 | 4 ratings Rate this file 56 Downloads (last 30 days) File Size: 321 KB File ID: #23452
image thumbnail

Interactive Peak Fitter (Version 11)

by

 

27 Mar 2009 (Updated )

Keyboard operated peak fitting function for time-series signals.

| Watch this File

File Information
Description

An interactive peak fitting program for time-series signals, written as a self-contained function in a single m-file. Uses a non-linear optimization algorithm to decompose a complex, overlapping-peak signal into its component parts. The objective is to determine whether your signal can be represented as the sum of fundamental underlying peaks shapes. Accepts signals of any length, including those with non-integer and non-uniform x-values. Fits 20 peak shapes. See http://www.wam.umd.edu/~toh/spectrum/InteractivePeakFitter.htm for more information. Version 11, October, 2014. Version 11 adds polynomial fits (Shift-o, for pOlyminial), bug fixes, adds Shift-Ctrl-S and Shift-Ctrl-P keys to transfer the current signal to iSignal and iPeak.

Acknowledgements

This file inspired Peak Fitter.

MATLAB release MATLAB 7.8 (R2009a)
MATLAB Search Path
/
/ipf11
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (23)
19 Mar 2013 Tom O'Haver

Version 9.2, uploaded today, has bug fixes; fixed-position Gaussians (shape 16) and fixed-position Lorentzians (shape 17); adds a peak shape selection menu (activated by the '-' key).

05 Jul 2012 Tom O'Haver

Version 8.61 adds a simple built-in IQR function for those who don't have the Statistics Toolbox. This is used only by the bootstrap routine (V key).

22 Jun 2012 Tom O'Haver

Version 8.6 adds Fixed-width Gaussian (Shift-G key; shape number 11) and Fixed-width Lorentzian (Shift-L key; shape number 12)

20 Feb 2012 Tom O'Haver

Just trying to make it work, Ragaar. I'm basically a pragmatist, designing tools from the user's point of view, not a programming purist.

20 Feb 2012 Ragaar Ashnod

Why are you using global variables and adjusting the format and warnings displayed?

I'm not going to bother digging everything apart. But the functionality is neat.

16 Sep 2011 Tom O'Haver

Re: Mark Shore's comment. I agree; I guess I'm a retrograde kind of guy. I've considered creating a GUI, but attempts so far have not produced anything I like better than the single-key commands. It's quicker to hit one key than to hold down the Ctrl-key and another key to select a drop-down menu item.

06 Sep 2011 mohammad

perfect Tom

18 Aug 2011 Mark Shore

I find the keyboard commands a bit retrograde in 2011, but that is a personal thing.

I haven't explored all the options in detail yet, so the rating is somewhat preliminary.

16 Aug 2011 Tom O'Haver

Version 5.5 (August 16, 2011) adds equal-width Gaussian and Lorentzian peak shapes and an 8-point baseline subtraction option (expandable to any number of points).

05 Aug 2011 Tom O'Haver

Version 5.4 has greater flexibility of data input formats (e.g. it can accept data whose x-axis values are decreasing as well as increasing).

25 Jul 2011 Tom O'Haver

Version 5.2 (July 26, 2011) includes bug fixes in the Print peakfit function (W) and exponentially-broadened Gaussian. Re-formats the peak table on the graph.

See http://terpconnect.umd.edu/~toh/spectrum/InteractivePeakFitter.htm

15 Jul 2011 Tom O'Haver

Version 5.0 (July 15, 2011) adds: graph of fitted peaks on the full signal display; Y command to display the entire signal full screen without cursors; various UI improvements and bug fixes.

13 Jul 2011 Tom O'Haver

DongSheng, there is no way to do that in the current version. You can see the fits only in the region fitted. I'll consider adding what you want in a future version. Thanks.

05 Jul 2011 Dongsheng

When I use this to find peaks it always displays a zoomed in area for the fit. How can I show the entire plot with the fits?

16 Jun 2011 Tom O'Haver

The new version 4.4 includes several small bug fixes and display improvements. The peak table displayed on the graph after a fit now has column headings.

23 Aug 2010 Tom O'Haver

Remove (or comment out) the that line from the m-file. Evidently the syntax of that command has changed since my version of Matlab.

23 Aug 2010 Thomas Schlothauer

If I will start the interactive peak fitter, I get the following information:

??? Error using ==> warning
Unknown setting or incorrect message identifier 'Exiting:'.

Error in ==> InteractivePeakFitter at 22
warning('OFF','Exiting:')

What was my mistake here?
Kindly regards by Thomas

17 Feb 2010 Andre Guy Tranquille  
14 Apr 2009 Tom O'Haver

Version 4: April 2008: Added keypress function "x" to refine the fit by performing 10 trial fits with slightly different first guesses and take the one with the lowest fitting error. You can change the number of trials, "NumTrials", in line 69 (the default is 10)

08 Apr 2009 Lissa  
30 Mar 2009 Wang Hai

good

28 Mar 2009 John D'Errico

Please do not upload two copies of the same file. If you wish to update a file, then click on the update link on the file page.

Delete one of the copies.

28 Mar 2009 Tom O'Haver

This latest version (3.3) add two features:

1. It computes the model at 100 points regardless of number of data points, giving the graph a smoother appearance.

2. A new keypress function, "d", to print out x,y values of the current data segment.

Updates
08 Apr 2009

Version 3.5 computes the model at 100 points regardless of number of data points; adds keypress functions "t" to toggle between normal and autozero mode, and "d" to print out x,y values of the current data segment.

14 Apr 2009

 Version 4: April 2008: Added keypress function "x" to refine the fit by performing 10 trial fits with slightly different first guesses and take the one with the lowest fitting error.

18 Apr 2009

Version 4.1, April 18: Added Autozero ON/OFF notification at top, and "k" keypress to print out list of commands.

30 Apr 2011

Improved performance on newer versions of Matlab; tested on 7.8 (R2009a).

06 May 2011

Expanded description

15 Jun 2011

Some minor big fixes and display improvements.

15 Jul 2011

Version 5.0 adds: graph of fitted peaks on the full signal display; Y command to display the entire signal full screen without cursors; various UI improvements and bug fixes.

16 Jul 2011

bug fix

20 Jul 2011

Version 5.1 July 20, 2011: reformatted peak table on figure window, bug fixes

25 Jul 2011

Bug fixes in Print peakfit function (W) and exponentially-broadened Gaussian.

05 Aug 2011

Version 5.4, August, 2011: improved flexibility for data input arguments.

15 Aug 2011

Version 5.5 adds equal-width Gaussian and
 Lortentzians and an 8-point baseline subtraction option.

26 Aug 2011

Add exponentially-broadened equal width Gaussians peak shape (J key)

26 Sep 2011

Version 5.9 adds user-selected number of points in background subtraction.

05 Oct 2011

Version 6: T key (autozero) cycles through none, linear, and quadratic background subtraction. Minor bug fixes.

24 Oct 2011

Version 7, Oct. 2011, adds linear/log
mode (M key) and exponential pulse and sigmoid models (U and S keys)

19 Jan 2012

Version 7.1, Jan. 2012, Bug fixes in
background subtraction modes and in handlng very small data sets.

09 Apr 2012

Version 8, April 2012, Added bootstrap
sampling estimation of standard deviations of peak parameters ('v' key).

13 Apr 2012

Enhancements to the bootstrap statistics function.

05 Jun 2012

Version 8.5, June 2012, Exponential
broadening uses normal rather than circular convolution.

18 Jun 2012

Version 8.6 adds Fixed-width Gaussian (Shift-G key; shape number 11) and Fixed-width Lorentzian (Shift-L key; shape number 12)

05 Jul 2012

Version 8.61 adds a simple built-in IQR function for those without the Statistics Toolbox.

17 Sep 2012

Version 8.8 has no limit in the number of peaks in the model.

24 Sep 2012

Added Gaussian/Lorentzian blend, bifurcated Gaussian, and bifurcated Lorentzian. Shift-X to enter value of 'Extra' for variable shapes; Shift-A and Shift-Z fine-tune the 'extra' variable. Bug fixes.

02 Nov 2012

Version 8.92: Added elapsed time to Q and R reports; Bug fixes; Slight improvement in speed of exponentially broadened shapes.

16 Jan 2013

Version 8.94: Improved accuracy of autozero calculation.

12 Feb 2013

Version 9: Accepts additional input arguments to set the initial pan and zoom to focus on the data segment 'window' points wide, centered at x=center.

04 Mar 2013

Version 9.1 Adds fixed-position Gaussians (shape 16) and fixed-position Lorentzians (shape 17). Adds peak shape selection menu (activated by '-' key)

19 Mar 2013

Version 9.2: bug fixes; Reorganized peak shape table ('-' key)

13 Sep 2013

Version 9.5 adds two new peak shapes: exponentially broadened Lorentzian and the alpha function.

11 Nov 2013

Version 9.7 adds Voigt profile shape; corrects for flat baseline if autozero mode 3.

17 Dec 2013

Version 9.8 adds Shift-C to specify custom first guess ('start' vector).

27 Dec 2013

Version 9.84 has some bug fixes related to starting values.

13 Mar 2014

Version 10 adds support for multiple-shape models.

20 May 2014

Version 10.2 fixes some bugs in the X key and C key functions in the bipolar (+ and -) mode.

28 May 2014

Version 10.3 adds a "down step" sigmoid (Shift-D; shape #23).

20 Jun 2014

Version 10.4, June, 2014. Moves fitting result text to bottom panel of graph. Log mode (M key) toggles log mode on/off, fits log(model) to log(y). Replaces bifurcated Lorentzian with Breit-Wigner-Fano resonance peak (Shift-B key; Shape=15).

07 Oct 2014

Version 11 adds polynomial fits (Shift-o, for pOlyminial), bug fixes, adds Shift-Ctrl-S and Shift-Ctrl-P keys to transfer the current signal to iSignal and iPeak.

Contact us