Introduction

LG4X-V2 is based on the great work of Hideki NAKAJIMA who developed the software LG4X. LGX4 was published under the MIT License. For more information please refer to the License of LG4X-V2. The following README is currently under revision and was originally written by Hideki NAKAJIMA for LG4X, therefore several features of LG4X-V2 are not yet documented!

Installation and Requirements:

Please read the Setup-section for an installation instruction.

Test environment:

The functionality of LG4X-V2 was tested using the following environment:

Supplementary codes for XPS analysis

xpspy.py should be located in the same directory as main.py for XPS energy range selection for background (BG) subtraction in Shirley and Tougaard methods, which are taken from codes by Kane O’Donnell and James Mudd.

vamas.py and vamas_export.py are also necessary for importing ISO VAMAS format file. vamas.py is a modifed class of VAMAS format from Kane O’Donnell.

periodictable.py and periodictableui.py are the periodic table window to identify the peak elements. The codes are based on and revised from clusterid.

elements.py and elementdata.py are the class for peak energy and sensitivity used in the priodic table above. The codes are based on and revised from clusterid.

Start LG4X

python3 main.py

Principle usage

  1. Import data
    • Import csv, text, or vamas (.vms/.npl) file format.
    • All csv and text files in a directory.
    • Choose data from file list if it was already imported.
  2. Setup background and peak parameters with their types
    • Select energy range of spectrum for optimization.
    • Setup initial BG parameters including polynomial coefficients.
    • Setup peak model and its parameters.
    • Increase and decrease the number of peaks.
    • Load a preset file if available.
  3. Evaluate parameters
    • Plot the curves without optimization.
    • Simulate the curves based on the range and peaks if no data file is selected in the File list.
  4. Fit curve
    • Adjust parameters and bounds until they become converged
  5. Export results
    • Export csv file for curves
    • Export text file for parameters
    • Save parameters as a preset for next analysis

Export csv file for curves

The exported .csv file contains the raw data as well as all fitted components: Thereby, the first and second column contain the input data, respectively the x and y data. The third column contains the intensity data minus the background. In the forth column, the sum over all components is given, if you wish to plot your data without background, this would be the sum curve over all components you wish to plot. In column five and six, the background and the polynomial background are given. Important to note that the background already contains the polynomial background, the polynomial background in column six is only given because LG4X-V2 adds a polynomial background to each fit, if the parameters pg_i are not fixed to 0. In the seventh column, the sum curve over all components and backgrounds is given, that’s the sum curve you wish to plot if you are using the raw intensities including the background to present your data. The following columns contain the components of the fit model.

Home directory to import data

You can change the HOME directory in the main.py edited in a way below. # makes a line comment out.

# Home directory

self.filePath = QtCore.QDir.homePath()

# self.filePath = '/Users/hidekinakajima/Desktop/WFH2021_2/lg4x/LG4X-master/Python/'

Citing

https://doi.org/10.5281/zenodo.3901523

Video

YouTube: Introduction of LG4X

YouTube: Installation of LG4X in miniconda3 environment

Database reference

X-ray data booklet for binding energy

  • http://xdb.lbl.gov/

“Hartree-Slater subshell photoionization cross-sections at 1254 and 1487 eV” J. H. Scofield, Journal of Electron Spectroscopy and Related Phenomena, 8129-137 (1976).

  • http://dx.doi.org/10.1016/0368-2048(76)80015-1
  • https://a-x-s.org/research/cross-sections/

“Calculated Auger yields and sensitivity factors for KLL-NOO transitions with 1-10 kV primary beams” S. Mroczkowski and D. Lichtman, J. Vac. Sci. Technol. A 3, 1860 (1985).

  • http://dx.doi.org/10.1116/1.572933
  • http://www.materialinterface.com/wp-content/uploads/2014/11/Calculated-AES-yields-Matl-Interface.pdf

(Electron beam energy at 1, 3, 5, and 10 keV for relative cross section and derivative factors)

Interface design

An initial gui concept is taken from here and there.

LG4X interface cencept

Buttons

Evaluate

You can evaluate the fitting parameters without fitting optimization on data spectrum. If you do not select the data, it works as simulation mode in the range you specify in BG table (x_min, x_max, the number of data points pt).

Fit

You can optimize the fitting parameters by least-square method, and parameters in the table are updated after optimization.

Export

LG4X exports fitting results in two different files. One is a text file for fitting conditions _fit.txt, the other is a csv format file for data _fit_csv, which is saved at the same directory of the former file.

Add and rem peak

You can add and remove peak at the end of column from the Fit table.

Importing data

LG4X imports csv format or tab separated text files. A data file should contain two columns. First column is energy and second column is spectral intensity. LG4X skips first row, because it is typically used for column names. Example data files are available in Example. Energy and instensiy are calibrated in the Excel XPS macro (EX3ms) prior to the analysis for convenience. The method of energy calibration is discussed in the link.

VAMAS file format can also be imported in LG4X by decomposing a VAMAS file into the tab separated text files based on the block and sample idenfitifers. Exported tab separated text files are available in the same directory as the VAMAS file. You can just use LG4X to convert the VAMAS file into tab separated text files for the other program you prefer. Note that the binding energy scale is automatically created from VAMAS for XPS and UPS data.

Imported data is displayed in the figure and listed in the file list. You can also open the directory to import all csv and text files in the file list.

File list

