peak fitting module -...

124
Peak Fitting Module TM PFM OriginLab Corporation

Upload: trinhdat

Post on 17-Sep-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Module

TM

PFM

OriginLab Corporation

Page 2: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Copyright © 2002 by OriginLab Corporation

All rights reserved. No part of the contents of this book may be reproduced or transmitted in any formor by any means without the written permission of OriginLab Corporation.

OriginLab, Origin, and LabTalk are either registered trademarks or trademarks of OriginLabCorporation. Other product and company names mentioned herein may be the trademarks of theirrespective owners.

OriginLab CorporationOne Roundhouse PlazaNorthampton, MA 01060USA(413) 586-2013(800) 969-7720Fax (413) 585-0126www.OriginLab.com

Page 3: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Module Contents • iii

Contents

Installing the PFM and Getting Started 1Installing the PFM......................................................................................................................1Uninstalling the PFM .................................................................................................................3Entering a Peak Fitting Session..................................................................................................3Getting Started Using the Wizard ..............................................................................................4

Peak Fitting Wizard Tutorials 5Introduction................................................................................................................................5Tutorial 1, Introduction to the Peak Fitting Wizard ...................................................................5

Getting Started .............................................................................................................6Selecting a Range of Data............................................................................................6Defining the Baseline...................................................................................................8Finding the Peaks.........................................................................................................8Fine-tuning the Peak Parameters................................................................................11Performing the Fit ......................................................................................................13Reporting the Fitting Results .....................................................................................15Exiting a Peak Fitting Session ...................................................................................17

Tutorial 2, Analyzing Data with Hidden Peaks........................................................................17Getting Started ...........................................................................................................17Selecting a Range of Data..........................................................................................18Defining the Baseline.................................................................................................18Finding the Peaks.......................................................................................................20Setting a Parameter's Lower Bound ...........................................................................23Performing the Fit ......................................................................................................24Reporting the Fitting Results .....................................................................................25Exiting a Peak Fitting Session ...................................................................................25

Tutorial 3, Creating a Customized Wizard...............................................................................25Getting Started ...........................................................................................................26Stepping Through the Wizard Performing Actions and Hiding Pages.......................27Saving the Customized Procedure File ......................................................................29Running the Custom Wizard......................................................................................30

Page 4: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

iv • Contents Peak Fitting Module

Peak Fitting Wizard Reference 31Introduction ............................................................................................................................. 31Initializing the Peak Fitting Wizard ........................................................................................ 34Selecting the Peak Data........................................................................................................... 35Preconditioning the Data ......................................................................................................... 37Initializing the Baseline........................................................................................................... 40Defining How the Baseline Points Should be Used to Create a Baseline................................ 42

Modifying the Baseline Points .................................................................................. 43Fitting the Baseline Points with a Function............................................................... 43Connecting the Baseline Points with a Line.............................................................. 44Connecting the Baseline Points with a Spline........................................................... 44

Conditioning the Baseline ....................................................................................................... 44Scaling the Baseline Along the Y Axis..................................................................... 45Subtracting the Baseline From the Peak Data ........................................................... 45

Specifying the Peak Function and Finding the Peaks.............................................................. 46Selecting the Peak Function ...................................................................................... 46Modifying and Defining New Functions .................................................................. 48Automatically Finding the Peaks .............................................................................. 51Defining Peaks from a Data File ............................................................................... 52

Adding, Modifying, and Deleting Peaks ................................................................................. 52Enlarging a Section of Interest in the Wizard Graph ................................................ 53Locating Hidden Peaks ............................................................................................. 53Adding New Peak Markers ....................................................................................... 54Modifying the X Location of Peak Markers ............................................................. 54Deleting Peak Markers.............................................................................................. 54

Assigning Peak-specific Functions and Initializing Parameters.............................................. 55Selecting the Active Peak.......................................................................................... 55Changing the Function to Fit to the Peak.................................................................. 56Optimizing the Initial Parameter Values ................................................................... 56Updating the Wizard Graph While Editing the Peak Edit View Box........................ 58

Fixing and Sharing Parameters and Setting Constraints.......................................................... 58Fixing or Allowing Parameter Values to Vary.......................................................... 59Sharing Parameters Among Peaks ............................................................................ 60Setting the Parameter Constraints ............................................................................. 60

Controlling the Fitting Procedure and Performing the Fit....................................................... 61Setting the Number of Iterations ............................................................................... 62Setting the Tolerance ................................................................................................ 62Setting Confidence and Prediction Band Levels ....................................................... 63Varying or Fixing the Baseline ................................................................................. 63Weighting the Data ................................................................................................... 63Starting the Fitting .................................................................................................... 64Checking the Fit By Reviewing the Residuals.......................................................... 64

Reporting the Results .............................................................................................................. 66Reporting the Fitting Function Parameters and the Fitting Statistics ........................ 66Reporting the Peak Characteristics in a Worksheet Report....................................... 69Reporting the Peak Characteristics in a Graph Report.............................................. 73Computing and Viewing the Peak Characteristics Interactively ............................... 77Saving the Peak Locations to an ASCII File............................................................. 79

Page 5: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Module Contents • v

Saving Settings to an Initialization File .....................................................................79Creating a Custom Wizard .......................................................................................................80

Peak and Baseline Function Reference 83Introduction..............................................................................................................................83Peak Functions .........................................................................................................................84

Gaussian.....................................................................................................................84Gauss2........................................................................................................................84EMGauss....................................................................................................................84Lorentz .......................................................................................................................85Voigt ..........................................................................................................................85PsVoigt1 ....................................................................................................................86PsVoigt2 ....................................................................................................................86Pearson7.....................................................................................................................87Asym2Sig...................................................................................................................87Weibull3 ....................................................................................................................87LogNormal.................................................................................................................88GCAS.........................................................................................................................88ECS............................................................................................................................89CCE............................................................................................................................89BiGauss......................................................................................................................90InvsPoly .....................................................................................................................90Sine ............................................................................................................................90SineSqr.......................................................................................................................91SineDamp...................................................................................................................91Power2 .......................................................................................................................91Pulse...........................................................................................................................91

Periodic Peak Functions ...........................................................................................................92SineDamp...................................................................................................................92Sine ............................................................................................................................92SineSqr.......................................................................................................................92

Baseline Functions ...................................................................................................................93Line ............................................................................................................................93Parabola .....................................................................................................................93Cubic..........................................................................................................................93Poly4 ..........................................................................................................................93Poly5 ..........................................................................................................................93ExpDec1 ....................................................................................................................94ExpDec2 ....................................................................................................................94ExpGrow1..................................................................................................................94ExpGrow2..................................................................................................................94Hyperbl ......................................................................................................................94

External DLL Functions...........................................................................................................95

Page 6: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

vi • Contents Peak Fitting Module

Programming the PFM with LabTalk 97Introduction ............................................................................................................................. 97Basic PFM Scripts: Getting Started......................................................................................... 97Getting Results ...................................................................................................................... 100Controlling the PFM.............................................................................................................. 104Peaks With Different Functions ............................................................................................ 105Fitting a Section of a Dataset................................................................................................. 106Constraints............................................................................................................................. 107Auxiliary Methods and Properties......................................................................................... 109Fitting Multiple Datasets Simultaneously ............................................................................. 113

Index 115

Page 7: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Installing the PFM and Getting Started Installing the PFM • 1

Installing the PFM andGetting Started

Installing the PFMBefore installing this version of the Peak Fitting Module (PFM), reviewthe following information:

=> If you are upgrading your Origin/PFM software and you selected toupgrade your existing copy of Origin (as opposed to installing Origin 7into a new folder, leaving the existing copy of Origin unaltered), thenyou must uninstall your previous version of the PFM before installing thenew PFM. If you installed Origin 7 into a new folder (whether or notyou transferred your old settings), then you can directly install the newPFM into this folder.

To uninstall a previous version of the PFM, perform the followingoperations:

1) Start Origin. (If Origin is already open and if you have run the PeakFitting wizard in the current Origin session, close Origin and then restartOrigin. If Origin is open and you have not run the wizard in the currentsession, proceed to the next step.)

2) Select View:Toolbars. This opens the Customize Toolbar dialogbox.

3) On the Toolbars tab, select the PFM entry from the Toolbars list box.(You can click on the text or in the check box.)

4) Click the Delete button. This action removes the PFM from theToolbars list.

5) Select the Button Groups tab.

6) Select PFM from the Groups list box.

7) Click the Delete button in the Button Group group.

Page 8: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

2 • Installing the PFM Installing the PFM and Getting Started

8) Click the Yes button in the Button Group attention box.

9) Close the Customize Toolbar dialog box.

=> The Origin 7 PFM checks that your Origin software is registeredbefore installing. If your Origin software is not registered, the PFM willnot install. To check if your software is registered, start Origin and thenselect Help:About Origin. If your software is registered, a RegistrationID displays in the About Origin dialog box. If the Registration ID fieldis blank, click the OK button to close this dialog box and then selectHelp:Register Online. Click the Continue button in the OriginLabRegistration dialog box. This action opens the Registration dialog box.Select the Register Now radio button and then click the “Click here toRegister on-line and receive your Registration ID” button. Follow theinstructions on the OriginLab website to complete the registrationprocess.

To install the PFM, perform the following:

1) Start Origin 7.

2) Select Tools:Pack/Unpack OPK Files. This opens the Origin Packdialog box.

3) Click the Open button in this dialog box and then browse and selectthe PFM.OPK file in the Origin Pack Files dialog box.

4) Click Open. The Origin Pack dialog box then unpacks and lists thePFM files.

Installing the PFM.OPK File

Page 9: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Installing the PFM and Getting Started Uninstalling the PFM • 3

5) Click Extract in the Origin Pack dialog box to install the files.

During the PFM.OPK installation, a PFM button group is added to theGroups list box on the Button Groups tab of the Customize Toolbardialog box (View:Toolbars). Additionally, the PFM toolbar displays inthe Origin workspace. This toolbar includes one button, the Enter Peak

Fitting Session button .

Uninstalling the PFMTo uninstall the PFM, perform the following operations:

1) Start Origin. (If Origin is already open and if you have run the PeakFitting wizard in the current Origin session, close Origin and then restartOrigin. If Origin is open and you have not run the wizard in the currentsession, proceed to the next step.)

2) Select Tools:Uninstall OPK Files. This opens the Uninstall Opackdialog box.

Uninstalling the PFM

3) Select the PFM from the list box and click Uninstall.

Entering a Peak Fitting SessionYou can enter a peak fitting session when either a worksheet or graph isactive. To enter a peak fitting session, click the Enter Peak Fitting

Session button on the PFM toolbar. This button opens the PeakFitting wizard with the active dataset displaying in the wizard graph.

Page 10: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

4 • Getting Started Using the Wizard Installing the PFM and Getting Started

Important Note: When the Peak Fitting wizard is open, you should notactivate and begin performing operations in Origin. If you must return toOrigin to perform operations, you should first close the Peak Fittingwizard.

Getting Started Using the WizardTo navigate through the Peak Fitting wizard, click the Next (and Back)buttons, or click the page icons on the wizard map located on the left sideof the wizard. The page icons on the wizard map are color-coded toindicate the active page (green), a page that has not been visited (yellow),a page that has already been visited or skipped (brown), and the lastwizard page (red).

The wizard map provides more navigation options than the Next andBack buttons, as you can skip pages using the wizard map in both theforward and backward direction. However, when you first start using thePeak Fitting wizard, you should navigate through the wizard pages in thesequence provided. As you become familiar with the wizard, you canskip and hide pages. For information on skipping and hiding wizardpages, see "Tutorial 3, Creating a Customized Wizard".

The wizard graph (located on the right side of the wizard) updates as youmake selections and perform actions on the wizard pages. To enhance

the view of the wizard graph, you can maximize the wizard's display.You can further enhance the wizard graph display by hiding the wizardmap and then maximizing the wizard. To hide the wizard map, right-click in a blank area of the wizard (for example, next to the Back button)and select Show Wizard Map from the shortcut menu. This action de-selects the menu command and hides the wizard map. Now maximize

the wizard to enhance the view of the wizard graph.

Page 11: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Tutorials Introduction • 5

Peak Fitting WizardTutorials

IntroductionThree tutorial lessons are provided to help you get started using the PeakFitting wizard.

"Tutorial 1, Introduction to the Peak Fitting Wizard" on this page: Thistutorial introduces you to the pages and controls on the Peak Fittingwizard. You will step through each page of the wizard using a sampledataset.

"Tutorial 2, Analyzing Data with Hidden Peaks" on page 17: Thistutorial introduces you to the Peak Fitting wizard's baseline points andpeak finding algorithms. You will learn how to review the secondderivative. You will also learn how to set a lower bound on a parameter.

"Tutorial 3, Creating a Customized Wizard" on page 25: This tutorialsteps you through the process of creating a custom wizard. You will hidepages on the Peak Fitting wizard. Some hidden pages will be pre-set toperform custom actions. Other pages will be set to perform no actions.You will create a custom toolbar button to run your custom wizard.

Tutorial 1, Introduction to the Peak FittingWizard

This tutorial introduces you to the pages and controls on the Peak Fittingwizard. Using sample data provided with the PFM, you will define abaseline, automatically find and manually add peaks, fine-tune the initial

Page 12: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

6 • Tutorial 1, Introduction to the Peak Fitting Wizard Peak Fitting Wizard Tutorials

peak parameter values using an interactive display, fit the data, andcustomize the peak analysis report.

Getting Started

1) Start Origin and then click the Open button on the Standardtoolbar.

2) Select PFM_Examples.OPJ from the list of available files in theOrigin folder and click the Open button. The project opens with a noteswindow active in the workspace.

3) If the Project Explorer is not currently open, click the Project

Explorer button on the Standard toolbar to open it.

4) Double-click on the Chromatography Data folder in the ProjectExplorer.

5) Activate the Graph3 - GPC Single Channel Chromatogram windowby clicking on the graph's title bar or by double-clicking on the Graph3icon on the right side of the Project Explorer.

6) Click the Enter Peak Fitting Session button on the PFM toolbar.The Peak Fitting wizard opens displaying the Graph3 data.

The wizard map on the left side of the wizard provides navigationthrough the wizard (in addition to the Next and Back buttons). However,you can hide the wizard map so that your view of the wizard graphlocated on the right side of the wizard is enhanced.

7) Right-click in the blank gray area of the wizard next to the Helpbutton. This action opens a shortcut menu.

8) Select Show Wizard Map from the shortcut menu. This action de-selects the menu command and hides the wizard map.

9) Click the wizard's Maximize button to maximize the wizard'sdisplay on your screen.

Selecting a Range of DataWhen you first open the Peak Fitting wizard, the Choose Data page isactive. You can select a different peak dataset or edit the range of thecurrently selected dataset from this page.

1) Click the Select Range button. Data markers display at both ends ofthe peak data in the wizard graph. Additionally, the Current MarkerPosition group displays on the wizard page showing the current X and Yvalues of the active data marker.

Page 13: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Tutorials Tutorial 1, Introduction to the Peak Fitting Wizard • 7

Selecting a Range of Data

2) Drag the left data marker to approximately X = 3.

3) Drag the right data marker to approximately X = 18.

4) Press ENTER to fix the markers and exit the range selection mode.The graph updates displaying the selected range. Additionally, the Fromand To text boxes update displaying the respective X values.

Completing the Range Selection

Page 14: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

8 • Tutorial 1, Introduction to the Peak Fitting Wizard Peak Fitting Wizard Tutorials

Defining the Baseline1) Click the Next button to advance to the Precondition Data wizardpage. This page allows you to precondition and apply a smoothing filterto your data.

2) Click the Next button to advance to the Baseline Points page. Thispage provides controls to select (or initialize, if you will be allowing thebaseline to vary during the fit) the baseline points. You can select aconstant or a reference dataset, or you can graphically define the baselinepoints or use the Peak Fitting wizard's baseline finding algorithm. Thedefault Constant selection defines an appropriate baseline for this data.

Constant Baseline Selection

3) Click the Next button to advance to the Baseline Conditioning page.This page provides controls to scale the baseline along the Y axis or tosubtract the baseline from the peak data.

4) Click the Next button to advance to the Peak Finding page.

Finding the PeaksThe Peak Finding page provides controls to select the peak function andestimate the peak locations.

1) With the Threshold Height radio button selected in the Find Peaksgroup, click the Pick Peaks button. Eight peaks are found and markedwith magenta vertical lines in the wizard graph.

Page 15: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Tutorials Tutorial 1, Introduction to the Peak Fitting Wizard • 9

Finding Peaks Automatically

The Pick Peaks algorithm finds peaks by searching the smoothed secondderivative of the peak data looking for peaks that are above a noisethreshold. The noise threshold can be increased or decreased from theassociated combo box to drop or add peaks. As you increase this value,the algorithm finds less peaks.

In this example, we'll mark the currently unmarked peaks at thebeginning and end of the dataset manually.

2) Click the Next button to advance to the Define Peaks page. This pageprovides controls to add, modify, or delete peaks from the wizard graph.

3) Click the Enlarger button on the wizard and enlarge the twounmarked peaks in the wizard graph whose centers are approximatelylocated at X = 4 and X = 5.

Note: If you don't enlarge the desired area, click the Rescale button

on the wizard and then re-click the Enlarger button and drag thearea again.

Page 16: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

10 • Tutorial 1, Introduction to the Peak Fitting Wizard Peak Fitting Wizard Tutorials

Enlarging a Section of the Wizard Graph

4) Click the Add button and then double-click to define the two peaklocations.

Manually Adding Peaks

5) Click the Done button.

6) Click the Rescale button on the wizard to rescale the axes to thefull range.

Page 17: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Tutorials Tutorial 1, Introduction to the Peak Fitting Wizard • 11

7) Click the Enlarger button on the wizard and enlarge the last(unmarked) peak in the wizard graph whose center is approximatelylocated at X = 15.5.

8) Click the Add button and then double-click to define the peaklocation.

9) Click the Done button.

10) Click the Rescale button on the wizard to rescale the axes to thefull range.

Adding the Remaining Peak

Fine-tuning the Peak Parameters1) Click the Next button to advance to the Peak Edit Control page.

This page provides controls to select the active peak and the function tofit to that peak. It also provides an interactive peak edit view box,allowing you to fine-tune the peak parameter values for the active peakgraphically.

The peak edit view box displays the active peak data as black scatterpoints. The theoretical curve for the entire dataset displays as a red lineplot. The theoretical curve for the active peak displays as a green lineplot (this may be hidden from view by the composite theoretical curve).Both theoretical curves are based on the current parameter values and theselected fitting function(s). Three controls are provided to graphically

Page 18: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

12 • Tutorial 1, Introduction to the Peak Fitting Wizard Peak Fitting Wizard Tutorials

improve the overlay of the theoretical curve to the data: a red peakcenter line, a red peak height line, and a black peak width line with redcontrol handles on the ends.

The Peak Edit View Box with the First Peak Active

2) Move the cursor so that it is pointing over the last peak in the wizardgraph (whose center is approximately located at X = 15.5). The mousepointer will display as a hand pointer in this location.

Selecting the Active Peak

