0% found this document useful (0 votes)
292 views4 pages

Expfit Peak Fitting Utility For Ms-Excel

This document describes eXPFit, a peak fitting utility that runs in Microsoft Excel. It was designed for analyzing X-ray photoelectron spectroscopy (XPS) data but can fit other spectroscopic data. The software provides flexibility for fitting peaks but lacks robustness. It allows fitting of up to 10 peaks with linear or Shirley backgrounds. Peak parameters like location, width, and shape can be locked, linked between peaks, or optimized during fitting. The software is free for personal and academic use but requires payment for commercial use. It runs on modern PCs using Excel 97 or later. Data is imported and fitted peaks are calculated using the Solver tool.

Uploaded by

Sadiq Kariapper
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
292 views4 pages

Expfit Peak Fitting Utility For Ms-Excel

This document describes eXPFit, a peak fitting utility that runs in Microsoft Excel. It was designed for analyzing X-ray photoelectron spectroscopy (XPS) data but can fit other spectroscopic data. The software provides flexibility for fitting peaks but lacks robustness. It allows fitting of up to 10 peaks with linear or Shirley backgrounds. Peak parameters like location, width, and shape can be locked, linked between peaks, or optimized during fitting. The software is free for personal and academic use but requires payment for commercial use. It runs on modern PCs using Excel 97 or later. Data is imported and fitted peaks are calculated using the Solver tool.

Uploaded by

Sadiq Kariapper
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

eXPFit Peak Fitting Utility for MS-Excel

eXPFit is a peak fitting utility/template running under Microsoft Excel. It has been specifically set-
up for the analysis of X-ray photoelectron spectroscopy (XPS) data, but it could be used to fit other
types of spectroscopic data.

This software is suitable for those people who commonly use Excel for manipulating data and
assumes a certain familiarity with Excel.

Within these constraints it provides great flexibility, but if you want a completely robust, user-proof
or computationally-efficient peak fitting routine then look elsewhere; this software makes no
pretence of meeting any of these requirements !

Features

 Backgrounds : linear and/or Shirley


 Maximum of 10 peaks/spectrum
 Up to 1001 data points per spectrum
 Locking of peak parameters
 Linking of peak parameters to those of other peaks
 Each peak may be optimised with regard to the following parameters :
o peak location/binding energy
o FWHM (symmetric or asymmetric)
o Gaussian/Lorentzian mix (symmetric or asymmetric)

Conditions of Use

This software utility is supplied free-of-charge for personal use by individuals at home, or for
anyone working in an academic (college, university etc.) environment. However, please note the
Disclaimer regarding its use. The software must be registered and the requisite licensing payment
made to the author (see below) before use in any other commercial or other non-academic
research environment.

Hardware & Software Requirements

The Visual Basic code is not particularly efficient but runs quickly enough on modern PCs. The
workbook was originally prepared and tested using the version of Excel distributed in Office 97, but
it has been tested and shown to work with all subsequent releases of Office up to and including
Office 2007, provided that the installation instructions given in the documentation below are
followed.

Installation

1. Copy the supplied Excel file to the directory of your choice.


2. Start-up Microsoft Excel.
3. Check if the Solver Add-In is installed in Excel – in Office 2003 you should be able to see Solver
under the Tools menu; in Office 2007 you should see Solver in the Analysis section on the Data
tab (if it is not installed, then you must do so by following the instructions in the Excel on-line
Help).
4. Open the supplied Excel file (you will receive a warning that the workbook contains macros - you
will have to enable this content)
5. Start the Solver (from the Tools menu, or from the Data tab) and then immediately click on the
"Close" button to shut it down (this is to resolve some library referencing problems).
6. Re-save the Excel file.

Using the Program

This workbook is designed to be operated exclusively from the “Ft” worksheet, and any alterations
that you make to other sheets of the workbook may affect the way that it operates. You may wish
to run Excel in the Full Screen mode (select this option from the View menu/tab) if you are using a
small display.

Changing the Settings

The Settings button enables you to alter the spectral (binding energy) range over which the fitting
program operates - this is assumed to be the appropriate range for the data which you are
attempting to fit but no check is made to confirm this. You are required to supply the Initial
Binding Energy, the Step Size (between individual points) and the Final Binding Energy - units are
assumed to be eV although this is immaterial for operation of the program. The step size may be
entered as a positive value even if the final binding energy is lower than the initial energy. Note
that some of the peak parameters are automatically reset when new settings are supplied.
(Warning - this operation can take a long time on some old versions of Excel).

Importing Data to be Fitted

If you use the Import New Data button facility, then the data to be fitted is assumed to be present
in another open Excel workbook. It is further assumed that the worksheet contains a number of
similar spectra in columns (e.g. a series of O 1s spectra), where each column contains a single
spectrum represented by the signal intensity (in integral counts) with a single header row
containing some form of spectral identification (e.g. the original filename); the basic structure is
illustrated below.

A B C D
1 BE / eV Spectrum 1 Spectrum 2 Spectrum 3
2 536.0 21345 22300 22356
3 535.9 21222 22356 22343
4 535.8 21192 22978 22401

If you wish to fit the spectra only over a more limited range of binding energies, then you will need
to delete the appropriate rows from this worksheet. It is recommended that you only have one
datafile open at any one time in addition to the main workbook; furthermore, if this contains
multiple sheets it will be easier if you make the required sheet the active worksheet before
switching to the main workbook.

