Evaluation of EELS spectrum imaging data by spectral components and factors from multivariate analysis

In this paper, we employ the dimension reduction from multivariate analysis to evaluate EELS spectrum imaging data. Signal integration of the Sn-M4,5 edges with delayed onset and the profile of the Fe-L3 white line are quantitatively analysed based on supervision of three spectral components instead of individual pixels.


Introduction
Since the early days of electron energy loss spectroscopy (EELS), multivariate analysis (MVA) has been introduced to process EELS data [1]. As advancing EELS acquisition routines generate increasingly bigger datasets [2,3], MVA has been widely acknowledged as a powerful tool to process EELS datasets, including spatially resolved spectrum imaging in two dimensions [4][5][6][7][8][9][10][11] and three dimensions [12][13][14], and sets of angular-resolved [15] or site-specific [16] spectra. With the development in MVA algorithms, principal component analysis (PCA) [17], independent component analysis [18], non-negative matrix factorization (NMF) [19] and geometric extraction methods [20] (such as vertex component analysis and Bayesien linear unmixing [21]) have been applied to treat EELS data. These methods have shown success in noise reduction and have been applied to identify fine structures either around the absorption edge onset or in the valence EELS regime.
MVA algorithms decompose a spectrum imaging dataset into the linear combination of a few spectral components, as expressed by Eq. (1), the linear combination. Equation (1) is usually an approximation, neglecting the residual term after the linear combination. At each pixel p, f p is expressed as a linear combination of i spectral components f i with the coefficients c p,i , which is also known as the score matrix. As the number of components i is usually much smaller than the number of pixels p, f i is a sparse representation of f p , reducing its dimension by p-i. Such dimension reduction has enabled a concise representation of spectrum imaging datasets by a number of spectral components with their corresponding coefficients at each pixel for each component. Thus far, MVA has been widely applied to decompose spectrum imaging datasets [4][5][6][7][8][9][10][11][12][13][14]. However, interpretation on the MVA spectral components remains descriptive and qualitative. It is more efficient to capitalize on the dimension reduction and evaluate the spectral components instead of the spectrum at individual pixels. The computing power will not be saved by such an approach, as the MVA algorithms themselves take more time to perform. On the other hand, the man power to supervise and present the spectrum imaging can greatly benefit from a dimension reduction.
In this article, we demonstrate the component-based supervision to evaluate EELS spectrum imaging data, and bridge the gap between MVA analysis and conventional (pixel-based) EELS quantification routines. Evaluation of quantitative information from EELS spectra requires proper modelling. Model-based quantification, such as EELSModel developed by Verbeeck et al. [22], composes an EELS spectrum by element-specific edges and background from the preceding edges, which requires detailed information on the constituents in the sample. It is more common to analyse one absorption edge at a time using assigned energy windows in the vicinity of the edge for background subtraction and signal integration [23]. The selection of energy windows is a necessary supervision for EELS analysis. Enforcing such supervision on individual pixels is a laborious work, prone to bias, and hence rarely done in practice. Making use of the dimension reduction from MVA analysis, supervision on the component level becomes practical, as the linear combination coefficients c p,i from MVA algorithms are unsupervised and unbiased. We examine two case studies to evaluate the signal of an absorption edge and the chemical shift of a white line feature, respectively, all based on the component-based supervision.

Data Acquisition
We used thin film hematite (α-Fe 2 O 3 ) photoelectrodes as materials systems for the case studies, where Sn dopants are introduced to enhance their photoelectrochemical activity for solar-driven hydrogen production [24]. The distribution of Sn dopants is discussed for three cases, uniformly doped Sn (denoted as Sn: Fe 2 O 3 ), partially doped Sn (denoted as Sn/: Fe 2 O 3 ), and without Sn dopants (Fe 2 O 3 ). Two quantities are of interest from the EELS spectrum imaging datasets, the signal from the Sn-M 4,5 edges to evaluate the elemental distribution, and the chemical shift of the Fe-L 3 white line that shows the oxidation state of Fe.
Electron-transparent specimens were prepared by Ar + ion milling and investigated in a FEI Titan Themis microscope operated at 300 kV. Aberration correction of the probe forming lenses enables a scanning probe of 24 mrad convergence semi-angle and~1 Å probe size. Scanning transmission electron microscopy (STEM) images were collected by the annular bright field (ABF) and the high angle annular dark field (HAADF) detectors that cover the range of 8-16 mrad and 73-352 mrad, respectively. STEM-EELS spectrum imaging was acquired using a Gatan Quantum ERS energy filter in the image-coupled mode with a 35 mrad entrance aperture. Dual EELS collection mode enabled the zero loss peak (ZLP) alignment at individual pixels. Spectra were acquired from relatively thin areas with thicknesses of 0.3-0.5 times the inelastic mean free path. Therefore, the spectra primarily consist of singlescattered inelastic events so that deconvolution with the help of the low loss spectra was not conducted. To minimize specimen damage, charging, and the subsequent drift, moderate dose (0.1 nA probe current and 0.1 s pixel acquisition time) was used to collect spectrum imaging data at a 1 nm × 1 nm pixel size.