3) Click once on the peak to activate it.

The peak edit view box on the left side of the wizard updates displayingthe currently selected peak and theoretical curves.

Page 19: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Tutorials Tutorial 1, Introduction to the Peak Fitting Wizard • 13

The Peak Edit View Box with the Last Peak Active

4) Drag one of the width control handles in the peak edit view box andincrease the width of the peak's theoretical curve so that it resembles thewidth of the peak (black scatter points).

You may need to click the button located in the peak edit view box torescale the view box.

5) If necessary, adjust the peak center in the peak edit view box bydragging the peak center line left or right, as needed.

Fine-tuning the Parameter Values using the Peak Edit View Box

Performing the Fit1) Click the Next button to advance to the Fit page.

This page allows you to edit several quantitative properties of the fittingprocedure, as well as the confidence and prediction levels, and thenperform the fit.

Page 20: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

14 • Tutorial 1, Introduction to the Peak Fitting Wizard Peak Fitting Wizard Tutorials

2) Click the Fit button to perform, at most, 10 Levenberg-Marquardtiterations, as specified in the Number of Iterations drop-down list (andthe Tolerance text box).

The fit should converge in only a few iterations. The output view boxlists the number of iterations performed and the reduced chi-square value.

Additionally the updated fit curve displays in the wizard graph.

Performing the Fit

3) Click the Individual Peaks button located below the wizardgraph to display the fit curves for the individual peaks. These fit curvesdisplay as green line plots.

Page 21: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Tutorials Tutorial 1, Introduction to the Peak Fitting Wizard • 15

Displaying the Fit Curves for the Individual Peaks

Reporting the Fitting Results1) Click the Next button to advance to the Results page.

This page provides controls to create reports on the fitting functionparameters, fitting statistics, and the peak characteristics. Bothworksheet and graph reports are available.

2) Click the Confidence Bands button and the Prediction Bands

button located below the wizard graph to display confidence andprediction bands. (The confidence levels are specified on the Fit page.)

Note: When confidence bands, prediction bands, and individual peaksare displayed in the wizard graph, they will also be included in a graphreport.

3) In the Peak Characterization Report group, click the Options buttonlocated to the right of the Plot button. This opens the PeakCharacterization Report Field Details dialog box.

4) Select 8 from the Total Number of Fields drop-down list.

5) Select "Peak report field 8" in the Available Fields on Report Plot listbox.

6) Select the Resolution with Next Adjacent Peak radio button in theAvailable Results for Display group.

(To view the results associated with report fields 1 - 7, select the desiredreport field from the Available Fields on Report Plot list box. The radio

Page 22: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

16 • Tutorial 1, Introduction to the Peak Fitting Wizard Peak Fitting Wizard Tutorials

button of the associated result will be enabled in the Available Resultsfor Display group.)

7) Click the OK button to close the dialog box.

8) In the Peak Characterization Report group, click the Plot button.

The graph report is created in the Origin project. Because the wizardremains active, the graph displays behind the wizard.

9) Minimize the Peak Fitting wizard to view the graph report.

10) A Reminder Message may display indicating that the graph report isdisplayed using speed mode. Click the OK button if this ReminderMessage displays.

The Peak Fitting Graph Report

11) Click the Restore button on the Peak Fitting wizard's title bar torestore the wizard's display.

12) In the Fitting Function Parameters group, click the Worksheetbutton.

Page 23: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Tutorials Tutorial 2, Analyzing Data with Hidden Peaks • 17

The fitting function parameters worksheet report is created in the Originproject. Because the wizard remains active, the worksheet displaysbehind the wizard.

Exiting a Peak Fitting Session1) Click the Finish button to close the Peak Fitting wizard and access thegraph and worksheet reports.

Tutorial 2, Analyzing Data with HiddenPeaks

This tutorial introduces you to the Peak Fitting wizard's baseline andpeak detection algorithms. Using sample data provided with the PFM,you will automatically find the baseline and fit the points with a linefunction, automatically find peaks and compare the results with thesecond derivative, set a parameter's lower bound, and perform the fit.

Getting Started1) Open the PFM_Examples.OPJ file if it is not currently open.

2) In the Project Explorer, activate the Graph1 graph window located inthe Chromatography Data folder.

3) Click the Enter Peak Fitting Session button on the PFM toolbar.

4) Right-click in the blank gray area of the wizard next to the Helpbutton. This action opens a shortcut menu.

5) Select Show Wizard Map from the shortcut menu. This action de-selects the menu command and hides the wizard map.

6) Click the wizard's Maximize button to maximize the wizard'sdisplay on your screen. (Note: If you are continuing from Tutorial 1,you may need to Restore Down first, and then maximize the wizard.)

7) Click the Line Plot button located below the wizard graph. Thepeak data displays as a line data plot in the wizard.

Page 24: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

18 • Tutorial 2, Analyzing Data with Hidden Peaks Peak Fitting Wizard Tutorials

Selecting a Range of Data1) Click the Select Range button.

2) Drag the left data marker to approximately X = 11.

3) Press ENTER to fix the marker and exit the range selection mode.The graph updates displaying the selected range.

Selecting a Range of Data

Defining the Baseline1) Click the Next button to advance to the Precondition Data wizardpage.

2) Click the Next button to advance to the Baseline Points page.

3) Select the Auto Find radio button.

The Auto Find baseline detection algorithm looks for points in thesmoothed first and second derivatives that are within a threshold of zero.Notice that at the current threshold level, a baseline point is detected on apeak.

Spin buttons are provided to scale the threshold up or down, thusincreasing or decreasing the number of points found.

4) Click the Number of Points down spin button once.

The wizard graph updates displaying the resultant baseline points. Atthis threshold level, the point on the peak is no longer detected.

Page 25: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Tutorials Tutorial 2, Analyzing Data with Hidden Peaks • 19

Finding Baseline Points using the Baseline Detection Algorithm

5) Click the Next button to advance to the Create Baseline wizard page.

By default, the detected baseline points are fit using a line function.

Fitting the Baseline Points with a Line Function

6) Click the Next button to advance to the Baseline Conditioning wizardpage.

Page 26: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

20 • Tutorial 2, Analyzing Data with Hidden Peaks Peak Fitting Wizard Tutorials

Finding the Peaks1) Click the Next button to advance to the Peak Finding wizard page.

2) With the Threshold Height radio button selected in the Find Peaksgroup, click the Pick Peaks button. Thirteen peaks are found and markedwith magenta vertical lines in the wizard graph.

Finding Peaks Automatically

3) Click the 2nd Derivative button on the wizard to display thesecond derivative below the peak and baseline graph layer.

Page 27: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Tutorials Tutorial 2, Analyzing Data with Hidden Peaks • 21

Displaying the Second Derivative

4) Click the Enlarger button on the wizard and enlarge the area onthe graph between approximately X = 12 and X = 17 (see the followingfigure).

Area to Enlarge with the Enlarger Tool

Page 28: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

22 • Tutorial 2, Analyzing Data with Hidden Peaks Peak Fitting Wizard Tutorials

Updated Wizard Graph

5) Click the Threshold Height down arrow once and then re-click thePick Peaks button. One additional peak is found in the peak data, with acenter at 13.

Finding Additional Hidden Peaks

Page 29: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Tutorials Tutorial 2, Analyzing Data with Hidden Peaks • 23

6) Click the Rescale button on the wizard to rescale the wizardgraph axes to their full range.

7) Click the 2nd Derivative button on the wizard to turn off thedisplay of the second derivative.

8) Click the Next button to advance to the Define Peaks wizard page.

9) Click the Add button and then double-click to define the negativepeak at approximately X = 19.

Manually Adding Peaks

10) Click the Done button.

11) Click the Next button to advance to the Peak Edit Control wizardpage.

Setting a Parameter's Lower BoundYou can set simple constraints for parameters such as lower and upperbounds, as well as general linear constraints. In this example, you willset a lower bound for the second peak's area parameter. You will set thislower bound to zero to prevent the area from going negative during theiterative procedure.

1) Click the Parameter Display button on the wizard to open thePeak Parameters Display dialog box.

Page 30: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

24 • Tutorial 2, Analyzing Data with Hidden Peaks Peak Fitting Wizard Tutorials

2) For the Area parameter of peak 2, select the LBound check box. (Tip:First click on the text “Area” in the Parameter column for Peak #2. Thisaction highlights the entire row. Then scroll or resize the dialog box toview and select the LBound check box.)

3) For this same parameter, double-click in the Lower Bound field toenter the editing mode. Then type 0.0.

Setting the Lower Bound for a Parameter

4) Click the OK button to close the dialog box.

Performing the Fit1) Click the Next button to advance to the Fit wizard page.

2) Click the Fit button to perform, at most, 10 Levenberg-Marquardtiterations, as specified in the Number of Iterations drop-down list (andthe Tolerance text box).

The fit should converge in less than 10 iterations. The output view boxlists the number of iterations performed and the reduced chi-square value.

Additionally the updated fit curve displays in the wizard graph.

3) Click the Individual Peaks button located below the wizardgraph to display the fit curves for the individual peaks.

Page 31: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Tutorials Tutorial 3, Creating a Customized Wizard • 25

Performing the Fit

Reporting the Fitting Results1) Click the Next button to advance to the Results page.

2) In the Peak Characterization Report group, click the Plot button.

3) In the Fitting Function Parameters group, click the Worksheet button.

Note: The graph and worksheet report are created in the Origin project.Because the wizard remains active, the graph and worksheet displaybehind the wizard.

Exiting a Peak Fitting Session1) Click the Finish button to close the Peak Fitting wizard and access thegraph and worksheet reports.

Tutorial 3, Creating a Customized WizardAs you use the Peak Fitting wizard to analyze different sets of data, youmay find that for each dataset, you perform no actions on some wizardpages and that you perform the same actions on other wizard pages. For

Page 32: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

26 • Tutorial 3, Creating a Customized Wizard Peak Fitting Wizard Tutorials

example, perhaps you never precondition your data or apply a smoothingfilter, and thus you perform no actions on the Precondition Data page.Similarly, perhaps you always use the wizard's baseline finding algorithmon the Baseline Points page.

If you step through the wizard pages in a similar way when analyzingdata, you can simplify the wizard by hiding pages that you either performno actions on or ones that you always perform the same actions on. Youcan then save this customized wizard to a new toolbar button for futureaccess. This tutorial steps you through the process of creating acustomized wizard.

Note: For a list of wizard actions that can be saved to a custom wizard,see “Peak Fitting Wizard Reference”.

Getting Started1) Open the PFM_Examples.OPJ file if it is not currently open.

2) In the Project Explorer, activate the Graph5 graph window located inthe Chromatography Data folder.

3) Click the Enter Peak Fitting Session button on the PFM toolbar.

4) Right-click in the blank gray area of the wizard next to the Helpbutton. This action opens a shortcut menu.

5) Select View Mode:Full from the shortcut menu. This action addscheck boxes to the page icons on the wizard map. These check boxesallow you to disable the display of wizard pages.

Page 33: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Tutorials Tutorial 3, Creating a Customized Wizard • 27

Full View Mode

Stepping Through the WizardPerforming Actions and Hiding PagesThe first wizard page, Choose Data, allows you to select a range of data.It also allows you to initialize settings in the Peak Fitting wizard from aninitialization file. If you do not require the range selection feature foryour peak analysis, and if you do not read an initialization file, then youcan hide this wizard page from view.

Note: If you want to read an initialization file, then you should not hidethis page from view.

1) Click in the Choose Data check box on the wizard map to clear thecheck box.

Clearing a Check Box on the Wizard Map

Page 34: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

28 • Tutorial 3, Creating a Customized Wizard Peak Fitting Wizard Tutorials

This action sets the Choose Data page as hidden when you exit thewizard's Full View mode. Additionally, after you save your customizedwizard to a button, this wizard page will not display when you click yourcustom button. Furthermore, no actions on this page will be performedwhen this page is skipped.

2) Click in the Precondition Data check box on the wizard map to clearthe check box. This action activates the page and also sets it as hiddenwhen you exit the wizard's Full View mode. No actions on this page willbe performed when this page is skipped.

3) Click in the Baseline Points check box on the wizard map to clear thecheck box. This action activates the page and sets this page as hiddenwhen you exit the wizard's Full View mode.

4) Click the Auto Find radio button on the Baseline Points wizard page.Baseline points are found using the wizard's baseline finding algorithm.

When this page is skipped when you run your customized wizard, thewizard will automatically perform the Auto Find baseline findingalgorithm.

5) Click in the Create Baseline check box on the wizard map to clear thecheck box. This action activates the page and sets this page as hiddenwhen you exit the wizard's Full View mode.

Note that the Create Baseline radio button on the Create Baseline wizardpage is selected, and that the Use Function radio button is selected withthe line function active. When this page is skipped, the wizard willautomatically create the baseline by using the line function.

6) Click in the Baseline Conditioning check box on the wizard map toclear the check box. This action activates the page and also sets it ashidden when you exit the wizard's Full View mode. No actions on thispage will be performed when this page is skipped.

7) Click in the Peak Finding check box on the wizard map to clear thecheck box. This action activates the page and sets this page as hiddenwhen you exit the wizard's Full View mode.

8) With the Threshold Height radio button selected in the Find Peaksgroup, click the Pick Peaks button. The wizard's peak detectionalgorithm finds and marks four peaks in the wizard graph. When thispage is skipped, the wizard will automatically find and mark peaks usingthe peak finding algorithm.

9) Click in the Define Peaks check box on the wizard map to clear thecheck box. This action activates the page and also sets it as hidden whenyou exit the wizard's Full View mode. No actions on this page will beperformed when this page is skipped.

10) Click on the "Peak Edit Control" text in the wizard map (not in thecheck box). This action activates the page but does not change its viewstatus.

11) Click on the "Fit" text in the wizard map. This action activates thepage but does not change its view status.

Page 35: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Tutorials Tutorial 3, Creating a Customized Wizard • 29

12) Click the Fit button to perform, at most, 10 Levenberg-Marquardtiterations, as specified in the Number of Iterations drop-down list (andthe Tolerance text box).

13) Click on the "Results" text in the wizard map. This action activatesthe page but does not change its view status.

Saving the Customized Procedure File1) On the Results page, select the Save Procedure File check box.

2) Right-click in the blank gray area of the wizard next to the Helpbutton. This action opens a shortcut menu.

3) Select View Mode:Normal from the shortcut menu. The wizard mapupdates displaying the Peak Edit Control, Fit, and Results wizard pageicons.

The Updated Wizard Map

4) Click the Finish button. This action opens the Button Settings dialogbox.

Page 36: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

30 • Tutorial 3, Creating a Customized Wizard Peak Fitting Wizard Tutorials

The Button Settings Dialog Box

5) With the top, left button selected, type Auto Find Baseline andPeaks in the Tool Tip and the Status Bar text boxes.

6) Click the OK button to close the dialog box and the Peak Fittingwizard. Additionally, a new PFMWiz toolbar displays in the Originworkspace with the button that you just created.

Running the Custom Wizard1) To run your custom Peak Fitting wizard, make sure that Graph5 isstill active and then click the new toolbar button you just created.

(You are re-analyzing Graph5 because replicate datasets are not availablein this project file. You would typically activate a new graph windowcontaining similar data.)

Your custom wizard will open displaying the Peak Edit Control wizardpage. The baseline is already created and the four peaks are alreadymarked.

2) Click the Next button to advance to the Fit page.

3) Click the Fit button to perform, at most, 10 Levenberg-Marquardtiterations.

4) Click the Next button to advance to the Results page.

5) In the Fitting Function Parameters group, click the Worksheet button.

6) Click the Finish button to close the custom Peak Fitting wizard andaccess the worksheet report.

Page 37: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Introduction • 31

Peak Fitting WizardReference

IntroductionAfter clicking the Enter Peak Fitting Session button, the Peak Fittingwizard opens with the active dataset displaying in the wizard graph.

To navigate through the Peak Fitting wizard, click the Next (and Back)buttons, or click the page icons on the wizard map located on the left sideof the wizard. The page icons on the wizard map are color-coded toindicate the active page (green), a page that has not been visited (yellow),a page that has already been visited or skipped (brown), and the lastwizard page (red).

The Peak Fitting wizard includes the following pages:

Choose Data: This page contains controls for selecting the Y fittingdataset and for selecting a range of data for fitting. You can also selectan initialization file on this page. For more information on the datasetcontrols, see "Selecting the Peak Data" on page 35. For moreinformation on initialization files, see "Initializing the Peak FittingWizard" on page 34 and "Saving Settings to an Initialization File" onpage 79.

Precondition Data: This page allows you to precondition and apply asmoothing filter to your data prior to fitting. For more information onthis wizard page, see "Preconditioning the Data" on page 37.

Baseline Points: This page is the first step in specifying the baselinebefore fitting your data. Edit this page to select the baseline points. Formore information on this wizard page, see "Initializing the Baseline" onpage 40.

Create Baseline: After you have selected the baseline points from theBaseline Points wizard page, edit this page to specify how the baseline

Page 38: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

32 • Introduction Peak Fitting Wizard Reference

points will be used to create the baseline. This page also providescontrols for adding, modifying, or deleting baseline points beforecreating the baseline. For more information on this wizard page, see"Defining How the Baseline Points Should be Used to Create a Baseline"on page 42.

Baseline Conditioning: This page allows you to condition the baselinebefore fitting. You can scale the baseline along the Y axis or subtract thebaseline from your peak data. For more information on this wizard page,see "Conditioning the Baseline" on page 44.

Peak Finding: This page contains controls to specify the peak functionand estimate the peak locations. For more information on this wizardpage, see "Specifying the Peak Function and Finding the Peaks" on page46.

Define Peaks: After defining the peak function and finding the peaks,edit this page to add, modify, or delete peaks. For more information onthis wizard page, see "Adding, Modifying, and Deleting Peaks" on page52.

Peak Edit Control: Edit this page to set a different function fordifferent peaks, and to visually adjust the theoretical curve to get the bestinitial parameter values. For more information on this wizard page, see"Assigning Peak-specific Functions and Initializing Parameters" on page55.

Fit: This page allows you to control the fitting procedure and performthe fit. For more information on this wizard page, see "Controlling theFitting Procedure and Performing the Fit" on page 61.

Results: This page allows you to create reports on the fitting functionparameters and the fitting statistics, as well as on the peak characteristics.Additionally, this page provides an option for saving the current fittingvariable values and parameter values to an initialization file, as well asfor saving the wizard page actions to a procedure file. For moreinformation on the result reports, see "Reporting the Results" on page 66.For more information on initialization files and procedure files, see"Initializing the Peak Fitting Wizard" on page 34 and "Saving Settings toan Initialization File" on page 79, and "Creating a Custom Wizard" onpage 80.

The following buttons are available on the Peak Fitting wizard:

Opens a dialog box for manually initializing the parameter values,fixing parameter values, sharing parameters among peaks, and settingparameter constraints including upper and lower bounds and generallinear constraints. For more information, see "Fixing and SharingParameters and Setting Constraints" on page 58.

Enlarge a section of the wizard graph. For more information, see"Enlarging a Section of Interest in the Wizard Graph" on page 53.

