Fitting multiple files

    AAnalyzer counts with unique algorithms for fitting multiple files. These apply when fitting several spectra of the same type, such as Ti 2p spectra obtained from samples with different processing parameters. This section will explain different ways to fit multiple files using as an example O 1s spectra obtained at various angles.

  • AAnalyzer allows the user to plot several files on the “data and fits plot” tab. This can be done by uploading more files onto AAnalyzer in the “data” tab. Each row on the “data” tab represents an individual file. Press the “open” button and select the file that you want to upload (you may add up to 14 files). For a better functionality, the spectral range of all uploaded files should be similar. Make sure to indicate whether the channel corresponding to the “x” axis is binding or kinetic energy. For more information about how to upload files, please refer to the “open and plot files” instructional tab.

  • Once you have uploaded your desired number of files, press the “plot all” button located near the upper right corner in the “data and fits plot”; you should be able to see all data from all your files on the plot. As you can see, the "use BE" box is checked. This changes the horizontal scale from kinetic to binding energy employing the photon energy indicated in the box below the "Use BE" checkbox.

  • Once you have the data plotted, you may begin drawing the peaks (this process is also described in the “fitting with singlet peaks” instructional tab). Check the “edit peaks with mouse” box in the right side of the window, and click-and-drag across the width of the peak. Repeat this process for as many peaks you might have. Note that you only need to draw the peaks for only one file; AAnalyzer will automatically use the parameters of these peaks and apply them to the rest of the files.

  • Please note how AAnalyzer has automatically placed a baseline for your peak. The parameters for the baseline can be seen in the "Fitting Parameters" Tab in AAnalyzer.

  • Once you begin drawing peaks, the plot will only show data from the last file plotted. This will avoid a crowded-looking plot. However, you can still see all the data from all the files by clicking the corresponding “data button(s)”, as shown in the following image.

  • To return to the original setting, press the “clear all” button, and then press the last data button to plot the data (in this case, it was data 3), as well as its corresponding peak button. You can continue drawing the peaks at any time.

  • Note that the color of the peaks changes to facilitate visual distinction. Once you are done drawing your peaks, your window should look similar to the following image.

  • Under the “fitting parameters” tab, add the background you need. For more information about how to add baselines and backgrounds, please refer to the “Fitting singlet peaks” or “Background options” instructional tabs. As you can see, AAnalyzer uses as default the Active Baseline and Background option. Should you wish to use the traditional (Static) option, simply click the "USE STATIC" checkbox beneath.

  • To begin the fitting process, press any of the fitting buttons located on the upper right corner of the window under the “data and fits plot” tab. Fit 1/1 – The first fitting option fits all free parameters for all files, one file by one, in a sequential manner. Each file will have its own set of fitting parameter values. Fit 1/1 ? – The second fitting option also fits all free parameters for all files, one file by one, in a sequential manner; however, it provides more precise parameter values. Likewise, each file will have its own set of fitting parameter values. Fit all – The third fitting option fits all “free” parameters (parameters in red font) of all files simultaneously. The center and width of the peaks are fitted to the same values for all the data; however, it allows for different peak areas. This method provides a fast and efficient simultaneous fit. Fit all ? – The fourth fitting option fits all parameters simultaneously of all files, as with the third option; however, it provides a more precise optimized value for each parameter.

  • The main difference between the first pair (sequential fitting) and the second pair of fitting options is that the second pair fits the data of all files with a unique process called “simultaneous fitting”. Simultaneous fitting means that for each peak created, AAnalyzer will recreate the peak in each file with the exact same center and width. This can be further explained with the “results table” tab. For more information about how to use the results table, please refer to the “Using the Results Plot and Results Table” instructional tab. The results table allows the user to compare values of a single parameter from the same peak located in different files. Each row represents a file while each column represents a peak. When fitting sequentially, AAnalyzer optimizes energy and width values (among other parameters) individually. This means that there will be a different optimized energy value for the same peak found among different files, as shown in the following image

  • This example of a sequential fit provides optimized energy values with slight differences for each peak among the different files. “Resolving overlapping peaks in ARXPS data: The effect of noise and fitting method.” J. Muñoz-Flores, A. Herrera-Gomez, J. Electron Spectrosc. Relat. Phenom. 184 (2012) 533.

  • When fitting simultaneously, AAnalyzer optimizes energy and width values conjunctly. This means that the energy and width values for a peak among different files will be exactly the same, as shown in the following image.

  • Simultaneous fitting increases the accuracy of the peaks’ parameters. Having a single value of energy for the same peak in different files is also a more accurate interpretation of the spectrum taken at different angles. On the other hand, if one were to fit all peaks sequentially, the energy centers would still be relatively close, but the fitting process is prone to more uncertainties due to the differences in energies of the same peak.

  • Back on the data tab, press either the 3rd or 4th fitting button to get a simultaneous fit, or the 1st or 2nd fitting button to get a sequential fit. The following example was fitted simultaneously.

  • After fitting, AAnalyzer will only show the data and peaks from the last file in the list. Press “plot all” to see the data from all the files.

  • To see peaks from an individual file on the plot, press the “peak” button corresponding to the file you desire.

  • To load the peak’s parameters from an individual file into the “fitting parameters” tab, select the file from the drop box next to the “from data #”, located in the “fitting parameters” tab. Please note that “data 0” refers to your first file in the “data” tab, and “data 1” refers to your second file, and so on. Once you have selected your desired file, press the “from data #” button near the top edge of the window to load the peak’s parameters. The parameters can also be viewed and displayed in the “results table” and “results plot” tabs. For more information, please refer to the “Using the “results table” and “results plot”” instructional tab.

  • To save your progress, click the “save” button in the upper right corner of the “data” tab. This will save all information inputted in the “data” tab, as well as parameter information in the “fitting parameters” tab. For more information about other saving options, please refer to the “Saving Options” instructional tab. When you reopen AAnalyzer, you will be able to access any project you worked on by selecting it in the pop up window mentioned at the beginning of this section. The last project you saved will be the default file in the open box.