2.12.2 fitpeaks

Brief Information

Fit peaks by specifying peak centers on graph

Additional Information

Minimum Origin Version Required: 8.0 SR3

Command Line Usage

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>

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Peak Type type

Input

int

gauss
Specify the peak type.

Option list:

  • gauss:Gaussian
The peaks will be fitted with Gaussian function.
  • lorentz:Lorentzian
The peaks will be fitted with Lorentzian function.
Number of Peaks npeaks

Input

int

2
Specify the number of the peaks.
Input iy

Input

XYRange

<active>
Specify the input data.
Report of Results rt

Output

ReportTree

[<input>]<new>
Specify the output report worksheet.
Fitted Curves rd

Output

ReportData

[<input>]<new>
Specify the fitted data worksheet.
Show Hint hint

Input

int

1
Specify whether to show the hint dialog.

Description

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.

Examples

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.

Algorithm

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:

Fitpeaks help English files image002.gif (Gaussian)
Fitpeaks help English files image004.gif (Lorentzian)

Related X-Functions

blauto, pa, pkFind, PaMultiY, NLfitpeaks


Keywords:spectrum, curve fitting