Page 39: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Introduction • 33

Scroll the wizard graph axes left and right after enlarging. Formore information, see "Enlarging a Section of Interest in the WizardGraph" on page 53.

Return the wizard graph to the full axis scales. For moreinformation, see "Enlarging a Section of Interest in the Wizard Graph" onpage 53.

Display the residual plot. For more information, see "Checking theFit By Reviewing the Residuals" on page 64.

Display the second derivative of the peak data. For moreinformation, see "Locating Hidden Peaks" on page 53.

Display confidence bands. For more information, see "SettingConfidence and Prediction Band Levels" on page 63.

Display prediction bands. For more information, see "SettingConfidence and Prediction Band Levels" on page 63.

Display the theoretical curve for the individual peaks. For moreinformation, see "Optimizing the Initial Parameter Values" on page 56.

Display the peak data in the wizard graph as a line or scatterdata plot. For more information, see "Selecting the Peak Data" on page35.

The following shortcut menu commands are available on the Peak Fittingwizard:

To open the Peak Fitting wizard’s shortcut menu, right-click in the blankgray area of the wizard next to the Help button.

View Mode: There are two available wizard view modes, normal(default) and full. The Full view mode is a wizard design mode. Thisview mode provides check boxes next to the page icons on the wizardmap. You can hide a wizard page by clearing its check box. This allowsyou to create custom wizards for specific peak analysis. To learn moreabout hiding wizard pages and creating custom wizards, see "Tutorial 3,Creating a Customized Wizard". Additionally, see “Creating a CustomWizard” on page 80.

Action Mode: There are two available action modes, active (default)and passive. The passive action mode allows you to switch wizard pageswithout initiating any actions. The passive action mode can be used withthe full view mode when creating a custom wizard. To learn more aboutcreating custom wizards, see "Tutorial 3, Creating a CustomizedWizard". Additionally, see “Creating a Custom Wizard” on page 80.

Page 40: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

34 • Initializing the Peak Fitting Wizard Peak Fitting Wizard Reference

Show Wizard Map: The wizard map on the left side of the wizardprovides navigation through the wizard. You can hide the wizard map atany time by selecting Show Wizard Map from the shortcut menu. Whenthe wizard map is hidden, use the Next and Back buttons for navigation.

Open Editor: The Open Editor command opens the Peak Fittingwizard’s script file in a new instance of the LabTalk Editor. We do notrecommend that you alter the Peak Fitting wizard’s script file.

Initializing the Peak Fitting WizardThe Peak Fitting wizard reads a file for initializing the following settings:

1) Peak and baseline characteristics including the number of peaks, thepeak functions, the baseline function, the initial parameter values,parameter sharing, fixing parameter values, and constraints includinglower and upper bounds and general linear constraints.

2) Report settings including the results for display in the peakcharacterization report and the fitting function parameters report.

3) Properties of the fitting procedure (the number of iterations and thetolerance) and confidence and prediction levels.

The default initialization file is PFM.INI. This file is located in yourOrigin folder. When you start the Peak Fitting wizard, this initializationfile is selected by default on the Choose Data wizard page and is readwhen the wizard is opened. You can select a different initialization fileby clicking the Read button and selecting the file.

The last page of the Peak Fitting wizard, the Results page, provides acontrol for writing to the PFM.INI file or to a custom initialization filethat you specify. This control is available by clicking the Save button inthe Initialization File group. When you click the Save button and specifyan INI file (either PFM.INI or a custom file), the peak and baselinecharacteristics (1) and the report settings (2) are saved to the INI file.The properties of the fitting procedure and confidence and predictionlevels (3) are always saved to the INI file currently selected to write to,independent of whether you click the Save button.

Thus, after you analyze a peak dataset with the Peak Fitting wizard, youcan save your current settings to an initialization file. Then when youselect a similar dataset for analysis, you can select this custom file forinitializing the wizard.

Page 41: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Selecting the Peak Data • 35

Selecting the Peak DataThe Choose Data wizard page contains controls for selecting the Y peakdataset and for selecting a range of data for fitting.

Note: For information on initialization files, see "Initializing the PeakFitting Wizard" on page 34.

The Choose Data Wizard Page Controls

The Dataset Drop-down List

This drop-down list contains all the Y datasets in the current project. Ifyou open the wizard with a worksheet active that has a Y columnselected, or if a graph with data is active, the Y worksheet column(dataset) or the Y dataset of the active data plot is automatically selectedfrom this drop-down list. To specify a different Y dataset for peakfitting, select it from the drop-down list. When you select a Y dataset,the Peak Fitting wizard automatically finds the associated X dataset,respecting column associations in the worksheet.

When a Y dataset is selected from this drop-down list, the dataset and itsassociated X dataset are plotted in the wizard graph.

The Select Range Button

Click this button to define a range of data for peak analysis. Afterclicking this button, data markers display at both ends of the data plotand the Data Selector tool is activated in the wizard graph. Additionally,a Current Marker Position group displays on the wizard page.

Page 42: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

36 • Selecting the Peak Data Peak Fitting Wizard Reference

The Current Marker Position Group

Selecting a Range of Data

To define a range of data, click on the left or right marker and drag it tothe desired location. The XY values of the associated data point displayin the Current Marker Position group. When you complete your rangeselection, press ENTER or double-click on a marker to exit the rangeselection mode.

After selecting a range of data, the From and To view boxes in theDataset group update to display the associated X data values for yourrange selection.

The Full Range Button

Click this button to select the full range of the dataset selected in theDataset drop-down list. If you previously selected a range of the dataset,clicking this button will reset the data markers to the entire range.

Note: If you have used the Edit:Set As Begin and Set As End menucommands to set the worksheet display range before starting the PFMsession, or if you set the graph display range using the Data Selector tool

Page 43: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Preconditioning the Data • 37

and the Data:Set Display Range menu command before starting thePFM session, the wizard's Full Range button will not override theserange settings.

The From and To Text Boxes

These text boxes display the current starting and ending X data values foryour range selection. In addition to customizing the data range using theSelect Range button, you can customize the range by typing the desiredstarting and ending X values in the text box provided. After typing in avalue, press TAB to update the text box and view your change in thewizard graph.

Displaying the Peak Data as a Line or Scatter Data Plot

With any page of the peak fitting wizard active, you can change betweena scatter and a line peak data plot in the wizard graph by clicking the

Line Plot or the Scatter Plot button located in the wizardgraph.

Preconditioning the DataThe Precondition Data wizard page allows you to precondition and applya smoothing filter to your data prior to fitting.

The Precondition Data Wizard Page Controls

Page 44: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

38 • Preconditioning the Data Peak Fitting Wizard Reference

The Data Preconditioning Group

Click the View Options button to precondition your data prior to fitting.This button opens the Precondition Fitting Dataset dialog box.

The Precondition Fitting Dataset Dialog Box

Select the data preconditioning method from the Methods drop-down list.Depending on the selected method, associated text boxes display next tothe Methods drop-down list. For example, if the Subtract an Offset FromData option is selected, a Y Offset text box displays. Type the desiredvalue in the Y Offset text box. The Description view box displays adescription of the currently selected data preconditioning method. Thesedescriptions are reproduced below:

1) Subtract an offset from data. Subtract the data by a given value Y0.

2) Subtract mean (1) from data. Average the data between row R1 andR2, then subtract the resulting mean from the data.

3) Subtract mean (2) from data. Average the data between X1 and X2,then subtract the resulting mean from the data.

4) Subtract mean (3) from data. Subtract the mean of the first N rowsfrom the data.

5) Subtract mean (4) from data. Subtract the mean of the last N rowsfrom the data.

6) Subtract mean (5) from data. Subtract the mean of all points to theleft of X from the data.

7) Subtract mean (6) from data. Subtract the mean of all points to theright of X from the data.

Page 45: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Preconditioning the Data • 39

8) Shirley baseline subtraction (1). Subtract the data using the Shirleymethod (see Note below). R1 and R2 are the minimum and maximumrow numbers that correspond to the energy range. N0 is the requiredfinal baseline height. Note that this operation is slow.

9) Shirley baseline subtraction (2). Subtract the data using the Shirleymethod (see Note below). E1 and E2 designate the energy range. N0 isthe required final baseline height. Note that this operation is slow.

10) Tougaard baseline subtraction (1). Subtract the data using theTougaard method. R1 and R2 are the minimum and maximum rownumbers that correspond to the energy range. B1 is an adjustableparameter. Note that this operation is slow.

11) Tougaard baseline subtraction (2). Subtract the data using theTougaard method. E1 and E2 designate the energy range. B1 is anadjustable parameter. Note that this operation is slow.

12) Tougaard baseline subtraction (3). Subtract the data using theTougaard method. R1 and R2 are the minimum and maximum rownumbers that correspond to the energy range. N0 is the required finalbaseline height. Note that this operation is slow.

13) Tougaard baseline subtraction (4). Subtract the data using theTougaard method. E1 and E2 designate the energy range. N0 is therequired final baseline height. Note that this operation is slow.

14) Straight-line baseline subtraction (1). Subtract the data using theStraight-line method. R1 and R2 are the minimum and maximum rownumbers that correspond to the energy range. N0 is the required finalbaseline height. Note that this operation is slow.

15) Straight-line baseline subtraction (2). Subtract the data using theStraight-line method. E1 and E2 designate the energy range. N0 is therequired final baseline height. Note that this operation is slow.

Note: For reference information on the Tougaard baseline subtractionmethod, see S. Tougaard, Surf. Sci. 216, 343 (1989). For referenceinformation on the Shirley baseline subtraction method, see D. A.Shirley, Phys. Rev. B5, 4709 (1972). For a review of both methods, seeS. Tougaard and C. Jansson, "Comparison of Validity and Consistency ofMethods for Quantitative XPS Peak Analysis", Surf. Interface Anal. 20,Issue 13, 1013.

To perform the preconditioning method, click the Run button. Whenfinished editing this dialog box, click the OK button.

The Filters Group

Select a smoothing filter method from the Filters drop-down list.

1) Select Savitsky-Golay to smooth the data using the Savitsky-Golayfilter method. Specify the degree of the underlying polynomial from thePolynomial Order spin box. Specify the size of the smoothing windowfrom the Points to the Left and the Points to the Right spin boxes. (You

Page 46: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

40 • Initializing the Baseline Peak Fitting Wizard Reference

can make the smoothing window asymmetric about a particular datapoint.)

Note: To use this smoothing filter method, the X data must be evenlyspaced.

2) Select Adjacent Averaging to smooth the data using adjacentaveraging. Specify a number that controls the degree of smoothing in theassociated text box. If you enter an odd number n, then n points are usedto calculate each averaged result. If you enter an even number m, thenm+1 points are used to calculate each averaged result. The smoothedvalue at index i is the average of the data points in the interval [i-(n-1)/2,i+(n-1)/2], inclusive.

3) Select FFT Filter to smooth the data by FFT filtering. Specify thenumber of points at a time to be considered by the smoothing routine inthe associated text box. The smoothing is accomplished by removingFourier components with frequencies higher than 1/(n deltat), where n isthe number of data points considered at a time and deltat is the time (ormore generally the abscissa) spacing between adjacent data points.

After selecting the smoothing filter, click the Run Filter button toperform the operation.

The Restore Data Button

Click this button to undo any preconditioning or smoothing filter that youapplied to the data.

Initializing the BaselineThe Baseline Points wizard page is the first step in specifying thebaseline before fitting your data. Edit this page to select (or initialize, ifyou will be allowing the baseline to vary during the fit) the baselinepoints. You can select a constant or a reference dataset, or you cangraphically define the baseline points or use the PFM's baseline findingalgorithm.

If you graphically define the baseline points, use an existing dataset, oruse the wizard's baseline finding algorithm, then after initializing thebaseline points, select the Create Baseline wizard page to specify how thebaseline points will be used to create the baseline. The Create Baselinewizard page is unavailable if you select a constant for the baseline.

Page 47: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Initializing the Baseline • 41

The Baseline Points Wizard Page Controls

Selecting the Baseline Points

There are four methods for selecting the baseline points:

1) Select the Constant radio button to specify two baseline pointsdetermined by the Y = text box value. The two baseline points are:(XBegin, Y=Value) and (XEnd, Y=Value).

Note: If you select this radio button, then the Create Baseline wizardpage is not available.

2) Select the Auto Find radio button to find baseline points based on thewizard's internal baseline detection algorithm. This algorithm looks forpoints in the smoothed first and second derivatives that are within athreshold of zero. Up and down arrow buttons are provided to scale thethreshold up (by 2) or down (by 0.5), thus increasing or decreasing thenumber of points found. Each time you click the up or down arrowbutton, the wizard graph updates displaying the resultant baseline points.

3) Select the User Defined radio button to define baseline points usingthe Screen Reader tool. After selecting this radio button, the ScreenReader tool is activated in the wizard graph and a Current MarkerPosition group displays on the wizard page. As you click at a location inthe wizard graph, the XY values of the associated point display in theCurrent Marker Position group. To define a baseline point, double-clickat the desired location or click once and press ENTER. When finisheddefining baseline points, click the Done button.

To force the defined baseline points to fall on the plotted dataset, selectthe Points in Data check box. In this case, after you define the baselinepoints and click the Done button, Origin will find the nearest data point(in X) from the original dataset for each baseline point, and will thenmove the baseline point so that it shares the same Y value as this originaldataset point.

Page 48: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

42 • Defining How the Baseline Points Should be Used to Create a Baseline Peak Fitting Wizard Reference

Note: To delete the current user defined baseline points, click theRecreate button. In addition to deleting the current baseline pointsselection, this button re-activates the Screen Reader tool in the wizardgraph.

4) Select the Use Existing Dataset radio button to specify a dataset to useas the baseline points from the associated drop-down list. The drop-down list includes all Y datasets in the project, except for the peakdataset and associated fitting datasets (if any have been created).

Defining How the Baseline Points Shouldbe Used to Create a Baseline

After you have initialized the baseline points from the Baseline Pointswizard page, edit the Create Baseline wizard page to specify how thebaseline points will be used to create the baseline. You can also use thispage to add, modify, or delete baseline points.

Note: If you selected the Constant radio button on the Baseline Pointswizard page, then the Create Baseline wizard page is not available.

The Create Baseline Wizard Page Controls

Page 49: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Defining How the Baseline Points Should be Used to Create a Baseline • 43

Modifying the Baseline PointsSelect the Modify Baseline Points radio button to access the baselinemodification tools.

Note: After modifying the baseline points, you must select the CreateBaseline radio button on this wizard page to specify how the baselinepoints will be used to create the baseline. You cannot proceed in thewizard until completing this step.

1) Click the Add button to add baseline points. The Add buttonactivates the Screen Reader tool in the wizard graph. Additionally, aCurrent Marker Position group displays on the wizard page. As youclick at a location in the wizard graph, the XY values of the associatedpoint display in the Current Marker Position group. To add a baselinepoint, double-click at the desired location or click once and pressENTER. When finished adding baseline points, click the Done button.

To force the defined baseline points to fall on the plotted dataset, selectthe Points in Data check box. In this case, after you define the baselinepoints and click the Done button, Origin will find the nearest data point(in X) from the original dataset for each baseline point, and will thenmove the baseline point so that it shares the same Y value as this originaldataset point.

2) Click the Modify button to modify the baseline points. The Modifybutton activates the Data Reader tool in the wizard graph. Drag a datapoint to a new location. When finishing modifying the location of thedata points, click the Done button.

3) Click the Delete button to delete a point from the baseline. TheDelete button also activates the Data Reader tool in the wizard graph.Double-click on the desired data point to delete it. Alternatively, click ona point and press ENTER to delete it.

Fitting the Baseline Points with aFunctionSelect the Create Baseline radio button to specify how the baseline pointswill be used to create the baseline.

Select the Use Function radio button and then select a fitting functionfrom the drop-down list. The following baseline functions are provided:

Line Poly5 ExpGrow2

Parabola ExpDec1 Hyperbl

Cubic ExpDec2

Poly4 ExpGrow1

Page 50: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

44 • Conditioning the Baseline Peak Fitting Wizard Reference

For more information on these functions, see "Peak and BaselineFunction Reference".

Connecting the Baseline Points with aLineSelect the Create Baseline radio button to specify how the baseline pointswill be used to create the baseline.

Select the Connect Points with Line radio button to display a straight linebetween consecutive baseline data points.

Connecting the Baseline Points with aSplineSelect the Create Baseline radio button to specify how the baseline pointswill be used to create the baseline.

Select the Connect Points with Spline radio button to connect thebaseline data points with a cubic spline connection.

Note: This radio button is unavailable if the number of points in the peakdataset exceeds 900.

Conditioning the BaselineAfter you have created the baseline, edit the Baseline Conditioningwizard page to shift the baseline along the Y axis or to subtract thebaseline from the peak data.

The Baseline Conditioning Wizard Page Controls

Page 51: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Conditioning the Baseline • 45

Scaling the Baseline Along the Y AxisClick the Scale Baseline button to shift the baseline along the Y axis at aspecified location on the peak data plot. After clicking the ScaleBaseline button, the Data Display tool opens and a Current MarkerPosition group displays on the wizard page. As you click on data pointson the peak data plot in the wizard graph, the associated XY valuesdisplay in the Current Marker Position group. Double-click at thedesired location or click once and press ENTER. Origin finds thecorresponding Y value for the baseline data at this same X value. Originthen calculates the difference between the peak Y value and the baselineY value and adds this amount to the entire baseline.

Subtracting the Baseline From thePeak DataIn deciding whether or not to subtract the baseline from your peak data,you should consider the relative number of peaks in the peak data, aswell as the complexity of the baseline.

In general, if there are a large number peaks in your peak data, or if thebaseline is very complex, it may be best to subtract the baseline from thepeak data prior to fitting the peak data. If you don't subtract the baselinefrom the peak data, but instead fit the baseline with the peak data(allowing the baseline to vary), smaller peaks that are close to thebaseline could cause the baseline to stray during the fitting process.Additionally, small differences in the peak shape in your peak dataversus the model could cause the baseline to stray during the fittingprocess.

Subtracting the baseline also reduces the number of dimensions in theparameter space that the chi-square minimization algorithm has to workwith, and this may improve the quality of the fit.

The main advantage of fitting the baseline along with the peak data is toavoid any additional errors that could be introduced in the fitting processby the baseline subtraction process. When the baseline is fit along withthe peaks, the fitting model describes all of the data, and is therefore astatistically complete fit.

Page 52: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

46 • Specifying the Peak Function and Finding the Peaks Peak Fitting Wizard Reference

Specifying the Peak Function and Findingthe Peaks

After creating and conditioning the baseline, edit the Peak Findingwizard page to specify the peak function and estimate the peak locations.

Note: You can specify a different function for different peaks on thePeak Edit Control wizard page. For more information, see "AssigningPeak-specific Functions and Initializing Parameters" on page 55.

The Peak Finding Wizard Page Controls

Selecting the Peak FunctionClick the Set/Modify button to select a fitting function to fit the peakdata. You can either select a built-in function, a user-defined function, ora modified built-in or user-defined function. After editing the associateddialog boxes and returning to the Peak Finding wizard page, the functionname displays in the associated view box.