Imported file path is added in the list. You can choose the path to import a data file again from the list once you import the data file. Fitting parameters are loaded from Fitting preset menu below.

Fitting preset

Fitting condition can be created in the BG and Fit tables. From fitting preset drop-down menu, you can create the most simple single-peak preset from New. If you have a preset previously saved, you can load a preset file, which will be listed in the Fitting preset. Typical conditions for XPS C1s and C K edge are also available from the list as examples. A preset filename is ended with _pars.dat, and parameters include in the preset file as a list in the following way.

[*BG type index*, [*BG table parameters*], [*Fit table parameters*]]

Periodic table is available to identify the peak position and relative intensity based on XPS Al Kα excitation source (1486.6 eV). If you change the excitation energy hn and work function wf, the core-level and Auger peak energies are revised according to the equation below.

BE = hn - wf - KE

BE represents the binding energy, and KE kinetic energy. The database reference and example usage of periodic table are shown below. Refresh button enables us to display elements in the other dataset, and Clear button removes all elements.

BG types (Shirley BG to be shown as a default)

You can choose the BG type to be subtracted from the raw data as listed below. Shirley and Tougaard BG iteration functions are available from xpypy.py, which should be located with main.py. From lmfit built-in models, 3rd-order polynomial and 3 step functions are implemented. Fermi-Dirac (ThermalDistributionModel) is used for the Fermi edge fitting, and arctan and error functions (StepModel) for NEXAFS K edge BG. Polynomial function is added to the other BG models configured in the BG table, so polynomial parameters have to be taken into account for all BG optimization. You can turn off polynomial parameters by filling all zeros with turning on checkbox. Valence band maximum and secondary electron cutoff can be fitted with the 4th polynomial function for the density of states or edge jump at the onset.

No. String BG model Parameters
0     x_min, x_max for fitting range, data points in simulation pt, hn, wf
1   Shirley BG Initial cv, max iteration number it
2   Tougaard BG B, C, C', D
3 pg Polynomial BG c0, c1, c2, c3
4 bg Fermi-Dirac BG amplitude, center, kt
5 bg Arctan BG amplitude, center, sigma
6 bg Error BG amplitude, center, sigma
7 bg VBM/cutoff center, d1, d2, d3, d4

Tables

BG table

You can specify the range for fitting region in the first row of BG table. Checkbox works as a constraint at the value beside. Range and polynomial rows are independent from the drop-down menu selection for background.

Fit table

All conditions are based on the lmfit built-in models listed in the Fit table. Peak models are listed below. For standard XPS analysis, amplitude ratios amp_ratio and peak differences ctr_diff can be setup from their referenced peak amp_ref and ctr_ref, respectively from drop-down menu in each column. The number of peaks can be varied with add peak and rem peak buttons. Checkbox can be used for either fixing values or bound conditions if you check beside value. Empty cells do not effect to the optimization.

No. String Peak model Parameters
1 g GaussianModel amplitudeamp, centerctr, sigmasig
2 l LorentzianModel amplitude, center, sigma
3 v VoigtModel amplitude, center, sigma, gammagam
4 p PseudoVoigtModel amplitude, center, sigma, fractionfrac
5 e ExponentialGaussianModel amplitude, center, sigma, gamma
6 s SkewedGaussianModel amplitude, center, sigma, gamma
7 a SkewedVoigtModel amplitude, center, sigma, gamma, skew
8 b BreitWignerModel amplitude, center, sigma, q
9 n LognormalModel amplitude, center, sigma
10 d DoniachModel amplitude, center, sigma, gamma
Amplitude ratio and energy difference

XPS doublet peaks are splitted by the spin-orbit coupling based on the atomic theory. Spin-orbit interaction depends on the atomic element and its orbit. The energy separation of doublet corresponds to the spin-orbit constant. Amplitude ratio of doublet is based on the degeneracy (2j+1) of each total angular quantum number (j). LG4X constrains amp_ratio and ctr_diff from a reference peak amp_ref and ctr_ref selected by dropdown menus. For example, Ag3d has j=5/2 and 3/2, and their amplitude ratio corresponds to 3:2. You can setup second peak amplitude ratio by selecting the first peak at j=5/2 and amp_ratio = 0.67. This means that amplitude of second peak at j=3/2 is constrained by a factor of 0.67 against that of first peak. Peak difference parameter also works in a way that second peak position is away from first peak ctr_ref by ctr_diff = 6 eV as shown in the figure below.

Note that amplitude used in the lmfit package is equivalent to the peak area that is propoertional to the amount of element in analytical area and depth by XPS. The atomic ratio is evaluated by the peak area normalized by the sensitivity factor. The ratio of sensitivity factors on doublet peaks is the same as that in multiplicity, so the normalized peak area of one doublet peak is the same as that in other one.

A comprehensive review on XPS technique and analytical procedures is available in link below.

“X-ray photoelectron spectroscopy: Towards reliable binding energy referencing” G. Greczynski and L. Hultman, Progress in Materials Science 107, 100591 (2020).

Examples

XPS C1s spectrum

XPS Ag3d spectrum

NEXAFS C K edge spectrum

UPS Fermi-edge spectrum

Simulated spectrum

Survey scan

You can find the VAMAS format data of various spectra from Spectroscopy Hub.

This guide is based on the guide Hideki NAKAJIMA has written for the predecessor software LG4X. It was adapted to reflect the changes introduced in LG4X-V2.


Table of contents