Data Analysis
As shown in Fig. 1a, the thin film photoelectrode grown by atomic layer deposition is much thinner than the fluorine doped SnO 2 substrate. This makes quantification of Sn dopants in the hematite thin films by energy dispersive X-ray spectroscopy very challenging, as nonlocal X-ray excitation (e.g. due to stray electrons and fluorescence artefacts) from SnO 2 contributes to the signal. On the other hand, EELS only collect forward scattered electrons (up to 35 mrad in this study), so that the signal only contains local inelastic scattering events [23]. The most convenient edges to study are Sn-M 4,5 edge, which has a delayed edge onset from~480 eV and overlaps with the O-K edge from 530 eV, and the Fe-L 2,3 white lines with onset from~710 eV, as shown in Fig. 1b.
First, we show an example on the conventional evaluation (analysed pixel by pixel) of a spectrum imaging across the SnO 2 |Sn/:Fe 2 O 3 interface shown in Fig. 1a. For simplicity, the same supervision was applied for each pixel here, including the edge integration window (500-525 eV to avoid overlapping with O-K), the background model (power law), and the background fitting window (450-480 eV). Adjusting these parameters for individual pixels is not only exhaustive, but prone to bias. Due to the moderate dose, the spectrum at each pixel is noisy, as shown in Fig. 2a. Consequently, the power law modelling of the background returns noisy parameters, as shown in Fig. 2b, and hence the signal integral is also noisy. There is no finer detail in the signal integral than the higher amount found in SnO 2 with respect to Sn/:Fe 2 O 3 .
Noise reduction through PCA is a well-established routine in the EELS community, which has been implemented in the Digital Micrograph software as the MSA plug-in [25]. Application of PCA routine to the dataset returns a scree plot, as shown in Fig. 2c, which aligns the spectral  components with respect to their explained variance. It is clear that two components stand out explaining the most variance from the dataset, whereas the third component is slightly higher than the following components showing a continuous decay of explained variance from the dataset. In this case, we treat the components starting from the fourth as noise components and set their c p,i coefficients to 0 to reconstruct the dataset from the first three components, resulting in a denoised spectrum imaging. Figure 2a shows a denoised spectrum at the same pixel to compare with the original one. As shown in Fig. 2d, the power law background fitting on the denoised spectrum imaging returns less noisy parameters and the signal integral is consequently clearer. It is evident from the denoised signal integral that the top half of the Sn/: Fe 2 O 3 film has more Sn than the bottom half. The different Sn doping level in the Sn/: Fe 2 O 3 film (top half doped, bottom half nominally undoped) was engineered in the atomic layer deposition process and can only be verified in this example after the PCA denoise routine.
By a sparse representation of an EELS spectrum, MVA analysis not only enables signal identification and noise removal, but also offers the opportunity to supervise on the individual components instead of individual pixels. This can be expressed by the following equation, is the signal of the absorption edge obtained after background subtraction of the EELS spectrum ( ) f E p at each pixel, and ( ) = ( ) − ( ) is the signal of the absorption edge for each spectral component. As shown by Eq. (2), summation of the signal counts at individual pixels ( ) I E p over an energy range is a linear operation that can be done by linear combinations of such summation of the spectral components ( ) . As a result, to evaluate the signal counts, supervision on background modelling can benefit from the dimension reduction from all pixels Physically, both the EELS signal and background are expected to be positive or 0. Moreover, it is intuitive to decompose the spectrum datasets into non-negative coefficients. The NMF approach decomposes the spectrum imaging into non-negative coefficients and non-negative spectral components, and thereby facilitating the interpretation of individual components. With the development of MVA algorithms, the options for decomposing EELS datasets are ever increasing [19,20]. The decomposed spectral components may all serve as input for further processing. In the following examples, we use the NMF algorithm as described in the scikit learn toolkit [26], which is also used in the open source Hyperspy software [27]. We then focus on the post processing of the MVA spectral components to extract quantitative values for EELS analysis. The following evaluation routines are written in a Matlab package that offers a guided way to process EELS spectrum imaging datasets [28].
We continue with the aforementioned example to show the evaluation of Sn-M 4,5 edge counts from componentbased analysis and background modelling. In addition to the dataset on the SnO 2 |Sn/:Fe 2 O 3 interface, another dataset on the SnO 2 |Fe 2 O 3 interface is included that contains spectra from pure Fe 2 O 3 to compare with. The combined datasets are decomposed by NMF into spectral components (Fig. 3a) and their corresponding coefficient maps (Fig. 3b). The spectral components are normalized with respect to their corresponding coefficient maps that are set to have an average value of 1. The NMF component 1 has higher coefficients on the sample and follows a power law profile, which reflects the background. Component 2 has higher coefficients where Sn is abundant and reveals the profile of Sn-M 4,5 edge with a delayed onset. Component 3 has a noisy origin and does not show spectral characteristics from any edges of interest.
Going beyond the qualitative description, background modelling on individual components is required for quantitative analysis. Fitting the background of component 1 is straightforward, as it follows a power law (in the form of − aE r ) with exponent r = 3.14 over the modelled energy range. The signal integration for this component is 0. It is obvious that components 2 and 3 do not follow a power law function within any range of energy loss. Although, linear combination of power law functions has been used to model EELS backgrounds [29], such combinations do not return a power law function. In order to quantify the signal integral of the Sn-M 4,5 edge, the background of components 2 and 3 is modelled by functions that can be combined linearly, for example, linear functions. As shown in Fig. 3a, the background of component 2 was modelled as a constant before the edge onset, whereas the background of component 3 was also chosen as a constant before the signal integral window to minimize the effect of the preceding feature. The signal integrals of components 2 and 3 are calculated, and those of individual pixels are reconstructed using Eq. (2). The resulting evaluation of signal integral is very close to the evaluation from individual pixels, as shown by the line profile in Fig. 3c. The bottom half of the Sn/:Fe 2 O 3 film (right spectrum imaging) has the same level of Sn counts as the pure Fe 2 O 3 film (left spectrum imaging) and the vacuum area. Therefore, the amount of Sn between SnO 2 and the top half of Sn/:Fe 2 O 3 is below the detection limit, in accordance with the designed film doping profile. In the top part of the Sn/:Fe 2 O 3 film (right spectrum imaging), a Sn signal is detected. In this example, component-based supervision reproduces the quantification from the conventional (pixel-based) routine, while the supervision on the background model for three components replaces the supervision on 650 pixels.
Despite having only three spectral components, supervision on the background subtraction is far from straightforward, as there is no definite function to model. In the example above, the background is modelled by the linear combination of a power law function and two constants, as shown in Fig. 3a. The power law exponent r = 3.14 of component 1 is close to the maximum exponent among individual pixels, as shown in Fig. 2d. Adding constants to such a background effectively reduces the power law exponent. In order to quantify the difference between power law functions, we make use of the fact that the multiplication of two power law functions returns a power law function. Instead of decomposing the spectrum imaging dataset into spectral components, the spectrum imaging can be factorized into spectral factors, In order to realize factorization by means of linear MVA algorithms, a logarithmic operation needs to be taken, as formulated in Eq. as input for MVA algorithms, and taking the exponents of the output ( ) f E ln i as spectral factors. As an example, the EELS spectrum imaging shown in Fig. 3 was taken the logarithmic operation and underwent NMF decomposition to factorize into spectral factors (Fig. 4a) and their corresponding coefficient maps (Fig. 4b).
As shown in Fig. 4a, background modelling on the spectral factors ( ) f E ln i becomes more straightforward using a linear fit against ln (E) before the edge onset. In order to reconstruct the power law background of individual pixels, the form of the power law function is put into Eq. (3), which is then rearranged into Eq. (4), where a i and r i are the prefactor and the exponent of the power law function for each spectral factor, respectively, and a p and r p are the power law parameters at each pixel. In this example, the component-based supervision allows for a selection of different windows for the power law fitting of the background. As shown in Fig. 4a, spectral factors ( ) f E ln i for i = 1, 2 are linear with respect to ln(E) in the window between 450 and 480 eV, before the Sn-M 4,5 edge onset. Factor 3, on the other hand, is not linear in that range, as a dip is observed around 465 eV, and the fitting window is chosen between 475 and 495 eV. From the coefficient map in Fig. 4b, it is shown that factor 3 mainly contributes to the area beyond the thin film (the glue line and vacuum) of the left spectrum imaging, which does not relate to the Sn-M 4,5 edge. The power law exponents for each pixel are then reconstructed from the three factors and their coefficient maps according to Eq. (4), as shown in Fig. 4c. A comparison there with a pixel by pixel power law fitting using a fixed window shows a good agreement between the two approaches. Fitting the background from the spectral factors offers a more straightforward supervision by offering the same function of power law (or a linear function in the logarithmic form, see Fig. 4a) and the flexibility on the fitting window.
Besides modelling the power law background, the logarithmic formulation Eq. (3) can be useful to study other mathematic functions that can be factorized. For example, the Gaussian shape function can be modelled using the following expression, where a i , μ i and σ i are the height, the centre, and the width of the Gaussian shape function for each spectral factor, respectively, and a p , μ p and σ p are the Gaussian shape parameters at each pixel, which can be reconstructed using Eq. (5). We use the Fe-L 3 peak as a case study for Gaussian fitting to determine the chemical shift. As shown in Fig. 5b, two datasets are combined together, representing a scan across a Si|Fe 2 O 3 interface for the left dataset and a scan across a Si|Sn:Fe 2 O 3 interface for the right. The background of the Fe-L 3 peak was modelled by supervising individual spectral factors and reconstructing using Eq. (4), as introduced in the preceding example. Then, the Fe-L 3 peak signal is subjected to the NMF decomposition in the logarithmic formulation Eq. (3) into the spectral factors (Fig. 5a) and their corresponding coefficient maps (Fig. 5b). A quadratic fitting on each spectral factor is performed to model a i , μ i and σ i of the Gaussian peak. In comparison with the centre of factor 1, factor 2 represents a shift to the right (μ 2 > μ 1 ), whereas factor 3 represents a shift to the left (μ 3 < μ 1 ). It is shown in Fig. 5d that factor 1 comes from undoped and doped Fe 2 O 3 of both spectrum imaging, factor 2 mainly from areas without Fe 2 O 3 , and factor 3 from the homogeneously doped Sn:Fe 2 O 3 film (right spectrum imaging) as well as the interface and surface of undoped Fe 2 O 3 film (left spectrum imaging). A chemical shift of the Fe-L 3 edge correlates to the bonding environment and especially the oxidation state of Fe atoms. As hematite (undoped Fe 2 O 3 ) only consists of Fe 3+ , a chemical shift to lower energy loss indicates a lower oxidation state of Fe, for example, reduction to Fe 2+ [30]. A reconstruction of the Gaussian peak parameters using Eq. (5) then returns a left shift of the peak at the pixels where factor 3 has large coefficients, as shown by a line profile in Fig. 5c. The quantified Gaussian parameters are compared with those fitted for individual pixels in Fig. 5c and 5d, where a discrepancy is evident. This is because modelling the spectral factors (Fig. 5a) as Gaussian functions has a big discrepancy. For example, factor 1 has a noticeable deviation from a Gaussian shape, showing a broader profile. As a result, the width derived from spectral factors is lower than the width modelled at individual pixels, as shown in Fig. 5d. Moreover, factor 2 has several peak features, whereas the modelled peak only takes their enveloped shape into account. Despite the conventional modelling of the white line features by Gaussian peaks, a spectrum imaging may be impossible to be factorized into Gaussian peaks. Indeed, many more types of functions have been applied to model a white line feature to model the chemical shift [30].
In order to propose a universal way to model the peak position, we return to the linear formulation Eq. (1). Instead of doing peak fitting, we approximate the centre and the width of the peak profiles by their statistical mean and variance, as shown by the following expressions, where μ p and σ p are the statistical mean and variance at each pixel, and the other variables are defined in Eq. (2). Similar to Eq. (2), individual terms in the numerators and denominators of Eqs. (6) and (7) can be expressed as linear combination of quantities from the spectral components, including their first and second moments. Unlike the previous example (Fig. 5) where each spectral factor is fit to a Gaussian shape, the spectral components discussed here do not need to have a Gaussian shape to derive their moments for the reconstruction of the peak shape parameters at each pixel using Eqs. (6) and (7).
As an example, the Fe-L 3 peak signal from the preceding example underwent NMF decomposition in the linear formulation Eq. (1) to compute the spectral components (Fig. 6a) and their corresponding coefficient maps (Fig. 6b). The background of each spectral component is modelled by power law and linear fitting introduced in the example of Fig. 3. Figure 6a displays the spectral components after background subtraction, where negative values may show up (e.g. component 2). The supervision on each spectral component is necessary to find an energy window so that the resulting centre of intensity coincides with their respective peak positions, as shown in Fig. 6a. By using this approach, there is a much improved numerical agreement on the peak position with the Gaussian analysis at individual pixels, as shown in Fig. 6c. Moreover, as shown in Fig. 6d, the peak width reconstructed from the variance of individual components has the same trend as the Gaussian width determined from individual pixels. Component-based supervision on the window selection can be a reliable way to reconstruct the position (chemical shift) and the width of a peak feature and replace the supervision and curve fitting for individual pixels.

Conclusion
In summary, we have employed MVA analyses to reduce the dimension of EELS spectrum imaging datasets and thereby facilitating the supervision for further evaluation. This has been employed to model the integral counts as well as the centre and width of peak features. Using the logarithmic formulation introduced to factorize the dataset, parameters of power law background can be reconstructed, and deviation from a Gaussian peak is visualized. These utilities are implemented in a Matlab package. More utilities to model and analyse EELS spectrum imaging datasets can benefit from component-based supervision facilitated by MVA analysis.