The Set/Modify button opens the Select Fitting Function dialog box.

Page 53: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Specifying the Peak Function and Finding the Peaks • 47

The Select Fitting Function Dialog Box

The Available Functions list box lists the available peak fitting functions.By default, the following peak functions are provided:

Gaussian Asym2Sig Sine

Gauss2 Weibull3 SineSqr

EMGauss LogNormal SineDamp

Lorentz GCAS Power2

Voigt ECS Pulse

PsVoigt1 CCE DLL_Func *

PsVoigt2 BiGauss

Pearson7 InvsPoly

* Note: DLL_Func is a sample peak fitting function provided in anexternal DLL. For more information on using external DLL functions,see "Peak and Baseline Function Reference".

All built-in functions are included in this list box. To modify the list offunctions, edit the [FittingFunctions] section of the PFM.INI file locatedin the Origin software folder. For more information on these functions,see "Peak and Baseline Function Reference".

When you select a function from the Available Functions list box, theFunction Name, Function Type, # of Parameters, Function Parameters,and Function Description view boxes update to display the respectivefunction information. This information is read from the function's FDFfile located in the \FITFUNC subfolder.

Page 54: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

48 • Specifying the Peak Function and Finding the Peaks Peak Fitting Wizard Reference

Modifying and Defining New FunctionsClick the Modify button to modify a function listed in the AvailableFunctions list box. Click the Define New Function button to define anew fitting function. Both buttons open a similar dialog box. However,the dialog box is titled and behaves differently depending on whether youare modifying an existing function or defining a new function.

The Define New Peak Function (or Modify Peak Function) DialogBox

If you are modifying an existing function, edit this dialog box to renamethe function, initialize the parameters, or define the lower and upperbounds. If you are modifying a user-defined function, you can alsomodify the function's definition. However, for built-in functions, youcan not modify the function description.

If you are defining a new function, edit this dialog box to name thefunction, select the function form, define the function, initialize theparameters and define their lower and upper bounds.

Page 55: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Specifying the Peak Function and Finding the Peaks • 49

Naming the Function

The Name text box lists the default function name. For new functions,default names like Peakn are suggested. You can modify these names,but do not use names that are already in use.

Selecting the Function Form

There are three forms of user-defined functions available in the DefineNew Peak Function dialog box:Expression: f(x)Script: y=f(x)Conv: y=f(t)*g(x-t)

----

1) Expression

Define your function in an expression format such as:

Y0+A*X+B*X*X

where Y0, A and B are parameters, and X is the independent variable.User-defined functions of this form are fast.

----

2) Script

This form allows you to define functions with multiple lines andintermediate variables such as:

temp1=A*X;

temp2=B*X*X;

Y=temp1+temp2+C;

where temp1 and temp2 are temporary variables. Y is the dependentvariable. The advantage of this form is that you can easily define a largefunction.

The following example defines a peak function which is a modifiedversion of the Gaussian function.

yA

we

x xc

wB

x xc

w= ⋅− −

+ ⋅ −

π2

22 4

a. Type MyFunc in the Name text box.

b. Select "Script y=f(x)" from the Form drop-down list.

c. Type in the following function definition in the Fitting FunctionDefinition text box:

temp1=(X-XC)/W;

temp2=temp1*temp1;

Y=A*exp(-2*(temp2+B*temp2*temp2))/(W*sqrt(PI/2));

Temp1 and temp2 are temporary variables.

Page 56: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

50 • Specifying the Peak Function and Finding the Peaks Peak Fitting Wizard Reference

d. In the Names text box for the "Other3" parameter, type B.

e. In the Init. Values text box for B, type 0.05.

f. In the L. Bounds text box for B, type 0.

g. Make sure that the Use Area in Definition check box is selected as Ais the area in this definition.

h. Click the Save button and then click the OK button to close the dialogbox.

The MyFunc function is now available from the Available Functions listbox in the Select Fitting Function dialog box.

----

3) Convolution

New fitting functions can be defined that are convolutions of built-infunctions. The following example defines a function that is aconvolution of a Lorentzian and Gaussian function (i.e. a Voigt function).

a. Type MyConv in the Name text box.

b. Select "Conv y=f(t)*g(x-t)" from the Form drop-down list.

c. Type in the following function definition in the Fitting FunctionDefinition text box:

%func1=gaussian(0,A,wG); /*%func1 is a placeholder.*/

%func2=lorentz(xc,1,wL);

y=conv(-100,+100,%func1,%func2,1.0e-3);

In this example, Gaussian and Lorentz are two built-in functions whichtake three parameters each. In this instance, the independent variable isimplicit. Note that for a function defined as a convolution of twofunctions, certain parameters must be given simplifying values. In thisexample, the Gaussian peak center is set to zero and the Lorentzian areato 1. This is to avoid over-parameterization of the function. Though'[-100,+100]' was chosen as the X range for the convolution in thisexample, any range could be used up to a maximum range of[-1.0e-60,1.0e60]. The last argument in the conv( ) function (1.0e-3) isthe degree of precision used in evaluating the convolution.

d. Change the name of the Width parameter from w to wG.

e. In the Names text box for the "Other3" parameter, type wL.

f. In the L. Bounds text box for wL, type 0.

g. Make sure that the Use Area in Definition check box is selected as Ais the area in this definition.

h. Click the Save button and then click the OK button to close the dialogbox.

The MyConv function is now available from the Available Functions listbox in the Select Fitting Function dialog box.

Page 57: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Specifying the Peak Function and Finding the Peaks • 51

Assigning Parameter Names

Type the parameter names in the Names text boxes provided. The firstthree parameters must be prefixed xc (center), A (area or height), and w(width).

Note: When the Use Area in Definition check box is selected, the secondparameter in the peak function definition is the area of the peak. Whencleared, it is the height of the peak. The default is to use the area.

Assigning Initial Parameter Values

Type the initial parameter values in the Init. Values text boxes provided.Use these values to initialize the fitting function.

Defining the Lower and Upper Bounds

Type the lower and upper bounds for the parameters in the L. Boundsand U. Bounds text boxes provided. The wizard always presets somebounds for the parameters of peak functions. For example, the area (A)and width (w) always have greater-than-zero lower bounds.

Defining the Fitting Function

Type the definition of the fitting function in this text box.

Saving the Function

Press the Save button to save the current dialog box settings to thefunction definition file. Additionally, the function is added to theAvailable Functions drop-down list in the Select Fitting Function dialogbox.

Automatically Finding the PeaksClick the Pick Peaks button to find positive and negative peaks in thepeak data. Peaks are marked by vertical green lines in the wizard graph.These peak locations provide an estimate of the peak's center and height,which is used for the initial parameter values during the fitting.

Note: You can add, modify, and delete defined peaks on the next wizardpage (Define Peaks).

1) When the Threshold Height radio button is selected and the PickPeaks button is clicked, the peak finding algorithm searches thesmoothed second derivative of the peak data looking for peaks that areabove a noise threshold. The noise threshold is the standard deviation ofthe original peak data, and can be increased or decreased from theassociated combo box to drop or add peaks. (As you increase this value,the algorithm finds less peaks.)

Page 58: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

52 • Adding, Modifying, and Deleting Peaks Peak Fitting Wizard Reference

2) When the Number of Peaks radio button is selected and the PickPeaks button is clicked, the peak finding algorithm searches thesmoothed second derivative of the peak data looking for the n tallestpeaks, where n is specified in the associated combo box.

After you edit the Threshold Height or the Number of Peaks comboboxes, click the Pick Peaks button to update the wizard with the resultantpeak markers. To fine tune the peak finding selection, continue to re-editthe combo boxes and click the Pick Peaks button.

Note: The Peak Finding wizard supports a maximum of 240 peaks perdataset.

To improve your view of the peak finding algorithm results, you can

enlarge a section of your data. To do this, click the Enlarger buttonlocated below the wizard graph and drag a region of interest in the wizardgraph. Buttons are also available to scroll the X axis and to restore thefull axes scale. For a complete discussion of these buttons, see "Adding,Modifying, and Deleting Peaks" on page 52.

To delete the peak markers, click the Clear All button.

Defining Peaks from a Data FileTo use a dataset (that is saved as an ASCII file) to define peak locationsin your peak data, click the Read button in the Peak Centers and Heightsgroup. This button opens the Read Peak Centers and Heights dialog box.After selecting your file and clicking the Open button, the wizard graphupdates marking the peaks based on the data file's XY values.

This option is most useful when performing peak fitting on similardatasets. After performing peak fitting on the first dataset, the Resultswizard page provides a button for saving the peak centers and heights toan ASCII file. Then when you analyze the next (similar) dataset, clickthe Read button to access the previously saved peak centers and heightsfor determining the current dataset's peak markers.

For more information on saving peak centers and heights to an ASCIIfile, see "Saving the Peak Locations to an ASCII File" on page 79.

Adding, Modifying, and Deleting PeaksAfter defining the peak function and finding the peaks using the wizard'sinternal peak finding algorithm or an ASCII data file, edit the DefinePeaks wizard page to add, modify, or delete peaks.

Page 59: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Adding, Modifying, and Deleting Peaks • 53

The Define Peaks Wizard Page Controls

Enlarging a Section of Interest in theWizard GraphBefore adding, modifying, or deleting peak markers in the wizard graph,

you can enlarge of section of data using the Enlarger button locatedbelow the wizard graph. After you click this button, drag a rectanglearound the peak(s) of interest. When you release the mouse button, theaxes rescale to display only the selected data. Once you enlarge a regionof interest, you can scroll along the X axis by clicking the Scroll Left

and Scroll Right buttons located next to the Enlarger button.

To return to the full axes scale, click the Rescale button on thewizard.

Locating Hidden PeaksThe wizard's internal peak finding algorithm (on the Peak Finding wizardpage) is designed to locate hidden peaks, as it searches the smoothedsecond derivative of the peak data. If you prefer to skip this peak findingalgorithm and locate your peaks (including hidden peaks) manually, or ifthe peak finding algorithm did not mark all hidden peaks, the wizard

provides a 2nd Derivative button to assist you. Click this button todisplay the second derivative in a graph layer below the peak data. Thepoints where the second derivative reaches a minimum represent pointsof inflection in the peak data, and may be indicative of small or hidden

peaks. The Enlarger button is available to enlarge a section of thesecond derivative or a section of the peak data.

Page 60: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

54 • Adding, Modifying, and Deleting Peaks Peak Fitting Wizard Reference

After turning on the display of the second derivative, click the Addbutton to define new peaks. The Add button activates the Screen Readertool in the wizard graph. Using the second derivative as a guide, double-click to fix a peak location. For more information on defining new peaklocations, see "Adding New Peak Markers" on page 54.

To turn off the display of the second derivative, click a second time onthe 2nd Derivative button.

In addition to viewing the second derivative to help locate hidden peaks,after you perform a fit (on the Fit wizard page) you can click the

Residuals button to review the residual plot. The residual plotrepresents the difference between the fit curve and the actual data points.Non-marked hidden peaks will usually display as peaks in the residualplot. For more information, see "Controlling the Fitting Procedure andPerforming the Fit" on page 61.

Adding New Peak MarkersClick the Add button to define new peak locations in the peak data. TheAdd button activates the Screen Reader tool in the wizard graph.Additionally, a Current Marker Position group displays on the wizardpage. As you click at a location in the wizard graph, the XY values ofthe associated point display in the Current Marker Position group. Todefine a peak marker, double-click at the desired location or click onceand press ENTER. Recall that the peak locations provide an estimate ofthe peak's center and height, which is used for the initial parametervalues during the fitting. When finished defining peak markers, click theDone button.

Modifying the X Location of PeakMarkersTo modify the location of a peak marker, drag the peak marker line to thedesired location. After you drag and click off of a marker, the CurrentMarker Position group displays on the wizard page, displaying thecurrent X location of the marker.

Deleting Peak MarkersClick the Delete button to delete a peak marker from the peak data. Todelete a peak marker, click once on the peak marker line. When finishingdeleting peak markers, click the Done button.

Page 61: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Assigning Peak-specific Functions and Initializing Parameters • 55

Assigning Peak-specific Functions andInitializing Parameters

When you activate the Peak Edit Control wizard page, a theoretical curve(red line plot) displays in the wizard graph, reflecting the currentlyselected function to fit to each peak and the initial parameter values foreach peak function. Edit this wizard page to set a different function fordifferent peaks, and to visually adjust the theoretical curve to get the bestinitial parameter values.

The Peak Edit Control Wizard Page Controls

Selecting the Active PeakActivate a peak by selecting the desired peak number from the PeakNumber drop-down list. You can also double-click on the current drop-down list selection and type the desired peak number. Peaks areenumerated from left to right in the dataset.

You can also select the active peak by clicking on the peak in the wizardgraph. As you move the mouse over the wizard graph, the mouse pointerdisplays as a hand pointer, allowing you to click to select a peak.

Page 62: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

56 • Assigning Peak-specific Functions and Initializing Parameters Peak Fitting Wizard Reference

Selecting the Active Peak in the Wizard Graph

Changing the Function to Fit to thePeakTo change the function to fit to the selected peak, select the new functionfrom the Change Function drop-down list. When you select a newfunction, the view box below the Peak Edit Control group updates toreflect the selected function. The selection you make in this dialog boxeffects only the selected peak, not the entire dataset.

For information on the available functions, see "Peak and BaselineFunction Reference".

Optimizing the Initial ParameterValuesThe peak edit view box on this wizard page includes the following:

1) Active peak data: black symbols.

2) Theoretical curve for the entire dataset: red line.

3) Theoretical curve for the selected (individual) peak: green line.

4) Controls to adjust the height, width, and center of the theoreticalcurve for the selected peak.

The theoretical curve for the selected peak is based on the specified peakfunction and the default parameter values. You can change the height,width, and center of the theoretical curve by dragging one of the redcrossbars to the desired position (height and center) or by dragging oneof the sizing handles on the theoretical curve in the view box (width of

Page 63: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Assigning Peak-specific Functions and Initializing Parameters • 57

the curve). When you resize the theoretical curve using this view box,you are changing the initial parameter values. The changes you make areimmediately visible in the wizard graph if the Update Graph WhenParams. Change check box located below the view box is selected. Ifthis check box is cleared, the wizard graph updates when you click theRedraw button located below the view box.

Note: For more control over the peak parameters, see "Fixing andSharing Parameters and Setting Constraints" on page 58.

In cases where the individual parameters cannot be mapped explicitly toarea, height, or width, the peak edit view box must be handled carefully.The width should be set first, taking care that the height and center stayclose to their desired values. The height should be set next making smallcorrections whenever necessary to restore the width to its preset value.The center should be set last. Please note that small differences betweenthe theoretical curve and the peak data will not affect the fit stage. Theinitialization needs to be close enough to obtain a good fit - that is all.Also, please note that for some functions like the ECS, the peak edit viewbox controls do not correspond exactly to the height, center, or width, butcan be used to vary them. An exact fit is normally not required. Areasonable overlay of the theoretical curve on the peak data is sufficientfor good fitting in most cases.

To expand the X axis scale range in the view box, click the button.To reduce the X axis scale range in the view box, click the button.These buttons only affect the X axis scale of the view box. They have noeffect on the parameter values or the axis scale range in the wizard graph.

As you fine-tune the parameter values for the peaks using the peak editview box, you can see the effect on the theoretical curve for theindividual peaks in the wizard graph. To enable the display of thetheoretical curve for the individual peaks, click the Individual Peaks

button located below the wizard graph.

Note: If the theoretical curve for the individual peaks display in thewizard graph, then they are also included in the graph report accessiblefrom the Results wizard page.

Page 64: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

58 • Fixing and Sharing Parameters and Setting Constraints Peak Fitting Wizard Reference

Displaying the Theoretical Curve for the Individual Peaks in theWizard Graph

As you adjust the height, width, and center of the theoretical curve in theview box, you can more easily see the changes in the wizard graph if you

enlarge the peak. To do this, click the Enlarger button locatedbelow the wizard graph and drag a rectangle around the peak in thewizard graph. Buttons are also available to scroll the X axis and torestore the full axes scale. For a complete discussion of these buttons,see "Adding, Modifying, and Deleting Peaks" on page 52.

Updating the Wizard Graph WhileEditing the Peak Edit View BoxSelect the Update Graph when Params. Change check box to update thewizard graph whenever a change is made in the peak edit view box. Ifthis check box is cleared, click the Redraw button to make the changes tothe wizard graph.

Fixing and Sharing Parameters and SettingConstraints

The Peak Parameters Display dialog box (which is accessed by clicking

the Parameter Display button below the wizard graph) allows you to

Page 65: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Fixing and Sharing Parameters and Setting Constraints • 59

fix parameter values, share parameters among peaks, and set parameterconstraints including upper and lower bounds and general linearconstraints. Additionally, you can select a different function to fit to apeak, and edit the parameter values.

The Peak Parameters Display Dialog Box

Changing the Peak Function

To change the function to fit to the selected peak, double-click on thecurrent function in the Peak Type column. This action opens a drop-down list containing the available peak functions. Select the newfunction from the drop-down list.

Editing Parameter Values

To initialize a parameter to a pre-set value, double-click on the currentparameter value in the Value column and then type the desired value.

To return the parameter value to the previous setting, click the Refreshbutton.

Fixing or Allowing Parameter Valuesto VaryTo prevent a parameter from varying during the iterative procedure,select the parameter's Fix check box.

Page 66: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

60 • Fixing and Sharing Parameters and Setting Constraints Peak Fitting Wizard Reference

Note: If there are a large number peaks in your peak data, or if thebaseline is very complex, and you did not subtract the baseline from yourpeak data, it may be best to fix the baseline parameter values beforefitting. Otherwise, smaller peaks that are close to the baseline couldcause the baseline to stray during the fitting process.

Sharing Parameters Among PeaksTo share parameter values between peaks (for example, the Widthparameter), select the Share check box for each of the peak parametersyou want to share. For example, to share the Width parameter amongpeaks 2 and 4 in your data plot, select the Share check box for the Widthparameter for both peak 2 and peak 4. If a parameter is shared betweenpeaks, there will be only one common version for the specified peaks.

Setting the Parameter ConstraintsYou can set simple constraints for parameters such as lower and upperbounds. To set a bound, select the LBound or UBound check box for therespective parameter. Then double-click on the current Lower Bound orUpper Bound value and type the desired constraint.

In addition to setting the lower and upper bounds, you can set generallinear constraints. To do this, click the Constraints button on the PeakParameters Display dialog box. This button opens the Set General LinearConstraints dialog box.

Setting General Linear Constraints

Enter the constraints in the text box provided. If there is more than oneconstraint, separate constraints by a semicolon (;). To enter constraints

Page 67: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Controlling the Fitting Procedure and Performing the Fit • 61

on multiple lines, press CTRL+ENTER to move the cursor to the nextline.

When entering constraints, the parameter names must be specified usingthe following notation:

ParameterName_PeakNumber

