Fit peaks by specifying peak centers on graph
Minimum Origin Version Required: 8.0 SR3
1. fitpeaks 3
2. fitpeaks t:=lorentz np:=3;
3. fitpeaks np:=4 iy:=col(3)
4. fitpeaks npeaks:=3 iy:=col(B) rt:=<new name:=MyResult>
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Peak Type | type |
Input int |
|
Specify the peak type.
Option list:
|
Number of Peaks | npeaks |
Input int |
|
Specify the number of the peaks. |
Input | iy |
Input XYRange |
|
Specify the input data. |
Report of Results | rt |
Output ReportTree |
|
Specify the output report worksheet. |
Fitted Curves | rd |
Output ReportData |
|
Specify the fitted data worksheet. |
Show Hint | hint |
Input int |
|
Specify whether to show the hint dialog. |
The function performs fitting to data with multiple peaks. It allows you to specify the number of peaks, click to pick peak centers on graph window and then fit the peaks by Lorentzian or Gaussian functions.
Please note that this dialog only supports two functions: Gaussian and Lorentzian. For more flexible peak fitting, the Peak Analyzer should be used instead.
1. Import the data \Samples\Curve Fitting\Multiple Peaks.dat.
2. Highlight column B and select Plot > Basic 2D: Line from Origin menu to create a line plot. You can see that there are three peaks.
3. Select Analysis: Peaks and Baseline: Fit Multiple Peaks to bring up the dialog. Choose 3 with the Number of Peaks drop-down list and then click OK.
4. An attention dialog appears. Click OK. Then you can double click on the graph to determine the peak centers.
5. Origin asks you to enter a rough peak width value in the pop-up dialog. Accept the default value and click OK to perform the fitting.
The function performs multi-peaks fitting using Gaussian or Lorentzian function. The fitting is based on the non-linear curve fitting module in Origin. The multiple peaks were fitted as the accumulation of Gaussian or Lorentzian function:
blauto, pa, pkFind, PaMultiY, NLfitpeaks
Keywords:spectrum, curve fitting