When you click on the Import New Data button the display will switch to the first other open
workbook (i.e. hopefully the required datafile, although you can use the Window menu, or
Windows task-bar, to switch to another file). To select a spectrum (a column of data) you should
select the entire column by clicking on the column identifier header tab (the grey cell at the top
containing an alphabetic character). To transfer this data you should then press the Enter key, or
click on the OK button of the dialog box. The new data is placed in the second column (column B)
of the “Data” worksheet.
If you do not wish to use the Import New Data facility, then it is also possible to transfer new
spectral data onto the “Data” worksheet manually, using successive copy and paste operations.

Shirley-type Background Subtraction (optional)

The Shirley Bkgrd button will subtract a Shirley-type background using an iterative procedure. This
is done using a homewritten algorithm and you may wish to check the results against those from
other programs. The original data is transferred to the “Shirley” worksheet, whilst the spectrum
stored on the “Data” worksheet and displayed on the “Ft” worksheet becomes that obtained after
the background subtraction has been performed. All subsequent peak fitting is carried out on this
modified data.

Peak Fitting

Peak fitting is accomplished using the Solver Add-In provided with Excel, with the parameters
entered on the “Ft” worksheet being the starting values for the fit. As with all fitting program, it is
less likely to fail if these initial parameters (including the linear background parameters) give a
reasonable fit to the data. You should enter the peak parameters in a continuous fashion from the
left starting with Peak 1
(Warning - if the intensity of any peak is initially set to zero then both it and any peaks to the right
will be ignored in any subsequent fitting).

The meaning of the basic peak parameters should be self-evident - these being the peak location,
height, full-width-half-maximum (FWHM) and the fractional Gaussian character of the Gaussian-
Lorentzian peak function (0 = 100% Lorentzian, 1 = 100% Gaussian). However, to permit
asymmetry the left and right sides of each peak are assigned separate FWHM and Gaussian-
Lorentzian character values. Peak parameters may be set to numerical values or have their values
defined by Excel formulae (thus linking them to other parameters).

Examples of possible entries are illustrated below :

Cell Parameter (all Units Sample Constraints Sample Meaning of Formula


refer to Peak 2) Value Formula

C2 Binding Energy eV 530.25 >0 =B2+2.1 Peak fixed at 2.1 eV to higher BE of Peak
1
C3 Peak Height 44700 0 =B3*2/3 Peak height constrained to 67% of that
of Peak 1
C4 Left FWHM eV 1.560 >0 =B4 Left peak width fixed to be equal to that
of Peak 1
C5 Right FWHM eV 1.760 >0 =C3 Right peak width fixed to be equal to left
peak width
C6 Left Gaussian % 0.700 0,1 =B6 Left peak profile fixed to be equal to that
of Peak 1
C7 Right Gaussian % 0.700 0,1 =C6 Right peak profile fixed to be equal to
left peak profile

Note :
1. to make a peak completely symmetric you simply need to set the parameters (FWHM and
fractional Gaussian character) for the right-hand side of the peak to be equal to those of the
left-hand side using Excel formulae.
2. two further parameters are available; these are the left-hand background and right-hand
background values which together define a linear background contributing to the fit to the data.
3. it is not possible to constrain the integrated areas of peaks (these are not parameters)
The procedure for starting the peak-fitting process is outlined below:

(i) Press the Solve Setup button.


The cells containing parameters which may be automatically adjusted during fitting will be
highlighted in yellow; note that this will not include any peak parameters which are defined
by formulae and whose values are therefore linked to those of other cells.

(ii) You will now need to manually start the Solver , using the entry on the Data tab (Office 2007),
or under the Tools menu (earlier versions).
When the Solver Parameters dialog box appears you should ensure that the cells whose
values may be automatically varied are correct. You can check this by clicking in the “By
Changing Cells” edit box and the cells will be briefly highlighted on the main worksheet. If
you wish to change these it is generally best to delete all the existing entries and then use the
mouse to select the cells to be varied. Hold down the Ctrl key whilst using the mouse to
make additional selections.

(iii) Press the Solve button on the Solver Parameters dialog box.

Note :
1. You can halt the fitting process at any time by pressing the Esc key.
2. It is possible to add constraints on the parameters within Solver, although this is not usually
necessary or particularly recommended. Nevertheless, if you do not, you must check that the
fitted-results are reasonable; in particular you are advised to check that the Gaussian-
Lorentzian mix of each peak is within the permitted bounds (0–1).
3. If you wish to pause and view the results after each iteration then this may be done using the
Options button on the Solver Parameters dialog box.

Troubleshooting

If the macros fail to run, giving various obscure error messages, then it is usually due to the
incorrect libraries being referenced.
Manually loading the Solver, whilst the spreadsheet is open, and then re-saving the Excel file often
solves this problem (this is the basis for the installation procedure described above).
You can also check the References associated with the macros using the procedures outlined in the
online Help of Excel.

Disclaimer

If you use this program then you do so at your own risk ! The author takes no responsibility for the
accuracy of any results produced by the program or for any actions you may base on them.

Contact Details

Dr. Roger Nix E-mail : [email protected]


School of Biological & Chemical Sciences Fax : +44 20 7882 7427
Queen Mary, University of London
Mile End Road
London E1 4NS , UK
Last updated: 20/05/2010

You might also like