For built-in functions, ParameterName is listed in the FunctionParameters list box of the Select Fitting Function dialog box (clickSet/Modify on the Peak Finding wizard page). Alternatively, parameternames are listed for each built-in function in "Peak and BaselineFunction Reference". For user-defined functions, ParameterName isspecified in the Define New Peak Function dialog box.

PeakNumber is the number listed in the Peak # column of the PeakParameters Display dialog box.

For example, if peak number 5 is set to a Gaussian function, its parameternames for the center, area, and width are xc_5, A_5, and w_5.

When entering constraints, five relational operators are supported: =, <,<=, >, and >=. However, the Peak Fitting wizard treats < as <=.Similarly, the Peak Fitting wizard treats > as >=.

Constraint Example: To limit the distance between the center ofGaussian peak number 2 and the center of Gaussian peak number 1 to 25,type xc_2 - xc_1 <= 25 in the text box.

Note: You can temporarily disable the specified general linearconstraints by clearing the Enable check box. Constraints take effectonly if this check box is selected.

Controlling the Fitting Procedure andPerforming the Fit

The Fit wizard page allows you to control the fitting procedure andperform the fit.

Page 68: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

62 • Controlling the Fitting Procedure and Performing the Fit Peak Fitting Wizard Reference

The Fit Wizard Page Controls

Setting the Number of IterationsSpecify the maximum number (n) of Levenberg-Marquardt iterations toperform when the Fit button is clicked. If the tolerance is reached or anerror occurs before n iterations have been performed, then less than niterations will be performed. The number of iterations actuallyperformed is displayed in the output view box (below the WeightingMethod group).

Setting the ToleranceWhen you click the Fit button, this causes the Peak Fitting wizard to tryto perform, at most, n Levenberg-Marquardt iterations of reduced chi-square, where n is the Iterations value. If the relative change of thereduced chi-square value between two successive iterations is less thanthe Tolerance value, then no more iterations are performed.

Page 69: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Controlling the Fitting Procedure and Performing the Fit • 63

Setting Confidence and PredictionBand LevelsSpecify the desired confidence level for the confidence and predictionbands in the associated text boxes. To display confidence and prediction

bands, click the Confidence Bands button and the Prediction Bands

button located below the wizard graph. To turn off their display,click a second time on the respective button.

Note: If the confidence and prediction bands display in the wizard graph,then they are also included in the graph report accessible from theResults wizard page.

The confidence interval indicates how good your estimate of the value ofthe fit curve is at particular X value. You can claim with 100*a%confidence that the correct value for the fit curve lies within theconfidence interval, where a is the confidence level. (To report theconfidence interval on the parameters after fitting, see “Reporting theFitting Function Parameters and the Fitting Statistics” on page 66.)

The prediction interval is the interval within which 100*a% of all theexperimental points in a series of repeated measurements are expected tofall at particular values of X, where a is the prediction level.

Varying or Fixing the BaselineIf there are a large number peaks in your peak data, or if the baseline isvery complex, and you did not subtract the baseline from your peak data,it may be best to fix the baseline parameter values before fitting.Otherwise, smaller peaks that are close to the baseline could cause thebaseline to stray during the fitting process.

You can fix the baseline parameters by selecting the Fix BaselineParameters check box on the Fit wizard page, or by selecting the baselineparameter's Fix check boxes in the Peak Parameters Display dialog box

(which is accessed by clicking the Parameter Display button ).

Weighting the DataThe Peak Fitting wizard allows you to specify how different data pointsare to be weighted when computing the reduced chi-square value duringthe iterative process. The available weighting methods are:

Page 70: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

64 • Controlling the Fitting Procedure and Performing the Fit Peak Fitting Wizard Reference

1) No weight. The weight for each data point = 1=iw . The sum of

squares = ∑ − 2)( ii fy .

2) Statistical. The weight for each data point =2/1/1 ii yw = . The

sum of squares = ∑ − iii yfy /)( 2 .

3) Instrumental. This option is only available if the worksheetcontaining the peak data includes a Y error column. The weight for each

data point = iiw σ/1= , where iσ is the error size for each data point

as specified in the selected error dataset. The sum of squares =

[ ]2/)(∑ − iii fy σ .

4) Specified Dataset. This option is only available if the worksheetcontaining the peak data includes a Y error column. The weight for each

data point = ii dw /1= , where id is the specified dataset value for

each data point. The sum of squares = [ ]2/)(∑ − iii dfy .

Starting the FittingClick the Fit button to perform, at most, n Levenberg-Marquardtiterations, as specified in the Number of Iterations drop-down list (andthe Tolerance text box). For a discussion on the relationship between theNumber of Iterations drop-down list value and the Tolerance text boxvalue, see "Setting the Tolerance" on page 62.

After performing the Levenberg-Marquardt iterations, the reduced chi-square value and the actual number of iterations performed are listed inthe Output view box. To view the updated parameter values, click the

Parameter Display button to open the Peak Parameters Displaydialog box.

Note: To reset the parameters to their values when first activating thispage, click the Reset button.

Checking the Fit By Reviewing theResiduals

After you perform a fit you can click the Residuals button locatedbelow the wizard graph to review the residual plot. The residual plotrepresents the difference between the fit curve and the actual data points.

Page 71: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Controlling the Fitting Procedure and Performing the Fit • 65

Hidden peaks that were not marked as peaks will usually display as peaksin the residual plot. The following figures illustrate the use of theresidual plot for identifying hidden peaks.

Non-Marked Hidden Peak Revealed by Residuals

Marked Hidden Peak and Residuals

If you locate hidden peaks by reviewing the residuals, return to theDefine Peaks wizard page and add a peak marker for the hidden peak.Then proceed to the Peak Edit Control page and fine-tune the parametervalues using the peak edit view box. Finally, proceed back to the Fitpage and perform additional fitting iterations.

Page 72: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

66 • Reporting the Results Peak Fitting Wizard Reference

Reporting the ResultsThe Results wizard page allows you to create reports on the fittingfunction parameters, fitting statistics, and the peak characteristics. Bothworksheet and graph reports are available. Additionally, you can savethe current peak positions to an ASCII file for initializing peak locationswhen you analyze a similar dataset. You can also save the peak andbaseline characteristics and the report settings to an initialization file forre-use.

The Results Wizard Page Controls

Reporting the Fitting FunctionParameters and the Fitting StatisticsTo select parameter value details that will be saved to a worksheet, clickthe Options button in the Fitting Function Parameters group of theResults wizard page. This button opens the Fitting Function ParameterReport Details dialog box.

Page 73: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Reporting the Results • 67

The Fitting Function Parameter Report Details Dialog Box

In addition to the fitting function parameter values, you can select toreport the following:

1) The standard error on the parameter value.

2) The dependency of the parameter.

3) The parameter confidence interval.

Once you have selected the parameter details to report, click the OKbutton. To save these parameter details to a worksheet named Paramn,click the Worksheet button in the Fitting Function Parameters group.The Peak Fitting wizard will increment n each time a new Paramworksheet is created in the Origin project. The Param worksheet will notbe in view after clicking the Worksheet button, as the Peak Fitting wizardremains active. To view the worksheet, minimize or close the wizard(before closing, review the wizard initialization and procedure fileconcepts reviewed in "Saving Settings to an Initialization File" on page79 and "Creating a Custom Wizard" on page 80). The Param worksheetwill be active if this is the last results worksheet you created. Otherwise,it can be activated from the workspace, from Project Explorer, or theWindow menu.

Page 74: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

68 • Reporting the Results Peak Fitting Wizard Reference

The Param Worksheet

For each peak, the Param worksheet reports:

1) The parameter name.

2) The parameter value obtained in the fitting process.

3) The standard error on the parameter value.

4) The confidence interval. This is calculated based on a large-sampleapproximation using the standard error and the critical value of thestandard normal distribution for the given confidence level.

5) The dependency of the parameter (a value very close to 1 indicatesstrong dependency, and therefore, over parameterization).

Additionally, the Param worksheet reports:

1) SS: Sum of squares of difference between the data and the fit.

∑≤

=

−=Ρend

begin

ii

iiiii yfwS 2)()(

where if is the function value evaluated for data point i , iw is the

weight, and i is incremented by stepi . The PFM implements the

Page 75: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Reporting the Results • 69

Levenberg-Marquardt algorithm to find the parameters Ρ to minimize

)(ΡS . The weight iw specifies the contribution from data point i . For

information on the weighting methods, see "Controlling the FittingProcedure and Performing the Fit" on page 61.

2) Reduced ChiSqr: Reduced chi-square value of fit.

pn

S

d

Seff −

Ρ=Ρ=Ρ )()()(2χ

where )(ΡS is the sum of squares value (see item 1), Ρ is the parameter

vector, d is the degree of freedom, n is the number of data points usedin the fit, and p is the number of varying parameters in fitting.

3) COD: Coefficient of Determination (R^2).

4) Correlation: Correlation coefficient (R).

5) DOF: Number of degrees of freedom, which is the number of datapoints considered minus the number of floating parameters (parametersthat were not fixed).

6) NPoints: Number of data points considered in the fitting process.

7) Confidence: Confidence level used in calculating the predictionbands.

8) Tolerance: Tolerance value to stop iterations.

Reporting the Peak Characteristics ina Worksheet ReportPeak characterization reports can be generated in the form of a worksheetor a graph. Both reports are available from the Peak CharacterizationReport group on the Results wizard page.

To create a worksheet report, first click the Options button that is locatedto the right of Worksheet button in the Peak Characterization Reportgroup. This button opens the Peak Characterization Report Detailsdialog box.

Page 76: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

70 • Reporting the Results Peak Fitting Wizard Reference

The Peak Characterization Report Details Dialog Box

To include a peak characteristic in the report, select the associated checkbox. The following peak characteristics are available. When selected,the peak characteristic is reported for each peak in your peak data.

1) Fitted peak area. Integrate to find the area between the peak functionand the baseline using the parameter values obtained from the fit. Theintegration is performed from ∞− to ∞+ . (In the ReportWksworksheet, this column is named AreaFit.)

2) Fitted peak area contained in fitting range. Integrate to find the areabetween the peak function and the baseline using the parameter valuesobtained from the fit. The integration is performed within the data rangeonly. (In the ReportWks worksheet, this column is named AreaFitT.)

3) Fitted peak area contained in fitting range (%). Integrate to find thearea between the peak function and the baseline using the parametervalues obtained from the fit. The integration is performed within the datarange only. The result is expressed as a percent of the total area. (In theReportWks worksheet, this column is named AreaFitTP.)

4) Peak area by integrating data. Integrate to find the area between thepeak data and the baseline. The integration is performed within the datarange only. (In the ReportWks worksheet, this column is namedAreaIntg.)

Page 77: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Reporting the Results • 71

5) Peak area by integrating data (%). Integrate to find the area betweenthe peak data and the baseline. The integration is performed within thedata range only. The result is expressed as a percent of the total area. (Inthe ReportWks worksheet, this column is named AreaIntgP.)

6) Location for peak maximum height. The X value for the peakmaximum. (In the ReportWks worksheet, this column is namedCenterMax.)

7) Peak gravity center. The X value of the peak center of gravity ( '1m ).

See item 14. (In the ReportWks worksheet, this column is namedCenterGrvty.)

8) Peak maximum height. The Y value for the peak maximum. (In theReportWks worksheet, this column is named MaxHeight.)

9) Full width at half maximum. The peak width at half the peak'smaximum value. (In the ReportWks worksheet, this column is namedFWHM.)

10) Peak variance. Variance of the data, which is the second moment

( 2m ). See item 14. (In the ReportWks worksheet, this column is named

Variance.)

11) Peak skew. Fisher skewness, which is a measure of the degree of

asymmetry of the peak.3

2

3

m

mS = (In the ReportWks worksheet, this

column is named Skew.)

12) Peak excess. Fisher kurtosis, measures the long-tailedness orpeakedness of the peak relative to the normal or Gaussian distribution

with the same mean and variance. 32

2

4 −=m

mE (In the ReportWks

worksheet, this column is named Excess.)

13) Resolution with next adjacent peak.)(5.0 12

12

ww

XXR cc

s +⋅−

= , where

1cX and 2cX are peak centers, and 1w and 2w are constructed base

widths. (In the ReportWks worksheet, this column is namedResolution.)

14) Peak moments. (In the ReportWks worksheet, these columns arenamed Moment3 and Moment4.)

∫∞

=00 )( dxxFm (0th moment or the area of the peak)

∫∞

=0

0

)(1

' dxxxFm

m nn where 1≥n (nth zero-point moment)

Page 78: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

72 • Reporting the Results Peak Fitting Wizard Reference

∫∞

−=0 1

0

)')((1

dxmxxFm

m nn where 2≥n (nth central moment)

15) Width at n% of peak maximum. The peak width at n% of the peak'smaximum value. (In the ReportWks worksheet, this column is namedWidthAtP.)

16) Area above n% of peak maximum. The peak area above the n% ofthe peak's maximum value. (In the ReportWks worksheet, this column isnamed AreaAbove.)

17) Cumulative area to X relative to center. The cumulative fitted areafrom ∞− to X, where X is a specified value relative to the peak center.(In the ReportWks worksheet, this column is named CumArea.)

After completing your selections and clicking the OK button, create yourpeak characteristics worksheet report by clicking the Worksheet button inthe Peak Characterization Report group. The Peak Fitting wizard createsa ReportWksn worksheet. The wizard will increment n each time a newReportWks worksheet is created in the Origin project. The ReportWksworksheet will not be in view after clicking the Worksheet button, as thewizard remains active. To view the worksheet, minimize or close thewizard (before closing, review the initialization and procedure fileconcepts reviewed in "Saving Settings to an Initialization File" on page79 and "Creating a Custom Wizard" on page 80). The ReportWksworksheet will be active if this is the last results worksheet you created.Otherwise, it can be activated from the workspace, Project Explorer, orthe Window menu.

The ReportWks Worksheet

Page 79: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Reporting the Results • 73

Reporting the Peak Characteristics ina Graph ReportIn addition to reporting the peak characterization results to a worksheet,you can generate a graph report. When you create a graph report, thereport will include a graph layer displaying the peak data, the baseline,and the fit curve. Additionally, if you have enabled the display ofconfidence bands, prediction bands, and the fit curves for the individualpeaks in the wizard graph, then these fit results will also display in thereport graph layer. To enable the display of confidence or prediction

bands in the wizard graph, click the Confidence Bands button and

the Prediction Bands button located below the wizard graph. Toenable the display of the fit curves for the individual peaks, click the

Individual Peaks button .

To create a graph report, first click the Options button that is located tothe right of Plot button in the Peak Characterization Report group. Thisbutton opens the Peak Characterization Report Details dialog box.

Page 80: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

74 • Reporting the Results Peak Fitting Wizard Reference

The Peak Characterization Report Field Details Dialog Box

The graph report provides the same options as the worksheet report, withthe additional option for displaying the peak number and function type,which is not optional in the worksheet report. These fitting resultsdisplay beneath the plot of the fitted data in the graph report.

To edit this dialog box, first select the number of fields to display in thegraph report by selecting or typing a value in the Total Number of Fieldscombo box. Note that you can modify this combo box value after youbegin selecting report fields.

After customizing the Total Number of Fields combo box, the AvailableFields on Report Plot updates displaying the specified number of fields.To assign a peak characteristic to a field, select the field from theAvailable Fields on Report Plot list box and then select the desired peakcharacteristic from the Available Results for Display group. For adescription of the available peak characteristics, see "Reporting the PeakCharacteristics in a Worksheet Report" on page 69.

After selecting a peak characteristic from the Available Results forDisplay group, the default graph report title for that peak characteristicdisplays in the Current Field Title text box. Edit the title if desired.

Page 81: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Reporting the Results • 75

After completing your selections and clicking the OK button, create yourpeak characteristics graph report by clicking the Plot button in the PeakCharacterization Report group. The Peak Fitting wizard creates aReportPlotn graph. The wizard will increment n each time a newReportPlot graph is created in the Origin project. The ReportPlot graphwill not be in view after clicking the Plot button, as the wizard remainsactive. To view the graph, minimize or close the wizard (before closing,review the initialization and procedure file concepts reviewed in "SavingSettings to an Initialization File" on page 79 and "Creating a CustomWizard" on page 80). The ReportPlot graph will be active if this is thelast results graph you created. Otherwise, it can be activated from theworkspace, Project Explorer, or the Window menu.

Page 82: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

76 • Reporting the Results Peak Fitting Wizard Reference

The ReportPlot Graph

10 12 14 16 18 20 22

2.0x100

2.5x100

3.0x100

3.5x100

4.0x100

4.5x100

5.0x100

PFM

Dat

a_B

PFMData_A

Peak Analysis Title

BaseLine: Line

Corr Coef=0.99768

COD=0.99536 # of Data Points=757

Degree of Freedom=700SS=0.9617170725

Chi^2=0.001373881532

Date:2/15/01Data Set: PFMData_BSource File: PFMData

Fitting Results

MaxHeight0.337250.122090.334230.497891.039281.229641.641742.131140.916532.37260.812681.709220.687350.078150.04670.0288-0.163221.75958-0.04924

AreaFitTP8.677080.876411.977042.237558.266046.4584916.2190111.020115.1742111.206265.601548.719653.881260.530150.25150.11586-1.1764610.33607-0.37175

FWHM0.978140.272890.224880.170850.302370.199680.375570.196580.214620.179560.262030.193940.214670.257890.204750.152920.274020.223320.28704

CenterGrvty12.992913.0201513.2360713.417413.6805313.9616714.3194914.7340815.0035315.2810215.6378716.0314116.597916.947717.9663418.6092719.0430319.7635920.55382

AreaFitT0.351140.035470.080010.090550.334510.261360.656340.445960.209390.453490.226680.352860.157060.021450.010180.00469-0.047610.41827-0.01504

4.04674

Peak TypeGaussianGaussianGaussianGaussianGaussianGaussianGaussianGaussianGaussianGaussianGaussianGaussianGaussianGaussianGaussianGaussianGaussianGaussianGaussian

Peak #12345678910111213141516171819

In addition to the peak characteristics specified in the PeakCharacterization Report Field Details dialog box, the ReportPlot graphalso includes the following fitting information and results:

1) Source File: The name of the worksheet that contains the fit data.The Peak Fitting wizard creates a hidden worksheet named PFMData thatcontains the fit data. If additional datasets are fit in the same project, thewizard increments this worksheet name.

2) Dataset: The Y fit dataset name. For example, PFMData_b.

Page 83: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Reporting the Results • 77

3) Date: The date that the graph report is created.

4) Chi^2: The reduced chi-square value of the fit. For a definition, see"Reporting the Peak Characteristics in a Worksheet Report" on page 69.

5) COD: Coefficient of Determination (R^2).

6) # of Data Points: The number of data points used in the fitting.

7) SS: Sum of squares of difference between the data and the fit. For adefinition, see "Reporting the Peak Characteristics in a WorksheetReport" on page 69.

8) Corr Coef: Correlation coefficient (R).

9) Degree of Freedom: Number of degrees of freedom, which is thenumber of data points considered minus the number of floatingparameters (parameters that were not fixed).

