XPS techniques have been extensively used in scientific researches. the analysis of XPS data does not only include the peak fitting, but also include the quantification of the measured core level peaks, from which one could calculate the atomic density in the measured sample. Here in my script, I made a GUI that enables one to calculate the atomic ratio between two elements. Depending on the different sample surfaces (bulk or thin films), the quantification process will be different. I have considered the photon-energy dependent photoionization cross sections and the inelastic mean free path (both TPP-2M and a simplified version). First, the IMFP is defined:
ft1[KE_, Z_, eg_, a_] :=
Module[{KE0 = KE, Z0 = Z, eg0 = eg, a0 = a},
Return[(a0^1.7)*(4 + 0.44 Z0^0.5 +
0.104 KE0^0.872)/((Z0^0.38)*(1 - 0.02 eg0))]]
then a figure-showing function is defined to show different XPS models
figmodel[model_] :=
Module[{mo0 = model, im},
SetDirectory[FileNameJoin[{currentpath, "images"}]];
im = Image[Import[mo0], ImageSize -> 100]]
finally, the main function "calculate" is defined with many parameters, when clicking the calculate, one could get the final result, as shown in the figure in the beginning. In this function, one needs to input what elements you want to compare (e.g., c1s, o1s, or n1s), then input the peak areas, which has to be background subtracted. If the sample contains a thin film on top, one has to input the thickness of the thin film. the cross section is aquired from the website(https://vuo.elettra.eu/services/elements/WebElements.html)
calcalator[element1_, element2_, area1_, area2_, penergy_, model_,
zvag_, eg_, a_, BE1_, BE2_, fthickness_] :=
Module[{element10 = element1, element20 = element2, area10 = area1,
area20 = area2, penergy0 = penergy, model0 = model, zvag0 = zvag,
eg0 = eg, a0 = a, BE10 = BE1, BE20 = BE2, fthickness0 = fthickness,
element1cs, element2cs, element1func, element1csv, element2func,
element2csv},
SetDirectory[FileNameJoin[{currentpath, "cs"}]];
element1cs = Import[element10];
element2cs = Import[element20];
element1func = Interpolation[element1cs[[All, 1 ;; 2]]];
element1csv = element1func[penergy0];
element2func = Interpolation[element2cs[[All, 1 ;; 2]]];
element2csv =
element2func[penergy0];(*crosssection interpolation in the table*)
If[model0 == "bulk",
If[ element10 == element20,
Print["---------------"];
Print["Area=N*fph*crosssection*IMFP*Transmission(E)*Cos(thetA)*A"];
Print["CS and IMFP ignored, only area considered"];
Print["element density ratio is: N1/N2=Area1/Area2= ",
area10/area20],
Print["---------------"];
Print["Area=N*fph*crosssection*IMFP*Transmission(E)*Cos(thetA)*A"];
Print["CS and IMFP considered"];
Print["CS1= ", element1csv, ", IMFP1= ",
ft1[penergy0 - BE10, zvag0, eg0, a0] ];
Print["CS2= ", element2csv , ", IMFP2= ",
ft1[penergy0 - BE20, zvag0, eg0, a0]];
Print[
"element density ratio is: \
N1/N2=Area1*CS2*IMFP2/(Area2*CS1*IMFP1)= ",
area10*element2csv*
ft1[penergy0 - BE20, zvag0, eg0,
a0]/(area20*element1csv*
ft1[penergy0 - BE10, zvag0, eg0, a0])]
],
If[model0 == "layer1",
If[element10 == element20,
Print["---------------"];
Print["Area=N*crosssection*IMFP*(1-exp(-d/IMFP))"];
Print["CS and IMFP ignored, only area considered"];
Print["element density ratio is: N1/N2=Area1/Area2= ",
area10/area20],
Print["---------------"];
Print["Area=N*crosssection*IMFP*(1-exp(-d/IMFP))"];
Print["CS and IMFP considered"];
Print["CS1= ", element1csv, ", IMFP1= ",
ft1[penergy0 - BE10, zvag0, eg0, a0] ];
Print["CS2= ", element2csv , ", IMFP2= ",
ft1[penergy0 - BE20, zvag0, eg0, a0]];
Print[
"element density ratio is: \
N1/N2=Area1*CS2*IMFP2*(1-exp(-d/IMFP2))/(Area2*CS1*IMFP1*(1-exp(-d/\
IMFP1)))= ",
area10*element2csv*
ft1[penergy0 - BE20, zvag0, eg0,
a0]*(1 -
Exp[-fthickness0/
ft1[penergy0 - BE20, zvag0, eg0, a0]])/(area20*
element1csv*
ft1[penergy0 - BE10, zvag0, eg0,
a0]*(1 -
Exp[-fthickness0/ft1[penergy0 - BE10, zvag0, eg0, a0]]))]
],
If[model0 == "layer2",
If[element10 == element20,
Print["---------------"];
Print[
"Area1(toplayer)=N1*crosssection*IMFP*(1-exp(-d/IMFP1))"];
Print["Area2(substrate)=N2*crosssection*IMFP*(exp(-d/IMFP2))"];
Print["CS ignored, IMFP1=IMFP2"];
Print["CS1= ", element1csv, ", IMFP1= ",
ft1[penergy0 - BE10, zvag0, eg0, a0] ];
Print["CS2= ", element2csv , ", IMFP2= ",
ft1[penergy0 - BE20, zvag0, eg0, a0]];
Print[
"element density ratio is: \
N1/N2=Area1*exp(-d/IMFP2)/(Area2*(1-exp(-d/IMFP1)))= ",
area10*Exp[-fthickness0/
ft1[penergy0 - BE20, zvag0, eg0,
a0]]/(area20*(1 -
Exp[-fthickness0/ft1[penergy0 - BE10, zvag0, eg0, a0]]))],
Print["---------------"];
Print[
"Area1(toplayer)=N1*crosssection1*IMFP1*(1-exp(-d/IMFP1))"];
Print["Area2(substrate)=N2*crosssection2*IMFP2*(exp(-d/IMFP2))"];
Print["CS and IMFP considered"];
Print["CS1= ", element1csv, ", IMFP1= ",
ft1[penergy0 - BE10, zvag0, eg0, a0] ];
Print["CS2= ", element2csv , ", IMFP2= ",
ft1[penergy0 - BE20, zvag0, eg0, a0]];
Print[
"element density ratio is: \
N1/N2=Area1*CS2*IMFP2*exp(-d/IMFP2)/(Area2*CS1*IMFP1*(1-exp(-d/IMFP1))\
)= ", area10*element2csv*ft1[penergy0 - BE20, zvag0, eg0, a0]*
Exp[-fthickness0/
ft1[penergy0 - BE20, zvag0, eg0, a0]]/(area20*element1csv*
ft1[penergy0 - BE10, zvag0, eg0,
a0]*(1 -
Exp[-fthickness0/
ft1[penergy0 - BE10, zvag0, eg0, a0]]))]
],
If[model0 == "layer3",
If[element10 == element20,
Print["---------------"];
Print["Area=N*crosssection*IMFP*exp(-d/IMFP)"];
Print["CS and IMFP ignored"];
Print["CS1= ", element1csv, ", IMFP1= ",
ft1[penergy0 - BE10, zvag0, eg0, a0] ];
Print["CS2= ", element2csv , ", IMFP2= ",
ft1[penergy0 - BE20, zvag0, eg0, a0]];
Print["element density ratio is: N1/N2=Area1/Area2= ",
area10/area20],
Print["---------------"];
Print["Area1=N1*crosssection1*IMFP1*exp(-d/IMFP1)"];
Print["Area2=N2*crosssection2*IMFP2*exp(-d/IMFP2)"];
Print["CS and IMFP considered"];
Print["CS1= ", element1csv, ", IMFP1= ",
ft1[penergy0 - BE10, zvag0, eg0, a0] ];
Print["CS2= ", element2csv , ", IMFP2= ",
ft1[penergy0 - BE20, zvag0, eg0, a0]];
Print[
"element density ratio is: \
N1/N2=Area1*CS2*IMFP2*exp(-d/IMFP2)/(Area2*CS1*IMFP1*exp(-d/IMFP1))= \
", area10*element2csv*ft1[penergy0 - BE20, zvag0, eg0, a0]*
Exp[-fthickness0/
ft1[penergy0 - BE20, zvag0, eg0, a0]]/(area20*element1csv*
ft1[penergy0 - BE10, zvag0, eg0, a0]*
Exp[-fthickness0/ft1[penergy0 - BE10, zvag0, eg0, a0]])]
]
]
]
]
]]
Open problems: the precision of photoinization cross section needs to be further optimized, current results are based on the data from <a href="https://vuo.elettra.eu/services/elements/WebElements.html。">https://vuo.elettra.eu/services/elements/WebElements.html。