3.0

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

Interactive Peak Fitter (Version 8.1)

by Tom O'Haver

 

27 Mar 2009 (Updated 13 Apr 2012)

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 Gaussian, exponentially-broadened Gaussian, Lorentzian, Pearson, Logistic, exponential pulse, and sigmoid shapes. See http://www.wam.umd.edu/~toh/spectrum/InteractivePeakFitter.htm for more information.

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

Press K to list all keyboard commands.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Interactive Peak Fitter, version 2.2
This submission has inspired the following:
Peak Fitter

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (20)
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.

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.

30 Mar 2009 Wang Hai

good

08 Apr 2009 Lissa  
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)

17 Feb 2010 Andre Guy Tranquille  
23 Aug 2010 Thomas

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

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.

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.

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?

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.

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.

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

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).

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).

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.

06 Sep 2011 mohammad

perfect Tom

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.

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.

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.

Please login to add a comment or rating.
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.

Tag Activity for this File
Tag Applied By Date/Time
chemistry Tom O'Haver 27 Mar 2009 16:24:00
physics Tom O'Haver 27 Mar 2009 16:24:00
peak fitting Tom O'Haver 27 Mar 2009 16:24:00
curve fitting Tom O'Haver 27 Mar 2009 16:24:00
decomposition Tom O'Haver 27 Mar 2009 16:24:00
time series Tom O'Haver 27 Mar 2009 16:24:00
chemistry Frantisek 10 Apr 2009 01:36:32
chemistry Bartlomiej 03 Apr 2012 04:00:55

Contact us at files@mathworks.com