Computing and Viewing the PeakCharacteristics InteractivelyIn addition to displaying the peak characteristics as a worksheet report ora graph report, the Peak Fitting wizard can compute and display certainpeak characteristics interactively in a dialog box. To do this, click theView button in the Peak Properties group of the Results wizard page.This button opens the Peak Characteristics dialog box.

Page 84: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

78 • Reporting the Results Peak Fitting Wizard Reference

The Peak Characteristics Dialog Box

Click the Prev Peak and Next Peak buttons to select the desired peak.Then select the desired peak characteristic from the Operations list box.Click the Compute button to compute and view the following peakcharacteristics. If necessary, type the requested value in the text boxprovided.

Cumulative area: The cumulative area from ∞− to X. Note: X isrelative to the peak center.

Area between X1 and X2: The area of a strip of the peak between twovertical lines passing through X1 and X2.

Area above a given width: The area above a horizontal line whose endpoints on the peak are W apart.

Area above a given height: The area above a horizontal line at height H.

Area above P% of maximum: The area above a horizontal line at aheight equal to P% of the peak maximum.

X1 and X2 at given height: The left and right intercepts of a horizontalline at height H.

X1 and X2 at P% of maximum: The left and right intercepts of ahorizontal line at a height equal to P% of the peak maximum.

Peak resolution: The peak resolution between two peaks.

Peak 0 - 4th order moments: The peak moments from the 0th to the 4thorder. (0th order = peak area, 1st order = mean retention time, 2nd order

Page 85: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Reporting the Results • 79

= peak variance, 3rd order = skew or vertical asymmetry, 4th order =excess.)

Peak inflection points: The locations of the left and right inflectionpoints.

Peak maximum point: The location of the peak maximum. It may not belocated at peak center of the function definition.

Overlap area: The overlap between two peaks. The area below thebaseline is excluded.

Dataset area between R1 and R2: The area between the dataset andbaseline. Only the section between row R1 and R2 is counted.

Dataset area between X1 and X2: The area between the dataset andbaseline. Only the section between x1 and x2 is counted.

Saving the Peak Locations to an ASCIIFileIf you analyze similar datasets with the Peak Fitting wizard, you can savethe current peak locations to an ASCII file to use for peak initialization ofsubsequent data. To do this, click the Save button in the Peak Centersand Heights group on the Results wizard page. This button opens theSave Peak Centers and Heights dialog box. Specify a file name and clickthe Save button.

To use these peak locations for initialization of subsequent data, click theRead button on the Peak Finding wizard page.

Saving Settings to an Initialization FileIf you analyze similar datasets with the Peak Fitting wizard, you can savethe wizard's current peak and baseline settings as well as the reportsettings to an initialization file. You can then initialize the wizard fromthis initialization file when analyzing subsequent datasets. To save thesesettings to an initialization file, click the Save button in the InitializationFile group on the Results wizard page. To initialize the wizard from afile, click the Read button on the Choose Data page.

The following wizard settings are saved in the initialization file:

1) Peak and baseline characteristics including the number of peaks, thepeak functions, the baseline function, the initial parameter values,parameter sharing, fixing parameter values, and constraints includinglower and upper bounds and general linear constraints.

2) Report settings including the results for display in the peakcharacterization report and the fitting function parameters report.

Page 86: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

80 • Creating a Custom Wizard Peak Fitting Wizard Reference

Note: The properties of the fitting procedure (the number of iterationsand the tolerance) and confidence and prediction levels are always savedto the INI file currently selected to write to, independent of whether youclick the Save button.

Creating a Custom WizardAfter you become familiar with the Peak Fitting wizard, you might findthat you consistently perform the same actions on some wizard pages andno actions on other wizard pages. If you step through the wizard pages ina similar way when analyzing data, you can simplify the wizard byhiding pages that you either perform no actions on or ones that youalways perform the same actions on. You can then save this customizedwizard to a new toolbar button for future access. For step-by-stepinstructions on creating a custom wizard, see "Tutorial 3, Creating aCustomized Wizard".

To hide a page in the wizard, right-click on a blank section of the wizard(for example, next to the Help button) and select View Mode:Full. TheFull view mode is a wizard design mode. This view mode allows you toturn off the display of wizard pages by clearing the associated check boxlocated on the wizard map.

Now you can step through the wizard specifying which pages you wantto hide.

• To hide a page that you never perform any actions on, clear theassociated check box on the wizard map.

• To hide a page that you want to perform the same actions on, manuallyperform the action on the page (for example, click the Pick Peaks buttonon the Peak Finding page) and then clear the page's check box on thewizard map. When this page is skipped when you run your customizedwizard, the wizard will automatically perform the action.

The following actions can be saved to a custom wizard:

Baseline Points page: Selecting a radio button.

Create Baseline page: Making a selection in the Create Baseline group.

Baseline Conditioning page: Clicking the Subtract Baseline button.

Peak Finding page: Clicking the Pick Peaks button. Selecting a built-in,modified, or newly defined function in the Peak Type group.

Fit page: Clicking the Fit button.

------

After clearing the desired wizard map check boxes, perform thefollowing steps to create your custom wizard:

1) On the Results page, select the Save Procedure File check box.

Page 87: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Wizard Reference Creating a Custom Wizard • 81

2) Right-click again on a blank section of the wizard and select ViewMode:Normal from the shortcut menu. The wizard map updatesdisplaying only the non-hidden pages.

3) Click the Finish button. This action opens the Button Settings dialogbox.

The Button Settings Dialog Box

This dialog box allows you to save your current wizard settings andactions to a new toolbar button.

When the Button Settings dialog box opens after you click the wizard'sFinish button, the top left button in the dialog box will be depressed.You can assign your custom wizard settings to this button or you canselect another button. Note: This dialog box does not recognize if abitmap button is already in use.

You can specify a ToolTip and status bar message for your button.

Note: If you want to save your current wizard settings to the defaultPeak Fitting wizard button on the PFM toolbar, select the Save checkbox.

After you click the OK button, Origin adds this button to a new PFMWiztoolbar.

Page 88: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

82 • Creating a Custom Wizard Peak Fitting Wizard Reference

Page 89: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak and Baseline Function Reference Introduction • 83

Peak and BaselineFunction Reference

IntroductionThe Peak Fitting wizard allows you to fit your data to any function.Many common models are provided as built-in functions - which offerexceptional speed and reliability. You can also choose your ownfunctional form through user-defined functions.

To learn how to define your own fitting function, see "Peak FittingWizard Reference".

To learn how to create a user-defined fitting function in an external DLL,see "External DLL Functions" on page 95.

Page 90: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

84 • Peak Functions Peak and Baseline Function Reference

Peak Functions

Gaussian( )

yA

we

x xc

w= ⋅−

−4 2 4 22

2ln( ) ln( )

πxc: Center

A: Peak area

w: Full width at half maximum

LabTalk script access: gaussian(xc, A, w)

Gauss2Gaussian function in the form used for chromatography.

( ) ( )f xA

e x rt= − −

σ πσ

2

2 22/

rt : Time of peak max; the retention time

A: Peak area

σ : Standard deviation of the peak (sd)

LabTalk script access: gauss2(rt, A, sd)

EMGaussExponentially modified Gaussian function.

( )f xA

e e dy

zx x

G Gx xz

y

G

G

G

=

=−

−−

−∞

∫τ π

σστ

στ τ

1

2 2

2 2

1

2

τ : Time of peak max. - retention time

A: Peak area

Gσ : Standard deviation of the peak (sd)

Page 91: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak and Baseline Function Reference Peak Functions • 85

Gx : Time constant of exponential axis (tc)

LabTalk script access: emgauss(rt, A, sd, tc)

Lorentz

yA w

x xc w= ⋅

− +2

4 2 2π ( )

The Lorentzian function.

xc: Center

A: Peak area

w: Full width at half maximum

LabTalk script access: lorentz(xc, A, w)

Voigt

y Aw

w

e

w

w

x xc

wt

dt

L

G

t

L

G G

= ⋅

+ − −

−∞

2 2

2 4 2

3 2 2

2 2

2

ln( )

ln( ) ln( )

A: Peak area

xc: Center

wG : Full Gaussian width at half maximum

wL : Full Lorentzian width at half maximum

ln( )2w

wL

G

is called the damping constant. This function is very slow

to compute due to the infinite integral.

LabTalk script access: voigt(xc, A, wG , wL)

Page 92: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

86 • Peak Functions Peak and Baseline Function Reference

PsVoigt1

y A muw

x xc w

muw

e wx xc

= ⋅ ⋅ ⋅− +

+ − ⋅ ⋅

− −

2

4

14 2

2 2

4 22

2

π

π

( )

( )ln

ln( )

Pseudo-Voigt function, type 1.

A: Amplitude

xc: Center

w: Full width at half maximum

mu: Profile shape factor

Gaussian and Lorentzian have the same width.

LabTalk script access: PsVoigt1(xc, A, w, mu)

PsVoigt2

y A muw

x xc w

muw

e

L

L

G

wx xc

G

= ⋅ ⋅ ⋅− +

+ − ⋅ ⋅

− −

2

4

14 2

2 2

4 22

2

π

π

( )

( )ln

ln( )

Pseudo-Voigt function, type 2.

A: Amplitude

xc: Center

wG : Full Gaussian width at half maximum

wL : Full Lorentzian width at half maximum

mu: Profile shape factor

Gaussian and Lorentzian can have different widths.

LabTalk script access: PsVoigt2(xc, A, wG, wL, mu)

Page 93: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak and Baseline Function Reference Peak Functions • 87

Pearson7

( )( )

y Am

m w wx xc

m m m

= ⋅⋅ −

−⋅ + ⋅ − ⋅ −

−2 2 1

1 42 1

1

12

1

22Γ

Γπ

/

( )

PearsonVII function.

A: Area

xc: Center

w: Full width at half maximum

m: Profile shape factor

LabTalk script access: Pearson7(xc, A, w, m)

Asym2Sig

y A

e ex xc w

w

x xc w

w

= ⋅+

⋅ −+

−− +

−− −

1

1

11

11

2

1

3

2 2/ /

Asymmetric double sigmoidal function.

A: Amplitude

xc: Center

w1 : Width 1

w2 : Width 2

w3 : Width 3

LabTalk script access: Asym2Sig(xc, A, w1, w2, w3)

Weibull3

[ ][ ]

Sx xc

w

w

w

y Aw

wS e

w

w

ww

Sw

ww

= − + −

= ⋅ −

−− +

1

2

2

1

2

2

1

11

1

1

2

2

22

2 2

2

A: Amplitude

xc: Center

Page 94: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

88 • Peak Functions Peak and Baseline Function Reference

w1 : Width 1

w2 : Width 2

LabTalk script access: Weibull3(xc, A, w1 , w2)

LogNormalLog Normal Function.

y H e x x wc= ⋅ − − ⋅( (ln( ) ln( )) /( ))2 22

Xc: Center

H: Height

w: Width

LabTalk script access: lognorml(xc, H, w)

GCASGram-Charlier A-Series.

f xA

eA

iH z

z ii

i

( )!

( )= +

=∑σ π2

12

2

3

4

zx rt= −

σrt : Time of peak max; the retention time

A: Peak area

σ : Standard deviation of the peak (sd)

A3 : Skew

A4 : Excess

H3 : z3-3z

H4 : z4-6z3+3

LabTalk script access: gcas(rt, A, sd, A3, A4)

Page 95: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak and Baseline Function Reference Peak Functions • 89

ECSEdgeworth-Cramer Series.

( ) ( ) ( )f zA

eA

H zA

H zA

H zz( )! !

/= + + +

σ π21

3! 4

10

6

2 2 33

44

42

6

zx rt= −

σrt : Time of peak max; the retention time

A: Peak area

σ : Standard deviation of the peak

A3 : Skew

A4 : Excess

H3 : z3-3z

H4 : z4-6z3+3

H6 : z6-15z4+45z2-15

LabTalk script access: ecs(rt, A, sd, A3, A4)

CCEChesler-Cram equation.

( )( )

( )( )( )[ ] ( )[ ]f x C e C x C C ex C

C C x C x C= + − ⋅ − − ⋅ ⋅

− −− − + −

12

2 3 60 5

42

5 7 8 81 0 5 1. tanh .

C1 : Peak height

C4 : Time of peak max; the retention time

C5 : Standard deviation of the peak.

LabTalk script access: cce(C4, C1, C5, C2, C3, C6, C7, C8)

Page 96: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

90 • Peak Functions Peak and Baseline Function Reference

BiGaussAsymmetrical Gaussian function.

if x < rt

21

2 2/)()( σtrxHexf −−=else

22

2 2/)()( σtrxHexf −−=rt :: Time of peak max; the retention time

H : Peak height

σ 1 : Left standard deviation of the peak (sd1)

σ 2 : Right standard deviation of the peak (sd2)

LabTalk script access: bigauss(rt, H, sd1, sd2)

InvsPoly

yA

Ax xc

wA

x xc

wA

x xc

w

=+ ⋅ ⋅

+ ⋅ ⋅

+ ⋅ ⋅

1 1 2 2 2 3 2

2 4 6

Inverse polynomial function.

A: Amplitude

xc: Center

w: Width

A1: Coefficient

A2: Coefficient

A3: Coefficient

When A1 = 1, A2 = 0, A3 = 0, this function is Lorentzian. When A1 = 1,A2 = 1/2, A3 = 1/6, this function approximates a Gaussian.

LabTalk script access: InvsPoly(xc, A, w, A1, A2, A3)

SineSee "Sine" on page 92.

Page 97: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak and Baseline Function Reference Peak Functions • 91

SineSqrSee "SineSqr" on page 92.

SineDampSee "SineDamp" on page 92.

Power2

y A x xc x xcy A x xc x xc

p

p= ⋅ − <= ⋅ − >

1

2forfor

xc: Center

A: Amplitude

p1: Left exponent

p2: Right exponent

LabTalk script access: Power2(xc, A, p1, p2)

Pulse

y A e ex xc

t

p x xc

t= ⋅ −

− − − −

1 1 2

xc: Center

A: Amplitude

t1: Parameter 3

t2: Parameter 4

p: Parameter 5

LabTalk script access: Pulse(xc, A, t1, t2, p)

Page 98: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

92 • Periodic Peak Functions Peak and Baseline Function Reference

Periodic Peak FunctionsThe fitting functions in this section are periodic functions. They are usedin the same way as the peak functions with two exceptions:

1) These functions will apply to all peaks when selected.

2) Automatic initialization cannot be performed, so you must initializethe function parameters.

SineDamp

y A ex xc

w

x

t= ⋅ ⋅ ⋅ −−0 sin( )π

A: Amplitude

xc: Center

w: Width

t0: Decay time

LabTalk script access: SineDamp(xc, A, w, t0)

Sine

y Ax xc

w= ⋅ ⋅ −

sin( )π

A: Amplitude

xc: Center

w: Width

LabTalk script access: Sine(xc, A, w)

SineSqr

y Ax xc

w= ⋅ ⋅ −

sin ( )2 π

A: Amplitude

xc: Center

w: Width

LabTalk script access: SineSqr(xc, A, w)

Page 99: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak and Baseline Function Reference Baseline Functions • 93

Baseline Functions

Liney A B x= + ⋅A: Intercept

B: Slope

LabTalk script access: Line(A, B)

Parabola

y A B x C x= + ⋅ + ⋅ 2

LabTalk script access: Parabola(A, B, C)

Cubic

y A B x C x D x= + ⋅ + ⋅ + ⋅2 3

LabTalk script access: Cubic(A, B, C, D)

Poly4

y A A x A x A x A x= + ⋅ + ⋅ + ⋅ + ⋅0 1 2 3 42 3 4

LabTalk script access: Poly4(A0, A1, A2, A3, A4)

Poly5

y A A x A x A x A x A x= + ⋅ + ⋅ + ⋅ + ⋅ + ⋅0 1 2 3 4 52 3 4 5

LabTalk script access: Poly5(A0, A1, A2, A3, A4, A5)

Page 100: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

94 • Baseline Functions Peak and Baseline Function Reference

ExpDec1

y Y A ex

t= + ⋅−

0 0

LabTalk script access: ExpDec1(Y0, A, t0)

ExpDec2

y Y A e A ex

t

x

t= + ⋅ + ⋅− −

0 1 21 2

LabTalk script access: ExpDec2(Y0, A1, t1, A2, t2)

ExpGrow1

y Y A ex

t= + ⋅0 0

LabTalk script access: ExpGrow1(Y0, A, t0)

ExpGrow2

y Y A e A ex

t

x

t= + ⋅ + ⋅0 1 21 2

LabTalk script access: ExpGrow2(Y0, A1, t1, A2, t2)

Hyperbl

y YA x

A x= +

⋅+

01

2A rectangular hyperbola function.

LabTalk script access: Hyperbl(Y0, A1, A2)

Page 101: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak and Baseline Function Reference External DLL Functions • 95

External DLL FunctionsExternal DLLs can be used as fitting functions for peaks. A samplefitting function DLL (DLL_FUNC.DLL) is included with the PFM,along with its source code (DLL_FUNC.C), module definition file(DLL_FUNC.DEF), and its required header file (LABFIT.H). Alsoincluded is a function definition file (DLL_FUNC.PKF) for the onefunction which the DLL contains, a simple Gaussian function.

The following steps illustrate the use of this function in the PFM. (Notethat this Gaussian DLL function is already installed for you, but the stepsare included here as an example.)

1) Copy the DLL into your Origin software folder (where the Originexecutable file and the PFM DLL are installed).

2) Copy the function definition file DLL_FUNC.PKF into the Origin\FITFUNC folder.

3) Edit the PFM.INI file so that the PKF file name (in this caseDLL_FUNC) appears in the appropriate list (PeakFuncList orBaseFuncList) in the [FittingFunctions] section of PFM.INI.

----

After you complete these steps and restart Origin and the Peak Fittingwizard, the function displays in the Available Functions list box whenyou click the Set/Modify button on the Peak Finding wizard page. Notethat the name of the DLL, the name of the function in the DLL, and thename of the PKF file are distinct though they are all “DLL_FUNC” inthis example. That is to say:

1) The DLL name is user-defined. A single DLL may contain manyfunctions.

2) The name of the function(s) in the DLL are the actual C identifiersused in the source code to prototype and define the function. Thisfunction name must appear in the EXPORTS section of the moduledefinition (DEF) file with an ordinal number which is used to refer to thefunction.

3) The function definition file (PKF file) must contain the name of theDLL and the ordinal number of the appropriate function in the NAMEfield.

4) The name of the function definition file (PKF file, not the DEF file) isthe name that will appear in the function list box. It is distinct from theDLL name, or the names of any functions exported in the DLL.

The source code for the sample DLL is commented and can be modifiedto provide any function desired.

The function definition file for a DLL function can be modified from thesample DLL_FUNC.PKF provided, but must comply with the followingrequirements:

Page 102: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

96 • External DLL Functions Peak and Baseline Function Reference

1) The fields NPARAM and PARAMETERS should be edited so thenumber of parameters and their names match what is required by theDLL.

2) The parameters must always be in the order “center, area, width,(others...)”.

3) Initial values for parameters can be edited in the INITVAL field. Toleave any parameter to be set by the user, place a “#” in that parameter’sposition.

4) UPPERBOUND and LOWERBOUND fields can also be edited withsome restrictions. Area and width parameters must have a lower boundof 0 and center parameters should be left with a “!”. This instructs thePFM to determine the bounds for that parameter. In addition, theparameters can vary during the fitting session.

5) The last element in the OPTIONS field should be set to the keyword“PEAK”.

6) All other fields in the PKF file should be left as they are, except forFORMULA, which can be updated. In the case of DLL functions, theFORMULA field is merely a description of the function for the user’sbenefit. For user-defined script functions, this field actually defines thefunction and must therefore follow proper LabTalk syntax.

Page 103: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Programming the PFM with LabTalk Introduction • 97

Programming the PFMwith LabTalk

IntroductionYou can increase control over Origin and the PFM by using Origin’sbuilt-in scripting language, LabTalk. Scripting also allows you to buildcustom systems. The PFM adds a new set of methods and properties intoLabTalk, which accommodates all of the functionality of the PFM.Methods are LabTalk commands that perform an action, like creating aresidual plot. Properties are similar to variables. The configuration fileEASYPEAK.CNF uses LabTalk to set up the PFM. You can use this fileas an example of programming the PFM.

Note: When assigning text to text properties, enclose the text inquotation marks " ".

Basic PFM Scripts: Getting StartedThese properties and methods allow you to perform peak analysis at abasic level.

Basic Peak Fitting - Properties

pf.bColY$, pf.bColX$ Read/write, string. The baseline datasets whenpf.bType = 11. In general, you only need pf.bColY$, because the Xcolumn associated with the Y column you select is assignedautomatically.

----

Page 104: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

98 • Basic PFM Scripts: Getting Started Programming the PFM with LabTalk

pf.bFunc$ Read/write, string. The fitting function for the baseline.The baseline is the background for peaks. The baseline can be afunction, dataset, or user-drawn-line, as determined by pf.bType.

Note: In addition to many mathematical functions, there are three specialfunctions:

Dataset (pf.bType = 11): A dataset is used as the baseline. Usepf.bColY$ and pf.bColX$ to assign the baseline datasets.

FreeForm (pf.bType = 12): A user-drawn line is used as the baseline.The line is connected by straight line segments. Use thepf.makeBase( ) method to create an internal baseline dataset. See"Auxiliary Methods and Properties" on page 109.

Spline (pf.bType = 13): A user-drawn line is used as the baseline. Theline is connected by cubic spline. Use the pf.makeBase( ) method tocreate an internal baseline dataset. See "Auxiliary Methods andProperties" on page 109.

----

pf.bType Read only, numeric. The baseline type:

0: General built-in function.1: User-defined function of expression form.2: User-defined function of Y-script form.3: External DLL function.5: Built-in peak function used as the baseline.11: Dataset used as the baseline.12: FreeForm user-drawn line used as the baseline.13: Spline user-drawn line used as the baseline.

----

pf.curPeak Read/write, numeric. The current peak. Because there arepf.nPeaks peaks, you must use this property to specify a peak to accessits parameters. Its value must be between 0 and pf.nPeaks. Value 0corresponds to the baseline. Because this value can be altered internally,you must carefully monitor its value so that you can operate on thecorrect peak. This property affects the pf.pn, pf.vn, pf.en, pf.ln,pf.un, and pf.nn properties.

----

pf.fType Read only, numeric. The function type of all peaks in thedataset:

0: General built-in function.1: User-defined function of expression form.2: User-defined function of Y-script form.3: External DLL function.7: User-defined function of convolution form.

----

pf.func$ Read/write, string. The fitting function for all peaks. Thisproperty assumes that all peaks have the same fitting function. For

Page 105: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Programming the PFM with LabTalk Basic PFM Scripts: Getting Started • 99

example, pf.func$="gaussian" sets the Gaussian function as thefitting function for all peaks in the fitting dataset. You can use thepf.selFitFunc( ) method to select an existing fitting function or define anew function.

----

pf.nParan Read/write, numeric. The number of parameters for the nthpeak. When n is equal to 0, the number of parameters of the baseline isused.

----

pf.nPeaks Read/write, numeric. The number of peaks on the fittingdataset. For example, pf.nPeaks=5 specifies that there are five peaks inthe fitting dataset.

----

pf.pn Read/write, numeric. The nth parameter value of the currentpeak (given by pf.curPeak). n must be within 1 and pf.nParan. Youcan use this property to initialize the parameters or get the fittedparameters.

----

pf.vn Read/write, numeric. The fixed/vary status of the nth parameterof the current peak (given by pf.curPeak). Use pf.vn = 0 to fix the nthparameter to its current value so that it will not be modified duringfitting. Use pf.vn = 1 to allow the nth parameter to vary.

----

pf.w$ Read/write, string. The weighting dataset. The weightingdataset designates the contributions from individual data points. Thereare four types of weighting which are described under the pf.wTypemethod.

----

pf.wType Read/write, numeric. The weighting type for the fittingdatasets. 0: no weight; 1: instrumental weight; 2: statistical weight; 3: aspecified dataset for weighting. Use pf.w$ to assign a weighting dataset.

----

pf.x$ Read/write, numeric. The X column of the dataset to be fitted bythe PFM. This column corresponds to the independent variable of thefitting functions. If you have already used pf.y$, there is no need forpf.x$ (unless you want a different X column). However, pf.y$ must beused to specify a Y column before pf.x$ is used to specify a non-defaultX column.

----

pf.y$ Read/write, string. The Y column of the dataset to be fitted bythe PFM. This column corresponds to the dependent variable of thefitting functions. You must set this column before beginning any fittingoperations. The PFM automatically assigns the corresponding X column,

Page 106: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

100 • Getting Results Programming the PFM with LabTalk

so setting the pf.x$ property is not necessary unless you want to assignanother column to be the X column.

Example: pf.y$="data1_y" specifies that the column named Y in theData1 worksheet is the dataset to be fitted.

Basic Peak Fitting - Methods

pf.editPara(n) Open the Edit Fitting Parameters dialog box to edit theparameters of the nth peak.

----

pf.fit(n) Perform n rounds of Levenberg-Marquardt fitting. If thetolerance value (pf.tolerance) is satisfied, the PFM stops before thespecified number of iterations are finished. If n = -1, the PFM fits up topf.nIter rounds. For information on pf.tolerance and pf.nIter, see"Controlling the PFM" on page 104.

----

pf.init( ) Initialize the PFM. All system variables are set to the defaultvalues.

----

pf.selFitFunc(cntrl, n) Open the Select Fitting Function dialog box.You can choose a function from the Available Functions list or define anew one.

cntrl = All: Set up a fitting function for all peaks.cntrl = Peak: Set up a fitting function for peak n.cntrl = Base: Set up a fitting function for the baseline.

----

pf.unInit( ) Un-initialize the PFM.

Getting ResultsAfter the fitting is done, the fitting results can be found with thefollowing methods and properties.

Fitting Results - Properties

pf.areaDn Read only, numeric. The actual area under a fit peak basedon the data. Some peaks may have longer tails that extend beyond thedata range, thus the actual area under the data is less than a whole peakgiven by pf.arean.

----

Page 107: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Programming the PFM with LabTalk Getting Results • 101

pf.arean Read only, numeric. The fit area of the nth peak. This is thearea calculated according to the function definition, not the fittingdataset.

----

pf.centern Read only, numeric. The center of the nth peak. Ingeneral, it is the first parameter of a peak which is given by the propertypf.p1.

----

pf.chiSqr Read only, numeric. The chi-square value of the fit.

----

pf.COD Read only, numeric. The coefficient of determination of thefit.

----

pf.confidence Read/write, numeric. Confidence value. Given aconfidence value, you can calculate confidence limits for parameters andconfidence/prediction bands for the fit curve. This property alters thisvalue from the default value 0.95 to any value between 0 and 1. The newvalue remains inside the PFM unchanged until further assignment.

----

pf.COR Read only, numeric. The correlation coefficient which iscomputed at the end of iterations.

----

pf.DOF Read only, numeric. The degrees of freedom.

----

pf.en Read only, numeric. The standard error values of the nthparameter of the current peak (given by pf.curPeak, see "Basic PFMScripts: Getting Started" on page 97).

----

pf.err Read only, numeric. The error code. When the error messagebox is suppressed using the property pf.msgPrompt=0, use thisproperty to get the error code.The PFM shares many error messages with Origin's nonlinear curvefitter. Only messages unique to the PFM are listed here.28051: Error! The peak number 'XXXX' is out of the valid range. Thevalid number must be between 0 and pf.npeaks.28052: Error! The dataset number 'XXXX' is out of the valid range.The valid number must be between 0 and pf.ndata.28053: Error! The parameter name 'XXXX' is too long. Use nameswith less than 8 characters.28054: Error! You need to first assign a fitting function to the peak'XXXX'. The peak XXXX has not been assigned a fitting function. Youcannot do any computation on this peak.28055: Error! The user-defined function is invalid. Redefine it with the

Page 108: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

102 • Getting Results Programming the PFM with LabTalk

correct format. For more information, see "Peak Fitting WizardReference".28056: Error! The user-defined function 'XXXX' has no parameters.For more information, see "Peak Fitting Wizard Reference".28057: Error! The user-defined function 'XXXX' has an insufficientnumber of parameters. For more information, see "Peak Fitting WizardReference".28059: Error! The dataset 'XXXX' does not exist.28060: Error! The number of correct arguments is less than what isneeded. The operation cannot continue. Check the syntax of the method.28061: Error! No dataset is specified for fitting operations. Theoperation cannot continue. You need to supply a fitting dataset to thePFM.28062: Error! No fitting function has been set. Set appropriatefunctions first before continuing the current operation.28063: Warning! Initialization of the parameters of a fitting functionfailed. You have to supply the initial parameter values yourself.28064: Error! The dataset 'XXXX' has no valid elements. Nocomputation can be performed. This will occur if the data range is 0 or ifall the values in the dataset are missing.28065: Error! There are not enough data points in the dataset(s) 'XXXX'to be fitted. There may be too many missing cells or the fitting range istoo small. Check the dataset(s) to be fitted and the data range.28066: Error! There are too many bad functional evaluations. Theparameter values of the fitting functions may be out of the valid range.Check the parameter values.

----

pf.FWHMn Read only, numeric. The full width at half maximum ofthe peak height of the nth peak based on the fit curve.

----

pf.heightn Read only, numeric. The maximum height of the nth peak.

----

pf.ln Read only, numeric. The lower confidence limit value of the nthparameter of the current peak (given by pf.curPeak, see "Basic PFMScripts: Getting Started" on page 97) for a given confidence value(pf.confidence).

Note: You must use pf.confidence and pf.paraConf( ) first.

----

pf.nIterGood Read only, numeric. The number of iterations that wereactually performed.

----

pf.nn Read only, numeric. The name of the nth parameter of thecurrent peak (given by pf.curPeak, see "Basic PFM Scripts: GettingStarted" on page 97). The name might be different than original

Page 109: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Programming the PFM with LabTalk Getting Results • 103

definitions in the function, because the PFM appends numbers toparameter names to denote peaks.

----

pf.nParaVary Read only, numeric. The number of varyingparameters.

----

pf.nPoints Read only, numeric. The total number of data points usedin the calculation.

----

pf.percentn Read only, numeric. The percentage area of a peak in theentire data profile.

----

pf.pn Read/write, numeric. The nth parameter value of the currentpeak given by pf.curPeak. n must be within 1 and pf.nParan. Youcan use this property to initialize the parameters or get the fittedparameters.

For information on pf.curPeak and pf.nParan, see "Basic PFMScripts: Getting Started" on page 97.

----

pf.SSR Read only, numeric. The sum of squares.

----

pf.un Read only, numeric. The upper confidence limit value of the nthparameter of the current peak (given by pf.curPeak, see "Basic PFMScripts: Getting Started" on page 97) for a given confidence value(pf.confidence).

Note: You must use pf.confidence and pf.paraConf( ) first.

----

pf.widthn Read only, numeric. The width parameter of the nth peak asdefined in the peak function. It may not be the actual width of a peak,depending on the function definition.

Fitting Results - Methods

pf.coVar(covar) Create the variance-covariance matrix covar.

----

pf.funcVal(n, x) Return the function value at X = x for the baselinewhen n = 0, or the fit curve when n = -1, or the nth peak when n > 0.

----

pf.makeResidual( ) Create the residual dataset residual_y. Theresidual is the difference between the original dataset and the fit curve.

----

Page 110: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

104 • Controlling the PFM Programming the PFM with LabTalk

pf.paraConf( ) Calculate confidence intervals for individualparameters. View results using pf.un for the upper confidence limit ofparameter n, and pf.ln for the lower confidence limit. Usepf.confidence to set the confidence value if you need values other than0.95.

Controlling the PFMFine-tune the PFM using the following properties.

Advanced Control - Properties

pf.derivStep Read/write, numeric. The parameter change amount(∆x ) for calculating numerical derivatives. A smaller value gives higherprecision but may cause numerical round-off errors. The default value is0.000001.

----

pf.mu Read/write, numeric. The value for diagonal magnification ofthe curvature matrix. This value is important in the Levenberg-Marquardt routine. Its default starting value is 0.001.

----

pf.muMin Read only, numeric. The smallest MU value ever reached.

----

pf.nIter Read/write, numeric. The default number of fitting iterationsif using the method pf.fit(-1).

For information on pf.fit(-1), see "Basic PFM Scripts: Getting Started"on page 97.

----

pf.tolerance Read/write, numeric. The tolerance value to stopiterations. The tolerance value is a stop criterion. The default value is0.05. The smaller the tolerance, the more iterations are needed to satisfythe criterion.

Page 111: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Programming the PFM with LabTalk Peaks With Different Functions • 105

Peaks With Different FunctionsPeaks in a dataset may sometimes be described by different functions.For instance, the first peak might be Gaussian while the second isLorentzian. Using the following properties, you can fit data using adifferent function for each peak.

Peaks with Different Functions - Properties

pf.pBeginn Read/write, numeric. The first row number of the fittingdata range of the nth peak. Defaults to the beginning of the Y columndata range.

----

pf.pBeginXn Read/write, numeric. The lower X bound of the fittingdata range of the nth peak. Defaults to the beginning of the Y columndata range.

----

pf.peakOnn Read/write, numeric. The nth peak to be active, whichmeans that it will be involved in the calculations. Only a valid peak canbe active. Defaults to 1: active.

----

pf.pEndn Read/write, numeric. The last row number of the fitting datarange of the nth peak. Defaults to the end of the Y column data range.

----

pf.pEndXn Read/write, numeric. The upper X bound of the fittingdata range of the nth peak. Defaults to the end of the Y column datarange.

----

pf.pFuncn$ Read/write, string. The fitting function for the nth peak.This is different from the property pf.func$, which assigns a fittingfunction to all peaks.

----

pf.pStepn Read/write, numeric. The step size of the fitting data rangeof the nth peak. Defaults to 1.

----

pf.pTypen Read only, numeric. The function type of the nth peak.When n = 0, it is the baseline type.

0: General built-in function.1: User-defined function of expression form.2: User-defined function of Y-script form.3: External DLL function.5: Built-in peak function used as the baseline.11: Dataset used as the baseline.

Page 112: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

106 • Fitting a Section of a Dataset Programming the PFM with LabTalk

12: FreeForm user-drawn line used as the baseline.13: Spline user-drawn line used as the baseline.

----

pf.pValidn Read only, numeric. Check if the nth peak is valid, i.e., ithas been assigned a valid fitting function. 0: not valid, 1: valid. Asuccessful application of the pf.func$ property will make all of thepeaks valid. The pf.pfuncn$ property will make the nth peak valid.Defaults to 0: not valid.

For information on pf.func$, see "Basic PFM Scripts: Getting Started"on page 97.

For information on pf.pFuncn$, see "Peaks With Different Functions"on page 105.

Fitting a Section of a DatasetThe properties in this section help you fit a section of a dataset. Asection of a dataset is a range. The range is defined by its specifiedbeginning and end.

Fitting a Range - Properties

pf.dataBegin, pf.dataEnd Read/write, numeric. These twoproperties establish a section of data for fitting (a fitting range). They arethe first and the last row numbers that denote the range. Only the datapoints between them will be fitted. Their default values are 1 and the lastrow number.

Note: If the property pf.y$ is used to assign the fitting dataset, these twovalues will be set to their defaults (the full data range). Thus, you mustalways use these two properties to establish the desired fitting range afterassigning new fitting data.

----

pf.dataBeginX, pf.dataEndX Read/write, numeric. These twoproperties are similar to pf.dataBegin and pf.dataEnd, except that thefitting range is denoted by X values rather than row numbers. Forexample, pf.dataBeginX=20.55; pf.dataEndX=112.55; forces thePFM to fit only data points that are between X = 20.55 and X = 112.55.

----

pf.dataStep Read/write, numeric. The data interval, which is definedas an incremental step size when only a subset of data points is used.This is a very useful feature when there are a large number of data pointsand you need a rough guess of the fit. If its value is 1, every data point is

Page 113: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Programming the PFM with LabTalk Constraints • 107

used. If its value is 2, every other data point is used, and so on. Whenscript is used for fitting, this value defaults to 1.

----

pf.useRowNum Read/write, numeric. If its value is 1, the rownumber will be used to denote the fitting data range. Otherwise, the Xvalues will be used. The default value is 1.

ConstraintsSometimes there are relations between parameters. Constraints allowsuch relations to be specified.

Constraints - Properties

pf.constr$ Read/write, string. The general linear constraints forparameters. For example, pf.constr$ = “A_1=2*A_2;w_1=0.5*w_2”sets A_1 to twice the value of A_2 and w_1 to half the value of w_2during fitting. This property over-writes previous constraints. The newconstraints remain until you explicitly clear them. To clear theconstraints, use an empty string: pf.constr$=" ".

----

pf.lBoundn Read/write, numeric. The lower bound for the nthparameter of the current peak (given by pf.curPeak, see "Basic PFMScripts: Getting Started" on page 97).

----

pf.lBoundOnn Read/write, numeric. Turn on/off the lower bound forthe nth parameter of the current peak (given by pf.curPeak, see "BasicPFM Scripts: Getting Started" on page 97): 1 = on; 0 = off.

----

pf.nConstr Read only, numeric. The number of constraints. Thelinear constraints are parsed and translated into a matrix-vector formatinternally with pf.nConstr as the number of linear equations.

----

pf.nConstrEff Read only, numeric. The number of effectiveconstraints. If there are some parameters that are fixed, the PFM disablesthem in the constraint equations by moving them from the left side of theequations to the right side. This may reduce the total number ofequations. As a result, the final number of linear constraint equationsmay be less than pf.nConstr and is pf.nConstrEff.

----

Page 114: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

108 • Constraints Programming the PFM with LabTalk

pf.uBoundn Read/write, numeric. The upper bound for the nthparameter of the current peak (given by pf.curPeak, see "Basic PFMScripts: Getting Started" on page 97).

----

pf.uBoundOnn Read/write, numeric. Turn on/off the upper bound forthe nth parameter of the current peak (given by pf.curPeak, see "BasicPFM Scripts: Getting Started" on page 97): 1 = on; 0 = off.

Constraints - Methods

pf.allEqual(cntrl, i) Review the pf.equal( ) and pf.equal2( )methods. This method is similar to pf.equal( ) and pf.equal2( )however it operates on the ith parameter on all peaks. For example,pf.allEqual(1, 3) sets all peaks to have the same width.

----

pf.chkConstr( ) Check whether constraints are violated or not. Thismethod may help determine whether the constraints are self-consistent.

----

pf.equal(cntrl, i, j) Set up a parameter equivalence group. All theparameters within this group will have the same value during fitting. Usethis method to add or remove a parameter of a peak from an equivalencegroup.

cntrl=0: Removes the jth parameter of the ith peak from the jthequivalence group.cntrl=1: Puts the jth parameter of the ith peak into the jth equivalencegroup.cntrl=2: Checks whether the jth parameter of the ith peak is within thejth equivalence group.

For example you could use this method to force peak 1, 2, and 5 to havethe same width (the peak type is not important). Because the width is thethird parameter of a peak function, pf.equal(1,1,3), pf.equal(1,2,3),and pf.equal(1,5,3) will put the widths of the three peaks into anequivalence group, so that the peaks will have the same width duringfitting.

Note that this method assumes that there is only one equivalence groupfor a type of parameter (one for width, one for height, etc.).

----

pf.equal2(cntrl, i, j, k) Similar to the pf.equal( ) method. However,this method operates on the kth parameter of the ith peak and the jthpeak. This method is useful when there are two or more equivalencegroups. For example, you can use pf.equal2(1, 1, 3, 3) andpf.equal2(1, 2, 4, 3) to setup relations that the widths of peak 2 andpeak 4 are equal, and the widths of peak 1 and peak 3 are equal.

----

Page 115: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Programming the PFM with LabTalk Auxiliary Methods and Properties • 109

pf.paraRange( ) Set the parameters to a region that satisfies anyconstraints that exist.

----

pf.setConstr( ) Open the Set General Linear Constraints dialog box toset general linear constraints for parameters. For example, use constraintA_1=2*A_2 to set A_1 to twice the value of A_2 during fitting.

Auxiliary Methods and PropertiesThe following properties and methods can help you build customsystems. They include properties and methods for the user-interface,parameter initialization, and other useful tasks.

Customization - Properties

pf.heightEstn Read/write, numeric. The estimated top position ofpeak n. This is the distance from peak top to the absolute zero. Givenestimations of the peak height and center, the pf.peakGuess( ) methodcan perform parameter initialization.

----

pf.msgPrompt Read/write, numeric. Turn on/off the error messageboxes. The default is 1: error message boxes on. When developing yourown application, you probably don't want the error message box todisplay every time there is a problem. Instead, you can use the pf.errproperty to examine what happened.

For information on pf.err, see "Getting Results" on page 100.

----

pf.nFPoints Read/write, numeric. The number of points used ingenerating the function plots FitFunc_fit and FitFunc_fn’s.

Customization - Methods

pf.addBase(cntrl) This method subtracts the baseline from the fittingdataset or adds it back if there is a baseline.

cntrl=0: Subtract the baseline from the fitting dataset.cntrl=1: Add the baseline back.

----

pf.adjustBase(cntrl, xData, yData, value) Adjust the baselineheight. (xData, yData) is the baseline characteristic baseline.

cntrl=0: Return the average Y value of dataset yData.cntrl=1: Adjust the dataset yData to have average height value, and

Page 116: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

110 • Auxiliary Methods and Properties Programming the PFM with LabTalk

modify the corresponding offset parameter value to reflect this change.cntrl=2: Adjust the dataset yData to have average height value.

----

pf.dispCurve(cntrl, n) Display function plots with current parametervalues.

cntrl=A: Add a function plot FitFunc_fn for the nth peak into thecurrent layer.cntrl=R: Remove FitFunc_fn from the current layer.When n = -1, this method adds or removes function plots for all peaks.

----

pf.integrate( ) Find the area between the fitting data and the baseline.

----

pf.make(cntrl, xMode, n, xData, yData, nPoints, x1, x2) Thismethod creates function datasets, or confidence/prediction bands. Thereare eight arguments in this method. Some of these arguments may beignored (and therefore can be left blank) depending on the first twoarguments cntrl and xMode.

cntrl: Determines what to do.C: Create confidence bands. Leave yData argument blank. DatasetsFitFunc_LConf and FitFunc_UConf are generated to internally storethe bands.P: Create prediction bands. Leave yData argument blank. DatasetsFitFunc_LPred and FitFunc_UPred are generated to internally store thebands.B: Create both confidence and prediction bands. Leave yData argumentblank.F: Create a function set with all valid peaks included.G: Create a function set for the current peak (given by pf.curPeak, see"Basic PFM Scripts: Getting Started" on page 97).H: Create a function set for the current peak (given by pf.curPeak)with a baseline added.

xMode: Determines how to use X values to generate datasets.0: Use the X values of the dataset that is to be fitted. Leave xData,nPoints, x1, and x2 arguments blank.1: Generate a dataset based on nPoints, x1, and x2. x1 is the X startingvalue, x2 is the X incremental step size. Leave xData argument blank.2: Generate a dataset based on a given X dataset xData. xData mustexist before this operation. Leave nPoints, x1, and x2 arguments blank.3: Generate a dataset that is spaced uniformly in X values. The first andlast X values are the same as those of the fitting dataset, and there are atotal of nPoints points. The spacing between each pair of points is (x2-x1)/(nPoints-1). Leave xData, x1, and x2 arguments blank.4: Generate a dataset that is spaced uniformly in the X-direction on thescreen. This is done after the X axis scale is set. However, the actualspacing in X is not uniform. This will generate a visually uniform curveon the screen. The first and last X values are the same as the first and

Page 117: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Programming the PFM with LabTalk Auxiliary Methods and Properties • 111

last of the fitting dataset, and there are a total of nPoints pairs of datapoints in datasets xData and yData. Leave x1 and x2 arguments blank.5: Same as above, except the first X value is x1 and the last X value isx2.

n: When cntrl = F, this determines which dataset is to be generated.Otherwise, n tells which function is to be generated. n must be within 0 -pf.nPeaks. For information on pf.nPeaks, see "Basic PFM Scripts:Getting Started" on page 97.

xData: The X column for the function dataset. May be ignored in somecases as described above.

yData: The Y column for the function dataset. May be ignored in somecases as described above.

nPoints: Total points to be generated. May be ignored in some cases asdescribed above.

x1: The beginning X value. May be ignored in some cases as describedabove.

x2: The step size or the last X value. May be ignored in some cases asdescribed above.

Examples:

pf.make(g, 5, 1, , fitfunc, 100, , ); creates a function dataset fitfuncfor peak 1 with 100 points, which corresponds to the X values of thefitting data.

pf.make(c, 6, 1, bands_x, , 100, 0.0, 1000.0); creates a confidenceband with band curves (bands_x, FitFunc_LConf) and (bands_x,FitFunc_UConf).

----

pf.makeBase(xData, yData, n) When you draw an arbitrary line asthe baseline (pf.bType = 12 and pf.bType = 13), this method convertsthe user-drawn line (xData, yData) with n points to the baseline datasets(baseLine_a, baseLine), which are used in the actual computations. Youshould not use these datasets (baseLine_a, baseLine) for other purposes.You can change the baseline datasets by assigning them using thepf.bColX$ and pf.bColY$ properties. For information on pf.bType,pf.bColX$, and pf.bColY$, see "Basic PFM Scripts: Getting Started"on page 97.

----

pf.makeCurve(cntrl, n) Make a function plot with the currentparameter values.

cntrl=g: Create a function plot (without a baseline) named FitFunc_fnfor the nth peak.cntrl=h: Create a function plot (with a baseline) named FitFunc_fn fornth peak.cntrl=f: Create a fit curve named FitFunc_fit with all functions and abaseline.

Page 118: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

112 • Auxiliary Methods and Properties Programming the PFM with LabTalk

cntrl=c: Create a confidence band (FitFunc_lconf, FitFunc_uconf) forthe fit curve FitFunc_fit. Use n = 1.cntrl=p: Create a prediction band (FitFunc_lpred, FitFunc_upred) forthe fit curve FitFunc_fit. Use n = 1.When n = -1, this method creates function plots for all peaks.

----

pf.paraInit(n, xData, yData) Given a dataset (xData, yData), thismethod can quickly determine the parameters of peak n. When n=0, itworks on the baseline. In general, only nPara pairs of XY values areneeded to determine the parameters of a function with nPara parameters.The PFM finds or approximates the parameter values according to them.Although xData and yData may have more than nPara points, only thefirst nPara pairs will be used. This method can find the initialestimations of the parameters. This is useful if you have drawn a linewith nPara points to approximate the actual function.

----

pf.peakGuess(option, i, n) Perform parameter initialization.

option = P: Make estimates for more than one peak or baseline.option = S: Make estimates for a single peak or baseline.i = 0: Make estimates for all peaks and baseline.i = 1: Make estimates for all peaks. Do not make estimates for thebaseline.n: The number of peaks.

----

pf.plotBase(cntrl, xData, yData) According to the parameters of thebaseline function, this method creates a baseline dataset (xData, yData)with the number of points equal to the number of parameters of thebaseline.

cntrl=0: Put dataset (xData, yData) into the current layer.cntrl=1: Create dataset (xData, yData).cntrl=2: Create dataset (xData, yData) and set the xData valuesuniformly.cntrl=3: Create dataset (xData, yData) and set values for both xData andyData.cntrl=4: Set values for yData.

----

pf.plotChar(i, xData, yData, cntrl) For each function with nparameters, n XY points can determine the parameters in general. Thesepoints are the characteristic points of a function. This method calculatesthe values of these points for the function of peak i.

cntrl =1: Create n X values uniformly according to the fitting dataset,and then generate n Y values according to them. The X values are putinto dataset xData, the Y values into yData.cntrl =0: You need to provide X values in xData and the Y values arecalculated according to X. Then yData is plotted into the current layer

Page 119: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Programming the PFM with LabTalk Fitting Multiple Datasets Simultaneously • 113

with filled red circle symbols. The points on this curve can be movedusing the Origin macro mvpts. The macro is accessed by typing:mvpts WorksheetName_Col (ENTER)in the Script window.

----

pf.simplex(n) Perform n Simplex iterations. Iterates to findparameters using the simplex method, according to the specified numberof iterations. When there is no way to guess the parameter values at thebeginning, the simplex method can be used to initialize them or make areasonable guess. The simplex method typically needs more functionalevaluations to reach the minimum.

Fitting Multiple Datasets SimultaneouslyThe PFM can be configured to fit multiple datasets simultaneously. Thisfeature allows you to analyze a group of inter-related datasets. Begin byusing the pf.nData property to tell the PFM the number of the datasetsto be fitted. You can then use other properties to assign the datasetnames and other parameters.

Properties

pf.curData Read/write, numeric. The current dataset to work with.(When pf.nData is set to a value greater than 1.)

----

pf.dataBeginn, pf.dataEndn Read/write, numeric. These twoproperties are similar to pf.dataBegin and pf.dataEnd (see "Fitting aSection of a Dataset" on page 106). They establish a fitting range for thenth dataset. If you use pf.dataBegin and pf.dataEnd, you set therange for all datasets. If you want a different range for each dataset, youshould use pf.dataBeginn and pf.dataEndn.

----

pf.dataBeginXn, pf.dataEndXn Read/write, numeric. Similar topf.dataBeginX and pf.dataEndX (see "Fitting a Section of a Dataset"on page 106). They establish a fit range for the nth dataset. The range isdenoted by X values rather than row numbers. If you usepf.dataBeginX and pf.dataEndX, you set the range for all datasets.

----

pf.dataPointsn Read/write, numeric. The number of data points usedin the nth dataset.

----

Page 120: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

114 • Fitting Multiple Datasets Simultaneously Programming the PFM with LabTalk

pf.dataStepn Read/write, numeric. The step size of the nth dataset.Defaults to 1.

----

pf.dataWeightn Read/write, numeric. The weight of the nth datasetin the entire fitting process. This property allows you to specify thecontribution of each dataset when you perform calculations. Defaults to1.0.

----

pf.nData Read/write, numeric. The number of total datasets to be fit.The default value is 1. In most cases, there is only one dataset to be fit.Thus, you rarely use this property. However, you should set this value ifyou need to fit several datasets together.

----

pf.SSRn Read only, numeric. The Sum of Squares value for the nthdataset. Use the pf.SSR property to get the total value of the Sum ofSquares. For information on pf.SSR, see "Getting Results" on page 100.

----

pf.wn$ Read/write, string. Assign the weight dataset to the nth dataset.See the pf.w$ property for details on assigning a weight dataset ("BasicPFM Scripts: Getting Started" on page 97).

----

pf.wTypen Read/write, numeric. The weighting method used for thenth dataset. Defaults to 0. Use the pf.wType property to assign theweighting type for all datasets. See the pf.wType property for theweighting types ("Basic PFM Scripts: Getting Started" on page 97).

----

pf.xn$ Read/write, string. Assign the X dataset to the nth dataset. Seethe pf.x$ property for details on assigning an X dataset ("Basic PFMScripts: Getting Started" on page 97).

----

pf.yn$ Read/write, string. Assign the Y dataset to the nth dataset. Seethe pf.y$ property for details on assigning a Y dataset ("Basic PFMScripts: Getting Started" on page 97).

Page 121: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Module Index • 115

Index

2

2nd derivative 53

A

Action modes 33Adjacent averaging 40Asym2Sig function 87Asymmetric double sigmoidal

function 87Asymmetrical Gaussian function 90

B

Baselineconditioning 44initialization 40modifying points 43selecting fitting function 43shifting 45subtracting 45

BiGauss function 90Bounds

constraining parameters 60

C

CCE function 89Chesler-Cram equation 89Chi-square 69, 77Coefficient of determination 69, 77Confidence 69Confidence bands 63Confidence interval

parameters 68Confidence level 63Constraints 59, 60

general linear 61upper and lower bounds 60

Convolution of functions 50Correlation coefficient 69, 77

Cubic function 93

D

Datadisplay as line or scatter 37finding peaks 51precondition 37selecting 35

range 35selecting peak function 46, 56smoothing 39subtract offset 38

Degrees of freedom 69, 77Dependency

parameters 68Derivative

displaying second derivative 53DLL

external DLL fitting function 95

E

ECS function 89Edgeworth-Cramer Series function

89EMGauss function 84Enlarging wizard graph 53Error values

weighting the data 64ExpDec1 function 94ExpDec2 function 94ExpGrow1 function 94ExpGrow2 function 94Exponentially modified Gaussian

function 84

F

FFT filter smoothing 40Filtering data 39Fit curve

display for each peak 57fixing parameters 59initializing parameters 56peak area 70peak excess 71peak gravity center 71peak maximum 71peak skew 71peak variance 71sharing parameters 60

Page 122: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

116 • Index Peak Fitting Module

F continued

Fitting 61, 64confidence level 63number iterations 62residuals 65results 66, 69, 76tolerance 62weighting methods 63

Fitting functionAsym2Sig 87baseline 43BiGauss 90CCE 89convolutions 50Cubic 93defining 48ECS 89EMGauss 84ExpDec1 94ExpDec2 94ExpGrow1 94ExpGrow2 94external DLL 95Gauss2 84Gaussian 84GCAS 88Hyperbl 94InvsPoly 90Line 93logNormal 88Lorentz 85parabola 93Pearson7 87Poly4 93Poly5 93Power2 91PSVoigt1 86PSVoigt2 86Pulse 91Sine 92SineDamp 92SineSqr 92Voigt 85Weibull3 87

Full view mode 33

G

Gauss2 function 84Gaussian function 84GCAS function 88General linear constraints 61Gram-Charlier A-Series function 88

H

Hidden peaks 53, 65Hyperbl function 94

I

Individual fit curves 57Initialization files 34Installing

PFM 2Instrumental weighting 64Inverse polynomial function 90InvsPoly function 90Iterations 62

L

LabTalkprogramming the PFM 97

Levenberg-Marquardt iterations 62Line data plot

peak data 37Line function 93Linear constraints 61LogNormal function 88Lorentz function 85Lower bounds

constraining parameters 60

P

Parabola function 93Parameters

confidence interval 68constraints 59, 60

general linear 61upper and lower bounds 60

dependency 68fixing 59initialization 56reporting fitting results 66, 76sharing 60standard error 68

Passive action mode 33Peak area

fit curve 70Peak data

adding and deleting peaks 52, 54display as line or scatter 37displaying second derivative 53enlarging 53finding hidden peaks 53, 65finding peaks 51

Page 123: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

Peak Fitting Module Index • 117

P (Peak data) continued

precondition 37selecting 35

range 35selecting function 46, 56smoothing 39subtract offset 38

Peak excessfit curve 71

Peak Fitting wizardaction mode 33adding and deleting peaks 52, 54baseline conditioning 44baseline initialization 40display individual fit curves 57displaying second derivative 53enlarging wizard graph 53finding hidden peaks 53, 65finding peaks 51fitting 61, 64hiding wizard map 34initializing 34initializing parameters 56navigating 4overview 31peak functions 46, 56precondition data 37residuals 65results 66, 69, 76scaling baseline 45script file 34selecting data 35setting constraints 59, 60shortcut menu 33subtracting baseline 45view mode 33wizard map 4

Peak gravity centerfit curve 71

Peak maximumfit curve 71

Peak skewfit curve 71

Peak variancefit curve 71

Pearson7 function 87PFM See also Peak Fitting wizard

installing 2programming with LabTalk 97starting 3uninstalling 3

Poly4 function 93Poly5 function 93Power2 function 91

Precondition data 37Prediction bands 63Programming the PFM 97Pseudo-Voigt function 86PSVoigt1 function 86PSVoigt2 function 86Pulse function 91

R

Rectangular hyperbola function 94Reduced chi-square 69, 77Residuals 65

S

Savitsky-Golay smoothing 40Scatter data plot

peak data 37Script

programming the PFM 97Script file

Peak Fitting wizard 34Second derivative 53Shirley baseline subtraction 39Shortcut menu

Peak Fitting wizard 33Sine function 92SineDamp function 92SineSqr function 92Skew

fit curve 71Smoothing data 39Spline

baseline line connection 44Standard error

parameters 68Statistical weighting 64Statistics

from fit 66, 69, 76Subtract offset 38Sum of squares 68, 77

T

Tolerance 62, 69Tougaard baseline subtraction 39

U

UninstallingPFM 3

Upper boundsconstraining parameters 60

Page 124: Peak Fitting Module - uni-freiburg.dehacol13.physik.uni-freiburg.de/fp/Literatur/Origin/PFM_Manual.pdf · Before installing this version of the Peak Fitting Module (PFM), review the

118 • Index Peak Fitting Module

V

Variancefit curve 71

View modes 33Voigt function 85

W

Weibull3 function 87Weighting the data 63Wizard map

hiding 34