원시데이터 수집 시스템
선정목록으로

Accurate EELS background subtraction – an adaptable method in MATLAB

간접 관련 산업용 섬유 · (10) 아라미드 (16) CPI(투명 폴리이미드)(21) 에폭시수지

기본 정보

저자
  1. Kayleigh L. Y. Fung — Department of Chemistry, University of Nottingham, University Park, Nottingham NG7 2RD, United Kingdom
  2. Michael W. Fay — Nanoscale and Microscale Research Centre, Cripps South, University of Nottingham, University Park, Nottingham NG7 2RD, United Kingdom
  3. Sean M. Collins — School of Chemical and Process Engineering and School of Chemistry, University of Leeds, Leeds LS2 9JT, United Kingdom
  4. Demie Kepaptsoglou — SuperSTEM Laboratory, SciTech Daresbury Campus, Keckwick Lane, Daresbury WA4 4AD, United Kingdom|||Department of Physics, University of York, Heslington, York YO10 5DD, United Kingdom
  5. Stephen T. Skowron — Department of Chemistry, University of Nottingham, University Park, Nottingham NG7 2RD, United Kingdom
  6. Quentin M. Ramasse — School of Chemical and Process Engineering and School of Physics and Astronomy, University of Leeds, Leeds LS2 9JT, United Kingdom|||SuperSTEM Laboratory, SciTech Daresbury Campus, Keckwick Lane, Daresbury WA4 4AD, United Kingdom
  7. Andrei N. Khlobystov — Nanoscale and Microscale Research Centre, Cripps South, University of Nottingham, University Park, Nottingham NG7 2RD, United Kingdom|||Department of Chemistry, University of Nottingham, University Park, Nottingham NG7 2RD, United Kingdom
DOI
10.1016/j.ultramic.2020.113052
저널
Ultramicroscopy
발행년도
2020
발행기관
Elsevier BV
피인용수
12
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1016/j.ultramic.2020.113052
토픽
Electron and X-Ray Spectroscopy Techniques
OpenAlex ID
W3037895493

평가 내용

관련도
간접 관련
사업분야
산업용 섬유 · (10) 아라미드
부 분야
(16) CPI(투명 폴리이미드), (21) 에폭시수지
R&D 측면
분석·모델링
확신도
0.70
근거 용어
Electron energy loss spectroscopy, EELS, background subtraction, MATLAB, carbon nanotubes
판단 근거
이 논문은 전자 에너지 손실 분광법(EELS) 데이터의 배경 제거를 위한 MATLAB 알고리즘을 다루며, 탄소 나노튜브(SWNT) 및 다이아몬드 복합재를 분석 사례로 사용합니다. 이는 아라미드 나노섬유(10)나 고분자 필름(16), 에폭시/전자재료(21)의 미세 구조 및 화학적 결합 상태를 분석하는 R&D 공정에 간접적으로 활용될 수 있는 분석 기술입니다.
R&D 활용 포인트
아라미드 나노섬유, CPI 필름, 또는 전자재료용 수지의 미세 구조, 원소 조성 및 화학적 결합 상태를 정밀하게 분석하기 위한 전자현미경 데이터 처리 기술로 활용 가능합니다.
평가 입력
본문 57,524자 중 30,032자 발췌

초록

• Electron energy loss spectroscopy (EELS) requires background fitting and removal. • Scripts for background subtraction have been written in MATLAB. • The scripts can be applied to core, low, and ultra-low loss EELS. • Statistical information on the goodness-of-fit is given. • Several examples of background subtraction are presented in the main text. Electron energy-loss spectroscopy (EELS) is a technique that can give useful information on elemental composition and bonding environments. However in practice, the complexity of the background contributions, which can arise from multiple sources, can hamper the interpretation of the spectra. As a result, background removal is both an essential and difficult part of EELS analysis, especially during quantification of elemental composition. Typically, a power law is used to fit the background but this is often not suitable for many spectra such as in the low-loss region (< 50 eV) and when there are overlapping EELS edges. In this article, we present a series of scripts written in MATLAB v. R2019b that aims to provide statistical information on the model used to fit the background, allowing the user to determine the accuracy of background subtraction. The scripts were written for background subtraction of vibrational EELS in the ultralow-loss region near the zero-loss peak but can also be applied to other kinds of EEL spectra. The scripts can use a range of models for fitting, provided by the Curve Fitting Toolbox of MATLAB, and the user is able to precisely define the window for fitting as well as for edge integration. We demonstrate the advantages of using these scripts by comparing their background subtraction of example spectra to the most commonly used software, Gatan Microscopy Suite 3. The example spectra include those containing multiple scattering, multiple overlapping peaks, as well as vibrational EELS. Additionally, a comprehensive guide to using the scripts has been included in the Supplementary Information.

본문 57,524자

본문 펼치기
[eprints@whiterose.ac.uk](mailto:eprints@whiterose.ac.uk) [https://eprints.whiterose.ac.uk](https://eprints.whiterose.ac.uk/) Universities of Leeds, Sheffield and York Deposited via The University of York. White Rose Research Online URL for this paper: <u>[https://eprints.whiterose.ac.uk/id/eprint/162642/](https://eprints.whiterose.ac.uk/id/eprint/162642/)</u> Version: Published Version Article: Fung, Kayleigh L.Y., Fay, Michael W., Collins, Sean M. et al. (2020) Accurate EELS background subtraction – an adaptable method in MATLAB. Ultramicroscopy. 113052. ISSN: 0304-3991 <u>[https://doi.org/10.1016/j.ultramic.2020.113052](https://doi.org/10.1016/j.ultramic.2020.113052)</u> Reuse This article is distributed under the terms of the Creative Commons Attribution (CC BY) licence. This licence allows you to distribute, remix, tweak, and build upon the work, even commercially, as long as you credit the authors for the original work. More information and the full terms of the licence here: https://creativecommons.org/licenses/ Takedown If you consider content in White Rose Research Online to be in breach of UK law, please notify us by emailing eprints@whiterose.ac.uk including the URL of the record and the reason for the withdrawal request. <u>[Ultramicroscopy 217 (2020) 113052](https://doi.org/10.1016/j.ultramic.2020.113052)</u> Contents lists available at [ScienceDirect](http://www.sciencedirect.com/science/journal/03043991) # Ultramicroscopy journal homepage: [www.elsevier.com/locate/ultramic](https://www.elsevier.com/locate/ultramic) ## Accurate EELS background subtraction – an adaptable method in MATLAB Kayleigh L.Y. Fung <sup>a,⁎</sup>, Michael W. Fay <sup>b</sup>, Sean M. Collins <sup>c</sup>, Demie M. Kepaptsoglou <sup>d,e</sup>, Stephen T. Skowron <sup>a</sup>, Quentin M. Ramasse <sup>d,f,⁎</sup>, Andrei N. Khlobystov <sup>a,b</sup> a Department of Chemistry, University of Nottingham, University Park, Nottingham NG7 2RD, United Kingdom b Nanoscale and Microscale Research Centre, Cripps South, University of Nottingham, University Park, Nottingham NG7 2RD, United Kingdom c School of Chemical and Process Engineering and School of Chemistry, University of Leeds, Leeds LS2 9JT, United Kingdom d SuperSTEM Laboratory, SciTech Daresbury Campus, Keckwick Lane, Daresbury WA4 4AD, United Kingdom e Department of Physics, University of York, Heslington, York YO10 5DD, United Kingdom f School of Chemical and Process Engineering and School of Physics and Astronomy, University of Leeds, Leeds LS2 9JT, United Kingdom A R T I C L E I N F O Keywords: Electron energy loss spectroscopy EELS MATLAB Curve fitting Background subtraction 1. Introduction Incident electrons passing through a thin volume of matter in an electron microscope lose energy due to a variety of interactions that are dependent on the nature of the sample. The resulting energy distribution of electrons can be measured using electron energy-loss spectroscopy (EELS), and used to study structure, chemical composition or bonding. Specifically, EELS can for instance probe sample thickness using the integrated intensity of the zero-loss peak relative to the total integrated intensity of the spectrum [1], valence or conduction electron density using the plasmon peaks [2], elemental composition using coreloss edges, bonding and oxidation state using energy loss near edge structure (ELNES) [3], as well as band structure [4,5] and vibrational modes [6] using near zero-loss features. Accurate background fitting is essential to extract this information from raw EELS data. An excellent overview of EELS theory, instrumentation, and applications is presented in Ref. 1. The majority of electrons passing through a suitable sample lose little to no energy, resulting in a high intensity zero-loss peak (ZLP). This peak is often in practice asymmetric, especially in the case of a cold field emitter, and often exhibits a tail extending significantly beyond the full-width at half-maximum (FWHM) of the ZLP which must be subtracted from the low-loss region (< 50 eV) before any quantification can be made. The background will also have contributions from any excitations of lower binding energy. In the core-loss region (> ⁎ Corresponding authors. 50 eV), the major contributions to the large background come from several processes such as the plasmon tail, lower energy core-edges, multiple scattering, and instrument noise. Because of this, it can be difficult to extract quantitative elemental composition information from EEL spectra, even though EELS is particularly useful for quantification of light elements and for high spatial resolution [7]. In contrast, this information can be more readily obtained using the complementary technique of energy dispersive X-ray spectroscopy (EDXS) where background removal for non-overlapping transition metals and heavier elements causes fewer issues. There is an approximately linear relationship between the logarithm of the energy loss and the logarithm of the intensity of the background of a core-loss EEL spectrum, where the largest contribution is from excitation of plasmons [8]. An ideal background can be fitted using a power law function in the form of _I_ ( _E_ ) = _AE_ - _r_ where I is the spectral intensity, E is the energy loss, and A and r are the coefficients. A description of the theoretical explanation for this behaviour can be found in Ref. 9. However, in practice, the spectral background deviates significantly from the ideal. Because of this, power laws may not accurately describe the backgrounds of low-loss ionisation edges below 50 eV or the majority of edges around 100 eV in medium-thick samples such as some K (Li, Be, B), L (Mg, Al, Si, P, S), M (Fe), and even N or O (Th, U) edges [10]. Power laws are more useful for background subtraction of non-overlapping edges at higher energy losses [11] and have limited application to ultralow-loss excitations close to the ZLP [6,12]. E-mail addresses: [Kayleigh.Fung@nottingham.ac.uk](mailto:Kayleigh.Fung@nottingham.ac.uk) (K.L.Y. Fung), [qmramasse@superstem.org](mailto:qmramasse@superstem.org) (Q.M. Ramasse). [https://doi.org/10.1016/j.ultramic.2020.113052](https://doi.org/10.1016/j.ultramic.2020.113052) ReceivedAvailable online 25 June 20207 April 2020; Received in revised form 18 June 2020; Accepted 21 June 2020 0304-3991/ © 2020 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY license (http://creativecommons org/licenses/BY/4 0/) K.L.Y. Fung, et al. _Ultramicroscopy 217 (2020) 113052_ Recently there has been much progress in monochromators and aberration-correction for EELS which decreases the energy distribution of the ZLP and reduces the electron probe to the size of an atom. As a result, in state-of-the-art monochromated instruments the intense tail of the ZLP is now reduced to the point that it no longer obscures ultralowloss features such as band gaps, optical or even phonon excitations. Typically, the FWHM of the ZLP is used as the energy-resolution indicator and an energy resolution of below 10 meV has been achieved [6,12]. Statistically good fitting is particularly important for background subtraction of the ultralow-loss region because the signal-tobackground ratios are much smaller and the signals tend to be broader than core-loss EELS (> 50 eV). As a result, the peak position and edge integration can be greatly affected by the model and fitting window chosen for background subtraction [12]. A statistically worse fit can also lead to incorrect extrapolation of the background in the edge region. Background fitting can be further complicated when only small pre-edge regions can be used to model the background, such as when there are overlapping edges, because the width of the pre-edge window used can affect the fitting result [10]. It is important to process data with clarity and accuracy because curve fitting is often an essential, but not always appropriately used, tool across many areas of research (see the recent discussion in Ref. 13 on curve fitting in the analysis of X-ray photoelectron spectroscopic data). The ubiquitous Gatan Microscopy Suite (GMS) 3 is the most commonly used software for EELS background fitting, offering users a straightforward non-linear least squares estimation (NLLSE) method to fit the background to a power law function. Many alternative methods have also been developed in the literature for quantification of EELS data such as the ImageJ plugin Cornell Spectrum Imager (CSI) developed as an open source software package for spectroscopic analysis [14,15], a stand-alone program for EELS quantification called EELSMODEL [16], quantitative multiple least-squares fitting [17], improved algorithms for fitting a power law that places constraints on the background above and below the ionisation threshold energy [18] which was subsequently expanded upon to provide a robust background subtraction method for noisy spectra containing multiple core-loss edges [19], high-throughput automated extraction of band gap maps using EELS mapping scripts written in MATLAB [20], as well as a signal-from-background separation algorithm written for GMS 3 that uses subspace division [21]. All of these methods have their merits and uses, and the consensus in the EELS community is that no single method is generally appropriate for every kind of EELS dataset. In this paper we present a series of scripts written in MATLAB v. R2019b that can be applied to background fitting and subtraction of both the low-loss region as well as more generic uses of EELS, such as core-loss ionisation edges. We demonstrate several examples of their use for different applications of EELS and compare the quality of the results obtained to typical background subtraction in GMS 3. The primary focus of the scripts is to ensure accuracy in the background subtraction, allowing the user to manually assess the goodness-of-fit and estimate the effect of the background subtraction on the extracted data. The scripts are written in the MATLAB programming language – widely used in research and industry for data analysis and post-processing and have a general format applicable to many types of EELS data. This allows users to easily modify the code if needed to suit their specific research needs. The three MATLAB scripts can be downloaded alongside the Supplementary Information which contains step-by-step instructions on usage (Section 3, pages 5–14). These instructions have been written to be user-friendly for researchers new to MATLAB. The MATLAB scripts are also available from GitHub at [https://github.com/](https://github.com/Fungussy/EELS-background-subtraction-in-MATLAB) [Fungussy/EELS-background-subtraction-in-MATLAB.](https://github.com/Fungussy/EELS-background-subtraction-in-MATLAB) 2. MATLAB fitting and fit analysis scripts 2.1. Functions used for fitting The MATLAB scripts use the Curve Fitting Toolbox provided by MathWorks and have extensive commenting (text beginning with '%' or '%%') within the scripts to describe how the code works. There is also comprehensive MATLAB documentation by MathWorks as well as many sources of information on the Internet for researchers who wish to modify the scripts to their purposes. Alternatively, the scripts could also be ported over to an open source language such as Python since MATLAB has similarities with Python scripting. There are three scripts described: EELS_fitting.m (fitting script), EELS_fit_analysis.m (fit analysis script), and EELS_subtracted_spectrum.m (plotting script). The first two scripts enable the researcher to find and analyse the best fit for the background while the third is to guide newer users of MATLAB in plotting their subtracted spectra. The fitting script gives a broad overview of a model fitted to a range of windows for background subtraction to estimate the best fit visually before using the fit analysis script to properly assess the goodness-of-fit. The x and y values of the subtracted spectrum can then be saved as separate MATLAB files and plotted using the plotting script. This third script also allows users to save the subtracted spectrum as a .txt for plotting in other software such as Origin. The models available for fitting in the Curve Fitting Toolbox include one- and two-term power laws and exponentials. The models are as follows, with the MATLAB nomenclature in parentheses. One-term power model ('power1′) _f_ ( _x_ ) = _ax_ _b_ Two-term power model ('power2′) _f_ ( _x_ ) = _ax_ _b_ + _c_ One-term exponential model ('exp1′) _f_ ( _x_ ) = _aebx_ Two-term exponential model ('exp2′) _f_ ( _x_ ) = _aebx_ + _cedx_ Exponential models can be more useful when the behaviour of the background deviates from a power law, such as in the low-loss region or when there are overlapping edges. 2.2. Statistical information on fitting MATLAB uses an NLLSE method to iteratively fit the power law or exponential function to the data and can also give detailed information on the fit. For example, the output of running the script can contain the equation and coefficients of the fit as well as goodness-of-fit information such as the sum of squares due to error (SSE) and the adjusted Rsquare value. The SSE measures the total deviation of the fit values to the original data. The smaller the SSE value, the smaller the random error component in the model, and therefore the better the model is for prediction. For EELS background subtraction, there may be cases where only a small window can be used for fitting and therefore the SSE will be quite a large value and not necessarily useful for analysing the goodness-of-fit. The adjusted R-square value, v, is the R-square value adjusted based on the residual degrees of freedom. This is the number of response values, n, minus the number of fitted coefficients, m, estimated from the response values. _v_ = _n_ - _m_ The adjusted R-square value is a statistical measure of how successful the fit is in explaining the variation of the data. A value closer to 1 indicates that a greater proportion of variance is accounted for by the K.L.Y. Fung, et al. _Ultramicroscopy 217 (2020) 113052_ Fig. 1. Background fitting and subtraction for the carbon K-edge of single-walled carbon nanotubes using a oneterm power law in Gatan Microscopy Suite (GMS 3) with a wide pre-edge window of 176–280 eV a) showing a processing artefact around 220 eV from the fitted curve dipping below the background signal (left arrow) as well as an over-estimation of the background in the edge region (right arrow). A narrow pre-edge window of 249–280 eV b) was also used, giving a more reasonable carbon K-edge signal. Original spectra in teal; fitting windows indicated with red rectangles; subtracted spectra overlaid in green. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) model, and therefore the closer to 1, the better the fit is for the data. It is worth noting that the R-square value provides little distinction between systematic errors in the fit and errors in the fit due to noise in the data. The root mean squared error (RMSE) is an estimate of the standard deviation of the random component in the data. A smaller RMSE indicates a better fit for prediction. In addition to the fit information, the fit analysis script also plots the prediction bounds and the residuals. The observation prediction bounds take into account the mean square error and therefore accounts for random errors in predicting the fitted curve above the edge threshold energy. The residuals are the difference between an observed value and the fitted value provided by a model - these should be randomly distributed if the fit is good. The user will be able to inspect the residuals for features such as artefacts and extra signals, which can affect background fitting. Finally, the fit analysis script calculates the “h-parameter” and the signal-to-noise ratio (SNR) using the signal and background integrals (Ik and IB respectively) which can be used to evaluate the background subtraction. Extrapolating the background fit under the signal can introduce errors into the extracted signal, leading to a lower SNR. _SNR_ = _<u>Ik</u>_ _Ik_ + _hIB_ = _<u>k</u>_ _k_ + _hIB_ The h-parameter accounts for any statistical uncertainties in the background-dependant part of the signal integral that arise from fitting and extrapolation errors (i.e. the variance in IB) [7,22]. _h_ = _<u>IB</u>_ <u>+</u> <u>var(</u> _<u>IB</u>_ <u>)</u> _IB_ All the information about the fit should be considered when determining whether a fit for the background is statistically good or not. The MATLAB scripts we provide show this information which allows the user to objectively assess the goodness of their background fit and compare the suitability of different fits. This gives accurately subtracted EEL spectra with peak positions and integrals that can be used to describe the sample in a more quantitative way. Other statistical estimators of the goodness-of-fit are available in MATLAB, such as the chisquared test, and can be implemented in addition to the examples demonstrated in the current set of scripts depending on the specific scientific questions the user may have. 3. Results and discussion In this section we present four example cases using the scripts. In Section 3.1 we compare the method to the commonly used process available in GMS 3, using a simple example of background subtraction for the carbon K-edge of single-walled carbon nanotubes. The information that can be obtained in this case is comparable to GMS, but the presented MATLAB scripts offer the user increased transparency and flexibility. Section 3.2 demonstrates the increased accuracy enabled by an improved background fitting process, resulting in the elimination of artefacts in the subtracted spectrum of the carbon K-edge in diamond. Section 3.3 subsequently gives an example of when this kind of quantitatively accurate fitting is essential: independent background extraction for multiple overlapping peaks of different elements, in order to determine elemental composition of a sample. The spectrum recorded for this system – composed of carbon nanotubes inside boron nanotubes - also has a large degree of noise, demonstrating the resilience of our method. Section 3.4 considers low loss and vibrational/ultra-low loss EELS, for which accurate background subtraction is vital even for qualitative analysis; the choice of background and model can lead to substantially different peak positions, intensities, and integrations. 3.1. Comparison to GMS 3: background subtraction of the carbon K-edge of single-walled carbon nanotubes The Gatan Microscopy Suite (GMS) 3 software contains a highly automated signal extraction method where the edge intensity is extracted by fitting a model to a single pre-edge region and extrapolating this fit to the entire background intensity below the edge signal. The most commonly used model for background subtraction in the core-loss region is a power law. It is recommended that the pre-edge fitting region precedes the edge (for example by 5 eV) and should be as wide as possible to reduce statistical error. However, at the same time, the fit region should only be around 10–30% of the edge energy. Comprehensive information on EEL spectral acquisition and post-processing using GMS 3 can be found at the website [www.eels.info.](http://www.eels.info) The example used here for comparison between GMS 3 and MATLAB is a sample of single-walled carbon nanotubes (SWNTs) which has minimal multiple scattering since the SWNT bundles are, at most, only a few tens of nanometres thick. As can be seen in Fig. 1a, a wide pre-edge fitting K.L.Y. Fung, et al. _Ultramicroscopy 217 (2020) 113052_ window of the carbon K-edge of SWNTs results in a worse background fit than a narrow pre-edge window using the default one-term power law model. There is a processing artefact around 220 eV from the fitted curve dipping below the background signal (left arrow in Fig. 1a) as well as an over-estimation of the background in the edge region (right arrow in Fig. 1a). Although a narrower pre-edge window gives a more reasonable carbon K-edge signal in Fig. 1b, the inclusion of fewer data points in the fitting process results in a statistically less accurate fit. The decreased suitability of fitting a one-term power law to the background with a larger range of data is an indication of the inadequacy of the power law in describing the entire background accurately. While NLLSE methods are appropriate for EELS background fitting, especially for EEL spectra containing a small number of counts [23], GMS 3 fitting models are limited to one-term power laws and polynomials. No goodness-of-fit information is given which can be useful when quantifying a fit and determining whether a background fit is appropriate or not. In comparison, fitting a two-term power law model to the same carbon K-edge background in MATLAB using EELS_fitting.m resulted in a much better fit across the entire pre-edge background. All data below several user-defined values of (i) eV were fitted, giving a range of background fits of windows from 176–200 eV to 176–280 eV. The background-subtracted spectra were then plotted in a rainbow of colours to aid finding the most appropriate window for background subtraction (Fig. 2a). In contrast to GMS 3, the widest window of 176–280 eV seemed to give the best fit – the subtracted spectrum had a flat baseline. Afterwards, this chosen background fit was analysed using EELS_fit_analysis.m (Fig. 2b) to show the equation used for fitting, the coefficient values, the goodness-of-fit, and the confidence bounds on the coefficients amongst other statistical information (see the output of this script in the Supplementary Information, Section 3, pages 5–14, for all this information as well as a guide on how to use the scripts). The prediction bounds (Fig. 2b; left plot) are particularly narrow in Fig. 2b which suggests low uncertainty in predicting the background under the signal. Most of the residuals of the fit (Fig. 2b; right plot) are distributed evenly which further suggests that this background fit is good. The script also outputs the h-parameter (which should typically be between 2 and 30 for low extrapolation errors) and the signal-to-noise ratio (SNR). Using signal and background integrals between 284 and 300 eV, we can see that the h-parameter is reasonable at a value of 25 which gives a good SNR of 507. The energy width of the integrals used to calculate the h-parameter and the SNR will vary depending on the elements in the sample and whether there are any overlapping edges. The background fitting window should be a similar width or wider than the energy width of the integrals in order to minimise extrapolation errors. The energy width should also be wide enough to have adequate signal but not too wide as this will introduce significant extrapolation errors [7,22]. After finding and analysing the best fit for removing the background, the subtracted spectrum can then be plotted separately using EELS_subtracted_spectrum.m (Fig. 2c). This demonstrates MATLAB's ability to produce post-processed spectra similar to GMS 3 but with additional statistical information on the fit. Understanding the goodness-of-fit allows one to extrapolate this fit across the entire background with higher accuracy. It is straightforward to determine whether or not a fit is appropriate - an example of the results of deliberate poor fitting is shown in Fig. 3. In this case, a smaller fitting window of 176–200 eV was used for the carbon K-edge of the SWNTs instead of the larger window shown in Fig. 2. While the two-term power law fits that small window relatively well (adjusted R-square value of 0.9982), the prediction bounds of the fit are not as good and this is shown visually by the bounds curving away from the actual fit (Fig. 3a). The h-parameter and SNR are part of the output from MATLAB and can used to quantitatively assess the goodness-of-fit above the edge threshold energy. Using the same energy width as in Fig. 2b (between 284 and 300 eV), the h-parameter is much larger at a value of 351 which gives a smaller SNR of 467. These two values also show that the power law fit is less suitable than the exponential fit for this spectrum. Fitting a smaller data set means that extrapolating the fit under the signal has a larger degree of uncertainty and leads to an under-estimation of the background in the edge region and therefore incorrect background subtraction (Fig. 3b). Having a range of models available for fitting in the provided scripts, in contrast to GMS 3, allows the user to find the most applicable model for background subtraction that uses as many data points as possible. This gives a statistically more accurate fit with lower error which is useful for many situations, such as accurate quantification of elemental composition, extracting signals from noisy spectra, or background subtraction in the ultralow-loss region. 3.2. Fitting the background of the carbon K-edge of a polycrystalline diamond composite containing additional signals The background of the carbon K-edge of a polycrystalline diamond (PCD) composite sample from Pacella et al. [24] was fitted using the same series of steps as above (Fig. 4). This is an example of EELS analysis of a sample approximately 100–150 nm in thickness, produced using focused ion beam (FIB) milling. The PCD composite sample is thicker than the above carbon nanotube sample prepared using a dropcasting technique and is therefore more likely to contain regions with significant multiple scattering. Several background windows below 280 eV were fitted using a one-term exponential function. Since all the windows gave similar subtracted spectra (Supplementary Information, Fig. 1, page 1), the largest window was chosen to include as much data in the fit as possible. The residuals are not evenly distributed (Fig. 4a; right plot); in the subtracted spectrum (Fig. 4c), there is a signal peaking at 170 eV which is in the region of the silicon L1-edge, as well as a phosphor response artefact at 250 eV (a dip in intensity caused from having the ZLP focused on the spectrometer). Many EEL spectra may have backgrounds that contain additional signals or multiple scattering effects from thicker samples, and therefore non-evenly distributed residuals do not always indicate inappropriate fitting. These scripts are robust and not easily confused by irregularities in the background. Due to the thickness of the sample and the possible resulting tail of the Si L1-edge, the h-parameter is comparatively large in this case (3447), with a small SNR of 83. Analysis of the absolute values of h and the SNR may be of limited relevance for such samples, however a relative comparison when varying fit parameters may still be instructive and help in determining the most suitable background fit. The published EEL spectrum of this PCD sample was fitted in GMS 3 using a one-term power law and there is a residual 'hump' at the start of the spectrum which can be replicated in MATLAB (Fig. 4b). The prediction bounds for the one-term power law (Fig. 4b) are also much wider than those for the one-term exponential (Fig. 4a; left plot), suggesting the exponential fit is more suitable for this spectrum. The power law fit in Fig. 4b has a large h-parameter of 2085 and a low SNR of 22. The exponential fit has a comparatively larger SNR of 83 which suggests the exponential fit is more suitable for signal extraction. Regardless of the fit, the SNR will be quite low because the original dataset is of a thick sample and thus has a significantly large background contribution. It should be noted that the fit of a one-term power law from Pacella et al. [24] did not affect their chemical analysis of this PCD sample. However, the presence of fitting artefacts gives unrealistic ratios of peak intensities, preventing accurate elemental quantification in samples containing multiple elements. 3.3. Fitting the background of a carbon nanotube inside boron nitride nanotube sample to extract the signals of the carbon, boron, and nitrogen Kedges The MATLAB scripts can also be used to fit EELS data containing multiple elements. When choosing a fitting window for overlapping K.L.Y. Fung, et al. _Ultramicroscopy 217 (2020) 113052_ Fig. 2. a) The pre-edge background of the carbon K-edge of single-walled carbon nanotubes (SWNTs) was fitted using a two-term power law of the form _f_ ( _x_ ) = _ax_ _b_ + _c_ in the EELS_fitting.m MATLAB script. Several fitting windows were chosen below (i) eV, from 176–200 eV to 176–280 eV, and plotted in a rainbow of colours to visually aid finding the best fit. b) The best fit using the widest window of 176–280 eV was analysed using EELS_fit_analysis.m which produced two plots as well as statistical information on the fit. This information can be found in the Supplementary Information (Section 3, pages 5-14) which contains a step-by-step guide on how to use these scripts. The guide uses the SWNTs EEL spectrum as an example to illustrate how carry out background subtraction and obtain the same data shown in this figure. The left plot shows that the model closely matches the background (the prediction bounds are shown as dotted lines). The right plot shows that the residuals after subtracting the fitted curves from the original EELS data are evenly distributed which suggests that the fit is good. The fit has an adjusted R-square value of 0.9998. The h-parameter and SNR (calculated using integrals between 284 and 300 eV) are 25 and 507 respectively. c) The original and backgroundsubtracted spectra were plotted on the same axes for comparison using EELS_subtracted_spectrum.m. edges, the widest possible window may not be the most appropriate as this may include weak signals from previous edges. The integral of the edges can be obtained from the EELS_fit_analysis.m script using the trapezoidal rule from which absolute quantification of the element without plural scattering can be calculated, provided the required parameters are known, using the equation below. K.L.Y. Fung, et al. _Ultramicroscopy 217 (2020) 113052_ Fig. 3. a) A deliberate example of statistically bad fitting for the pre-edge background of the carbon K-edge of single-walled carbon nanotubes (SWNTs) to illustrate what a bad fit might look like. A two-term power law of the form _f_ ( _x_ ) = _ax_ _b_ + _c_ was used, but with a smaller fitting window of 176–200 eV compared to the wider 176–280 eV window used previously in Fig. 2. The fit was analysed using EELS_fit_analysis.m which produced two plots as well as statistical information on the fit. The left plot shows that the model deviates significantly from the background after the window (the prediction bounds curve away from the fitted curve). The right plot shows that the residuals after subtracting the fitted curves from the original EELS data are evenly distributed which suggests that the fit is good for the small window but this is not the case for the entire background. The fit has an adjusted R-square value of 0.9982. The h-parameter and SNR (calculated using integrals between 284 and 300 eV) are 351 and 467 respectively. b) The original and background-subtracted spectra were plotted on the same axes for comparison using EELS_subtracted_spectrum.m. The baseline of the background-subtracted spectrum is not flat due to underestimation of the background in the edge region. 1 _<u>k</u>_ _N_ = _<u>Ik</u>_ 1 <u>(</u> _<u>β</u>_ <u>,</u> _Io_ ( _β_ ) _σk_ ( _β_ _<u>Ik</u>_ 1 <u>(</u> _<u>β</u>_ <u>,</u> <u>∆)</u> ( _β_ ) _σk_ ( _β_, ∆) _o_ ( _β_ ) _σk_ N is the projected areal density of the atoms of element k; _Ik_ 1 ( _β_, ∆) is the integral edge of element k with no plural scattering, integrated over a window Δ; Io is the zero-loss integral; β is the effective collection angle; Δ is the signal integration width; and σk(β, Δ) is the partial inelastic scattering cross-section [8]. Obtaining accurate edge integrals relies on having a good fit for the background, and this is particularly pertinent for spectra where the signal-to-noise ratio is low. It is useful to note here that the contributions to the background may not stay identical under an ionisation edge, especially a few eV past the onset. Therefore, in terms of quantification, even if the best possible background fit is achieved using preedge fitting windows, there may still remain some unknown errors that could affect analysis. The example we chose to illustrate this section was boron nitride nanotubes containing carbon nanotubes within, synthesised by Walker et al. (EELS data from Ref. 25). The deposited electron dose was minimised to reduce beam damage to the sample, so the EEL spectrum is noisy and has a low signal-to-background ratio. The boron edge can be fitted first (Supplementary Information, Fig. 2, page 2), then the carbon edge (Supplementary Information, Fig. 3, page 3), and then the nitrogen edge to give better elemental quantification (Supplementary Information, Fig. 4, page 4). The models used for fitting varied between all three elements (see Supplementary Information Figs 2, 3 and 4, pages 2–4) and the adjusted R-square values get progressively smaller as the signal-to-noise ratio decreases. The prediction bounds also get wider as the data becomes noisier (Supplementary Information Figs 2b, 3b, and 4b). The h-parameters are all quite low, giving large SNR values (Supplemetary Information Figs 2, 3 and 4) which suggest that the models used for fitting are appropriate. After the backgrounds from all the edges have been subtracted, the edges can then be plotted against one another as well as the original EEL spectrum (Fig. 5). 3.4. Low loss and ultra-low loss peaks The final example uses the MATLAB scripts to subtract the background of ultralow-loss spectra of glass blends of metal-organic K.L.Y. Fung, et al. _Ultramicroscopy 217 (2020) 113052_ frameworks (MOFs) acquired using scanning transmission electron microscopy (STEM) EELS [26,27]. Electron beam monochromators were used to achieve an incredibly low energy spread of several tens to hundreds of meV (two different microscopes were used in these publications). The electron beam can lose energy to delocalised electronic excitations and cause low energy excitations less than an eV, which is in the infrared region where vibrational modes occur. An atom-sized Fig. 4. a) The best fit using the widest window of 155.5–280 eV was analysed using EELS_fit_analysis.m which produced two plots as well as statistical information on the fit. The left plot shows that the model closely matches the background (the prediction bounds are shown as dotted lines). The right plot shows that the residuals after subtracting the fitted curves from the original EELS data are not evenly distributed due to a possible silicon L1edge at around 170 eV as well as a phosphor response at 250 eV. The fit has an adjusted R-square value of 0.9998. The h-parameter and SNR (calculated using integrals between 284 and 300 eV) are 3447 and 83 respectively. b) An unsuitable model of a one-term power law of the form _f_ ( _x_ ) = _ax_ _b_ was used instead with the same fitting window of 155.5–280 eV to demonstrate that the power law does not fit the background well. A one-term power law was used to fit the background by Pacella et al. [24]. The fit was analysed using EELS_fit_analysis.m which produced two plots as well as statistical information on the fit. The left plot shows that the fit both over- and under-estimates the background. Note that the prediction bounds are much wider than for the fit using a one-term exponential. The right plot shows that the residuals after subtracting the fitted curves from the original EELS data are not evenly distributed. The adjusted R-square value is 0.9966; however, this may not be meaningful. The h-parameter and SNR (calculated using integrals between 284 and 300 eV) are 2085 and 22 respectively. c) The original and both background-subtracted spectra were plotted on the same axes for comparison using EELS_subtracted_spectrum.m. The baseline of the EEL spectrum after fitting with a oneterm power law contains a residual 'hump' peaking around 180 eV, as seen in the original paper. probe allows the study of vibrational modes of many types of nanostructures with high spatial resolution [6]. The dominant feature in the experimental data is the ZLP which must be removed in order to analyse the vibrational peaks. In particular, the ZLP from a cold field emitter exhibits strong asymmetry due to the physics of the emission process and once the electron beam has passed through the sample, there can be further asymmetry between the gain and loss sides due to K.L.Y. Fung, et al. _Ultramicroscopy 217 (2020) 113052_ Fig. 5. The subtracted spectra of the boron, carbon, and nitrogen K-edges of carbon nanotube in boron nitride nanotube (CNT@BNNT) (EELS data from Ref. 25) was plotted with the original EEL spectrum on the same axes for comparison using EELS_subtracted_spectrum.m. electron-sample interactions. All of the example spectra are of element-rich regions of particles of glass blends or composites. Fig. 6 shows the low-loss plasmon spectra of particles with Co- and Zn-rich regions [26]. All new red spectra in Fig. 6 are similar to the published blue spectra and have the added benefit of having statistical information on the goodness-of-fit. Due to the data being in the low-loss region, the background contribution from the ZLP is significant and the SNR values are correspondingly small compared to the core-loss example of SWNTs above. At this point, it is worth discussing the camera technology which can affect how background fitting is carried out. The digital signals given by the CCD camera have an offset and gain applied by the pre-amplifier. The offset is a value added or subtracted to the analogue signal while the gain is the analogue signal multiplied by a value to boost the signal. Generally, these values are corrected by calibration so when there is no analogue signal, the digital signal is at zero. However, calibrations can drift so incorrect offset values can give negative values, which can therefore affect the fitting. The offset and gain can either be assumed to be correct or a correction can be applied to the fit. The published spectra took into account the camera offset and incorporated that into their fitting, which Fig. 6. The pre-edge backgrounds of metal-organic framework glass blends of (ZIF-4-Co)0.5(ZIF-62-Zn)0.5 (EELS data from Fig. S1 from the Supplementary Information of Ref. [26]) were fitted using either two-term exponential functions of the form _f_ ( _x_ ) = _aebx_ + _cedx_ (top and middle rows) or two-term power laws of the form _f_ ( _x_ ) = _ax_ _b_ + _c_ (bottom row) depending on which function gave the best goodness-of-fit. Data below 1.5 eV was used as the fitting window based on the original background subtractions carried out by Collins et al. All fits had adjusted R-square values between 0.9988 and 1.000. The SNR values were between 26 and 151. Data pre-background subtraction (black plots) as well as the original background subtraction by Collins et al. (blue plots) were plotted against the new background subtractions carried out in MATLAB (red plots). K.L.Y. Fung, et al. _Ultramicroscopy 217 (2020) 113052_ is why some of the blue spectra have a higher intensity than the black pre-background subtraction spectra. There will be trade-offs in any background fitting and this fitting routine provides one alternative which may be suitable in many applications. The d-d ligand field transition spectra of the same type of particle with Co- and Zn-rich regions are shown in Fig. 7 [26]. This was acquired using high resolution monochromated STEM-EELS. The same colour scheme has been used where the pre-background subtraction spectra are black, the original published background subtracted spectra are blue, and the new background subtracted spectra are red. Similar to Fig. 6, all new red spectra in Fig. 7 are similar to the published blue spectra and have goodness-of-fit information. However, the SNR may not be a particularly useful metric because the signals are relatively weak in this region and signals may overlap with the ZLP. The SNR does point to intrinsic challenges in robust background subtraction in this spectral range, especially given a prominent ZLP tail or when limited spectral channels are available preceding the signals of interest. Statistical parameters nevertheless enable optimisation of the fitting and background subtraction steps. Fig. 7. The pre-edge backgrounds of metal-organic framework glass blends of (ZIF-4-Co)0.5(ZIF-62-Zn)0.5 (EELS data from Fig. S4 from the Supplementary Information of Ref. [26]) were fitted using two-term exponential functions of the form _f_ ( _x_ ) = _aebx_ + _cedx_ . Data below 1.5 eV was used as the fitting window based on the original background subtractions carried out by Collins et al. The fits had adjusted R-square values of 0.9979 and 0.9965, and SNR values of 10 and 12, for the top and bottom spectra respectively. Data pre-background subtraction (black plots) as well as the original background subtraction by Collins et al. (blue plots) were plotted against the new background subtractions carried out in MATLAB (red plots). The following datasets were acquired for crystal-glass composite particles with Zn- and Al-rich regions [27]. Background subtraction was not carried out on the ultralow-loss vibrational spectra in Fig. 8 (the spectra for similar particles was published with background subtraction) so there are no blue plots for the original published background subtracted spectra. The new red spectra have realistic intensities with the exception of some negative values close to 0 eV where irregularities in the ZLPs meant the background fittings occasionally went above the acquired spectra. This does not appear to affect the rest of the background subtraction, i.e. the fits are statistically good and the adjusted Rsquare values are close to 1. Finally, the background subtracted vibrational spectra of a similar particle is shown in Fig. 9 [27]. The original spectra in blue were Fig. 8. The pre-edge backgrounds of metal-organic framework crystal-glass composite particles of (MIL-53)0.25(agZIF-62)0.75 (EELS data from Fig. S14 from the Supplementary Information of Ref. [27]) were fitted using one-term exponential functions of the form _f_ ( _x_ ) = _aebx_ . Data below 0.13 eV was used as the fitting window. All fits had adjusted R-square values between 0.9925 and 0.9994. Due to intrinsically low signal levels in this energy range, the calculated SNR values appear comparatively low (below 1). Data pre-background subtraction (black plots) were plotted against the new background subtractions carried out in MATLAB (red plots). K.L.Y. Fung, et al. _Ultramicroscopy 217 (2020) 113052_ to MATLAB, or indeed Python as mentioned previously. 5. Methods The single-walled carbon nanotubes (SWNTs) were purchased from Carbon Solutions, Inc. (product code P2-SWNT). The lacey carbon film copper (200 mesh) TEM grid that the SWNTs were deposited onto for EELS analysis were purchased from Agar Scientific Ltd. The SWNTs EEL spectrum was recorded on a JEOL 2100Plus operating at an accelerating voltage of 80 kV at the University of Nottingham Nanoscale and Microscale Research Centre (nmRC), equipped with a Gatan Enfinium. The spectrum was acquired in imaging mode with an effective convergence angle of < 3 mrad and a collection angle of - 100 mrad. A total of 20 individual exposures of 0.05 s was accumulated with a dispersion of 0.1 eV/channel. 5.1. Processing and cleaning of single-walled carbon nanotubes Single-walled carbon nanotubes (50 mg) were refluxed in nitric acid (3 M, 50 mL) for 2 hr, then washed with deionised water (500 mL) and dried under vacuum. The dried nanotubes (11 mg) were heated at their oxidation temperature of 600 °C for 17 min to give cleaned singlewalled carbon nanotubes as a black powder (2.3 mg). 5.2. Preparing the EELS sample of single-walled carbon nanotubes Fig. 9. The pre-edge backgrounds of metal-organic framework crystal-glass composite particles of (MIL-53)0.25(agZIF-62)0.75 (unpublished EELS data from Ref. [27]) were fitted using one-term exponential functions of the form _f_ ( _x_ ) = _aebx_ . Data below 0.10 eV was used as the fitting window. The fits had adjusted R-square values of 0.9939 and 0.9998 for the top and bottom spectra respectively. Due to intrinsically low signal in this energy range, the calculated SNR values appear comparatively low (below 1). Data pre-background subtraction (black plots) were plotted against the new background subtractions carried out in MATLAB (red plots). Unpublished background subtracted spectra by Collins et al. are shown on the same axes for comparison (blue plots). unpublished due to difficulties with background subtraction (note the unrealistic negative values in the Fig. 9b) blue spectrum). The new red spectra fitted in MATLAB, however, have realistic intensities and the goodness-of-fit information suggest the fits are statistically good. In summary, the MATLAB scripts presented can offer a different method for background subtraction in the low-loss region that allows the user to analyse the fit. This is particularly important for vibrational spectra where the peak positions and intensities are greatly affected by the background fit chosen. Accurate background subtractions provide more information on the sample that may otherwise be obscured by the huge contribution from the ZLP. 4. Conclusions We have shown that the MATLAB scripts can be used to extract signals from a variety of spectra, ranging from core-loss to low and ultra-low loss EELS. The focus of this approach gives users the opportunity to quantitatively assess the goodness of their fit using the statistical information provided in order to get accurate fitting for the background and signal extraction. In addition to this, the large database of fitting models in the MATLAB Curve Fitting toolbox allows users to apply many different fits to backgrounds. This will be particularly useful for background subtraction of the low-loss region where the signals are quite weak compared to the core-loss region and accurate background fitting with different models is needed to extract the signals. While these scripts have been designed specifically for analysis of EELS data, they could very well be applied to any analysis that requires background subtraction. The MATLAB scripts provide an alternative to the widely-used GMS 3 EELS fitting software and could be ported into GNU Octave, an open-source program which has many features similar The processed single-walled carbon nanotubes were sonicated in HPLC-grade isopropyl alcohol and drop-cast, or deposited, onto a lacey carbon film copper TEM grid. Declaration of Competing Interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. Acknowledgements K. L. Y. F. and M. W. F. carried out the work at the Nanoscale and Microscale Research Centre (nmRC) and acknowledge support by the Engineering and Physical Sciences Research Council (EPSRC) [under grant EP/L022494/1] and the University of Nottingham. S. M. C., D. M. K. and Q. M. R. carried out the work at SuperSTEM, the National Research Facility for Advanced Electron Microscopy, supported by the Engineering and Physical Sciences Research Council (EPSRC). S.M.C. acknowledges support from a Goldstein Scholar Award from the Microanalysis Society and from a University Academic Fellowship at the University of Leeds. Supplementary materials Supplementary material associated with this article can be found, in the online version, at [doi:10.1016/j.ultramic.2020.113052.](https://doi.org/10.1016/j.ultramic.2020.113052) References [1] R.F. Egerton, Electron energy-loss [spectroscopy](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0001) in the TEM, Rep. Prog. Phys. 72 (2009) [016502.](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0001) [2] H.R. Daniels, R. Brydson, A. Brown, B. [Rand,](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0002) Quantitative valence plasmon map ping in the TEM: viewing physical [properties](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0002) at the nanoscale, Ultramicroscopy 96 (2003) [547–558.](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0002) [3] P. Rez, D.A. Muller, The Theory and [Interpretation](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0003) of Electron Energy Loss Near Edge Fine Structure, Annu. Rev. Mater. Res. 38 (2008) 535–558. [4] [B. Rafferty, L.M. Brown, Direct and indirect transitions in the region of the band gap](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0004) using electron-energy-loss [spectroscopy,](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0004) Phys. Rev. B 58 (1998) 10326–10337. [5] K. Kimoto, G. Kothleitner, W. [Grogger,](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0005) Y. Matsui, F. Hofer, Advantages of a monochromator for bandgap [measurements](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0005) using electron energy-loss spectroscopy, Micron 36 (2005) 185–189. K.L.Y. Fung, et al. _Ultramicroscopy 217 (2020) 113052_ [6] [O.L. Krivanek, T.C. Lovejoy, N. Dellby, T. Aoki, R.W. Carpenter, P. Rez, E. Soignard,](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0006) [J. Zhu, P.E. Batson, M.J. Lagos, R.F. Egerton, P.A. Crozier, Vibrational spectroscopy](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0006) in the electron microscope, [Nature](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0006) 514 (2014) 209–212. [7] R.F. Egerton, in Electron Energy-Loss Spectroscopy in the Electron Microscope, Springer US, Boston, MA, 1996, pp. 245–299. [8] R. BrydsonRoyal Microscopical [Society](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0007) (Great Britain), Electron Energy Loss Spectroscopy, Taylor [&](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0007) Francis, Oxford, 2001. [9] R.F. Egerton, Electron Energy-Loss [Spectroscopy](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0008) in the Electron Microscope, Plenum Press, [New](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0008) York, 1986. [10] [H. Tenailleau, J.M. Martin, A new background subtraction for low-energy EELS core](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0009) edges, J. Microsc. [166](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0009) (1992) 297–306. [11] G. Balossier, X. Thomas, J. Michel, [D.](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0010) Wagner, P. Bonhomme, E. Puchelle, [D. Ploton, A. Bonhomme, J.M. Pinon, Parallel EELS elemental mapping in scanning](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0010) transmission electron microscopy: [use](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0010) of the difference methods, Microsc. Microanal. [Microstruct.](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0010) 2 (1991) 531. [12] [J.A. Hachtel, A.R. Lupini, J.C. Idrobo, Exploring the capabilities of monochromated](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0011) electron energy loss spectroscopy in the [infrared](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0011) regime, Sci. Rep. 8 (2018) 5637. [13] P.M.A. Sherwood, The use and misuse of curve fitting in the analysis of core X-ray photoelectron spectroscopic data, Surf. Interface Anal. (2019) 1–22. [14] R. Hovden, P. Cueva, J.A. Mundy, D.A. [Muller,](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0013) The Open-Source Cornell Spectrum Imager, Micros. [Today](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0013) 21 (2013) 40–44. [15] [P. Cueva, R. Hovden, J.A. Mundy, H.L. Xin, D.A. Muller, Data Processing for Atomic](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0014) Resolution Electron Energy Loss [Spectroscopy,](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0014) Microsc. Microanal. 18 (2012) [667–675.](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0014) [16] J. Verbeeck, S. Van Aert, Model [based](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0015) quantification of EELS spectra, Ultramicroscopy [101](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0015) (2004) 207–224. [17] R. Door, D. Gängler, Multiple [least-squares](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0016) fitting for quantitative electron energy loss spectroscopy - An experimental [investigation](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0016) using standard specimens, Ultramicroscopy [58](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0016) (1995) 197–210. [18] R.F. Egerton, M. Malac, Improved [background-fitting](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0017) algorithms for ionization edges in electron energy-loss [spectra,](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0017) Ultramicroscopy 92 (2002) 47–56. [19] J.T. Held, H. Yun, K.A. Mkhoyan, [Simultaneous](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0018) multi-region background subtrac tion for core-level EEL spectra, [Ultramicroscopy](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0018) 210 (2020) 112919. [20] C.S. Granerød, W. Zhan, Ø. Prytz, [Automated](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0019) approaches for band gap mapping in STEM-EELS, [Ultramicroscopy](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0019) 184 (2018) 39–45. [21] S. Lu, K.J. Kormondy, A.A. Demkov, [D.J.](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0020) Smith, An EELS signal-from-background separation algorithm for spectral [line-scan/image](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0020) quantification, Ultramicroscopy 195 [(2018)](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0020) 25–31. [22] G. Kothleitner, F. Hofer, Optimization [of](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0021) the signal to noise ratio in EFTEM ele mental maps with regard to different [eonization](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0021) edge types, Micron 29 (1998) [349–357.](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0021) [23] [T. Pun, J.R. Ellis, M. Eden, Weighted least squares estimation of background in EELS](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0022) imaging, J. Microsc. 137 (1985) 93–100. [24] M. Pacella, P.W. Butler-Smith, D.A. [Axinte,](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0023) M.W. Fay, FIB/TEM/EELS micro/na nometric investigations of the effects [of](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0023) laser ablation on the diamond/binder structure in polycrystalline diamond [composites,](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0023) J. Mater. Process. Technol. 214 (2014) [1153–1161.](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0023) [25] K.E. Walker, G.A. Rance, Á. Pekker, H.M. Tóháti, M.W. Fay, R.W. Lodge, C.T. Stoppiello, K. Kamarás, A.N. [Khlobystov,](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0024) Growth of Carbon Nanotubes inside [Boron Nitride Nanotubes by Coalescence of Fullerenes: toward the World’s Smallest](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0024) Coaxial Cable, Small [Methods](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0024) 1 (2017) 1700184. [26] S.M. Collins, D.M. Kepaptsoglou, [K.T.](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0025) Butler, L. Longley, T.D. Bennett, Q.M. Ramasse, P.A. Midgley, [Subwavelength](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0025) Spatially Resolved Coordination Chemistry of Metal–Organic [Framework](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0025) Glass Blends, J. Am. Chem. Soc. 140 (2018) [17862–17866.](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0025) [27] S.M. Collins, D.M. Kepaptsoglou, J. [Hou,](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0026) C.W. Ashling, G. Radtke, T.D. Bennett, P.A. Midgley, Q.M. Ramasse, [Functional](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0026) Group Mapping by Electron Beam Vibrational Spectroscopy from [Nanoscale](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0026) Volumes, Nano Lett 20 (2020) [1272–1279.](http://refhub.elsevier.com/S0304-3991%0x2820%0x2930203-5/sbref0026)

섹션 본문 94문단 · 78,956자

Introduction

2Incident electrons passing through a thin volume of matter in an electron microscope lose energy due to a variety of interactions that are dependent on the nature of the sample. The resulting energy distribution of electrons can be measured using electron energy-loss spectroscopy (EELS), and used to study structure, chemical composition or bonding. Specifically, EELS can for instance probe sample thickness using the integrated intensity of the zero-loss peak relative to the total integrated intensity of the spectrum [1], valence or conduction electron density using the plasmon peaks [2], elemental composition using coreloss edges, bonding and oxidation state using energy loss near edge structure (ELNES) [3], as well as band structure [4,5] and vibrational modes [6] using near zero-loss features. Accurate background fitting is essential to extract this information from raw EELS data. An excellent overview of EELS theory, instrumentation, and applications is presented in Ref. 1.

3The majority of electrons passing through a suitable sample lose little to no energy, resulting in a high intensity zero-loss peak (ZLP). This peak is often in practice asymmetric, especially in the case of a cold field emitter, and often exhibits a tail extending significantly beyond the full-width at half-maximum (FWHM) of the ZLP which must be subtracted from the low-loss region (< 50 eV) before any quantification can be made. The background will also have contributions from any excitations of lower binding energy. In the core-loss region (> 50 eV), the major contributions to the large background come from several processes such as the plasmon tail, lower energy core-edges, multiple scattering, and instrument noise. Because of this, it can be difficult to extract quantitative elemental composition information from EEL spectra, even though EELS is particularly useful for quantification of light elements and for high spatial resolution [7]. In contrast, this information can be more readily obtained using the complementary technique of energy dispersive X-ray spectroscopy (EDXS) where background removal for non-overlapping transition metals and heavier elements causes fewer issues.

4There is an approximately linear relationship between the logarithm of the energy loss and the logarithm of the intensity of the background of a core-loss EEL spectrum, where the largest contribution is from excitation of plasmons [8]. An ideal background can be fitted using a power law function in the form of = − I E AE ( ) r where I is the spectral intensity, E is the energy loss, and A and r are the coefficients. A description of the theoretical explanation for this behaviour can be found in Ref. 9. However, in practice, the spectral background deviates significantly from the ideal. Because of this, power laws may not accurately describe the backgrounds of low-loss ionisation edges below 50 eV or the majority of edges around 100 eV in medium-thick samples such as some K (Li, Be, B), L (Mg, Al, Si, P, S), M (Fe), and even N or O (Th, U) edges [10]. Power laws are more useful for background subtraction of non-overlapping edges at higher energy losses [11] and have limited application to ultralow-loss excitations close to the ZLP [6,12].

5Recently there has been much progress in monochromators and aberration-correction for EELS which decreases the energy distribution of the ZLP and reduces the electron probe to the size of an atom. As a result, in state-of-the-art monochromated instruments the intense tail of the ZLP is now reduced to the point that it no longer obscures ultralowloss features such as band gaps, optical or even phonon excitations. Typically, the FWHM of the ZLP is used as the energy-resolution indicator and an energy resolution of below 10 meV has been achieved [6,12]. Statistically good fitting is particularly important for background subtraction of the ultralow-loss region because the signal-tobackground ratios are much smaller and the signals tend to be broader than core-loss EELS (> 50 eV). As a result, the peak position and edge integration can be greatly affected by the model and fitting window chosen for background subtraction [12]. A statistically worse fit can also lead to incorrect extrapolation of the background in the edge region. Background fitting can be further complicated when only small pre-edge regions can be used to model the background, such as when there are overlapping edges, because the width of the pre-edge window used can affect the fitting result [10]. It is important to process data with clarity and accuracy because curve fitting is often an essential, but not always appropriately used, tool across many areas of research (see the recent discussion in Ref. 13 on curve fitting in the analysis of X-ray photoelectron spectroscopic data).

6The ubiquitous Gatan Microscopy Suite (GMS) 3 is the most commonly used software for EELS background fitting, offering users a straightforward non-linear least squares estimation (NLLSE) method to fit the background to a power law function. Many alternative methods have also been developed in the literature for quantification of EELS data such as the ImageJ plugin Cornell Spectrum Imager (CSI) developed as an open source software package for spectroscopic analysis [14,15], a stand-alone program for EELS quantification called EELSM-ODEL [16], quantitative multiple least-squares fitting [17], improved algorithms for fitting a power law that places constraints on the background above and below the ionisation threshold energy [18] which was subsequently expanded upon to provide a robust background subtraction method for noisy spectra containing multiple core-loss edges [19], high-throughput automated extraction of band gap maps using EELS mapping scripts written in MATLAB [20], as well as a signal-from-background separation algorithm written for GMS 3 that uses subspace division [21]. All of these methods have their merits and uses, and the consensus in the EELS community is that no single method is generally appropriate for every kind of EELS dataset.

7In this paper we present a series of scripts written in MATLAB v. R2019b that can be applied to background fitting and subtraction of both the low-loss region as well as more generic uses of EELS, such as core-loss ionisation edges. We demonstrate several examples of their use for different applications of EELS and compare the quality of the results obtained to typical background subtraction in GMS 3. The primary focus of the scripts is to ensure accuracy in the background subtraction, allowing the user to manually assess the goodness-of-fit and estimate the effect of the background subtraction on the extracted data. The scripts are written in the MATLAB programming languagewidely used in research and industry for data analysis and post-processingand have a general format applicable to many types of EELS data. This allows users to easily modify the code if needed to suit their specific research needs. The three MATLAB scripts can be downloaded alongside the Supplementary Information which contains step-by-step instructions on usage (Section 3, pages 5-14). These instructions have been written to be user-friendly for researchers new to MATLAB. The MATLAB scripts are also available from GitHub at https://github.com/ Fungussy/EELS-background-subtraction-in-MATLAB.

Functions used for fitting

8The MATLAB scripts use the Curve Fitting Toolbox provided by MathWorks and have extensive commenting (text beginning with '%' or '%%') within the scripts to describe how the code works. There is also comprehensive MATLAB documentation by MathWorks as well as many sources of information on the Internet for researchers who wish to modify the scripts to their purposes. Alternatively, the scripts could also be ported over to an open source language such as Python since MATLAB has similarities with Python scripting.

9There are three scripts described: EELS_fitting.m (fitting script), EELS_fit_analysis.m (fit analysis script), and EELS_subtracted_spectrum.m (plotting script). The first two scripts enable the researcher to find and analyse the best fit for the background while the third is to guide newer users of MATLAB in plotting their subtracted spectra. The fitting script gives a broad overview of a model fitted to a range of windows for background subtraction to estimate the best fit visually before using the fit analysis script to properly assess the goodness-of-fit. The x and y values of the subtracted spectrum can then be saved as separate MATLAB files and plotted using the plotting script. This third script also allows users to save the subtracted spectrum as a .txt for plotting in other software such as Origin.

10The models available for fitting in the Curve Fitting Toolbox include one-and two-term power laws and exponentials. The models are as follows, with the MATLAB nomenclature in parentheses.

11One-term power model ('power1′)

12Two-term power model ('power2′)

13One-term exponential model ('exp1′)

14Two-term exponential model ('exp2′)

15Exponential models can be more useful when the behaviour of the background deviates from a power law, such as in the low-loss region or when there are overlapping edges.

Statistical information on fitting

16MATLAB uses an NLLSE method to iteratively fit the power law or exponential function to the data and can also give detailed information on the fit. For example, the output of running the script can contain the equation and coefficients of the fit as well as goodness-of-fit information such as the sum of squares due to error (SSE) and the adjusted Rsquare value. The SSE measures the total deviation of the fit values to the original data. The smaller the SSE value, the smaller the random error component in the model, and therefore the better the model is for prediction. For EELS background subtraction, there may be cases where only a small window can be used for fitting and therefore the SSE will be quite a large value and not necessarily useful for analysing the goodness-of-fit.

17The adjusted R-square value, v, is the R-square value adjusted based on the residual degrees of freedom. This is the number of response values, n, minus the number of fitted coefficients, m, estimated from the response values.

= − v n m

18The adjusted R-square value is a statistical measure of how successful the fit is in explaining the variation of the data. A value closer to 1 indicates that a greater proportion of variance is accounted for by the model, and therefore the closer to 1, the better the fit is for the data. It is worth noting that the R-square value provides little distinction between systematic errors in the fit and errors in the fit due to noise in the data.

19The root mean squared error (RMSE) is an estimate of the standard deviation of the random component in the data. A smaller RMSE indicates a better fit for prediction.

20In addition to the fit information, the fit analysis script also plots the prediction bounds and the residuals. The observation prediction bounds take into account the mean square error and therefore accounts for random errors in predicting the fitted curve above the edge threshold energy. The residuals are the difference between an observed value and the fitted value provided by a modelthese should be randomly distributed if the fit is good. The user will be able to inspect the residuals for features such as artefacts and extra signals, which can affect background fitting.

21Finally, the fit analysis script calculates the "h-parameter" and the signal-to-noise ratio (SNR) using the signal and background integrals (I k and I B respectively) which can be used to evaluate the background subtraction. Extrapolating the background fit under the signal can introduce errors into the extracted signal, leading to a lower SNR.

22The h-parameter accounts for any statistical uncertainties in the background-dependant part of the signal integral that arise from fitting and extrapolation errors (i.e. the variance in I B ) [7,22].

23All the information about the fit should be considered when determining whether a fit for the background is statistically good or not. The MATLAB scripts we provide show this information which allows the user to objectively assess the goodness of their background fit and compare the suitability of different fits. This gives accurately subtracted EEL spectra with peak positions and integrals that can be used to describe the sample in a more quantitative way. Other statistical estimators of the goodness-of-fit are available in MATLAB, such as the chisquared test, and can be implemented in addition to the examples demonstrated in the current set of scripts depending on the specific scientific questions the user may have.

Results and discussion

24In this section we present four example cases using the scripts. In Section 3.1 we compare the method to the commonly used process available in GMS 3, using a simple example of background subtraction for the carbon K-edge of single-walled carbon nanotubes. The information that can be obtained in this case is comparable to GMS, but the presented MATLAB scripts offer the user increased transparency and flexibility. Section 3.2 demonstrates the increased accuracy enabled by an improved background fitting process, resulting in the elimination of artefacts in the subtracted spectrum of the carbon K-edge in diamond. Section 3.3 subsequently gives an example of when this kind of quantitatively accurate fitting is essential: independent background extraction for multiple overlapping peaks of different elements, in order to determine elemental composition of a sample. The spectrum recorded for this systemcomposed of carbon nanotubes inside boron nanotubes also has a large degree of noise, demonstrating the resilience of our method. Section 3.4 considers low loss and vibrational/ultra-low loss EELS, for which accurate background subtraction is vital even for qualitative analysis; the choice of background and model can lead to substantially different peak positions, intensities, and integrations.

Comparison to GMS 3: background subtraction of the carbon K-edge of single-walled carbon nanotubes

25The Gatan Microscopy Suite (GMS) 3 software contains a highly automated signal extraction method where the edge intensity is extracted by fitting a model to a single pre-edge region and extrapolating this fit to the entire background intensity below the edge signal. The most commonly used model for background subtraction in the core-loss region is a power law. It is recommended that the pre-edge fitting region precedes the edge (for example by 5 eV) and should be as wide as possible to reduce statistical error. However, at the same time, the fit region should only be around 10-30% of the edge energy. Comprehensive information on EEL spectral acquisition and post-processing using GMS 3 can be found at the website www.eels.info. The example used here for comparison between GMS 3 and MATLAB is a sample of single-walled carbon nanotubes (SWNTs) which has minimal multiple scattering since the SWNT bundles are, at most, only a few tens of nanometres thick. As can be seen in Fig. 1a, a wide pre-edge fitting Fig. 1. Background fitting and subtraction for the carbon K-edge of single-walled carbon nanotubes using a oneterm power law in Gatan Microscopy Suite (GMS 3) with a wide pre-edge window of 176-280 eV a) showing a processing artefact around 220 eV from the fitted curve dipping below the background signal (left arrow) as well as an over-estimation of the background in the edge region (right arrow). A narrow pre-edge window of 249-280 eV b) was also used, giving a more reasonable carbon K-edge signal. Original spectra in teal; fitting windows indicated with red rectangles; subtracted spectra overlaid in green. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) window of the carbon K-edge of SWNTs results in a worse background fit than a narrow pre-edge window using the default one-term power law model. There is a processing artefact around 220 eV from the fitted curve dipping below the background signal (left arrow in Fig. 1a) as well as an over-estimation of the background in the edge region (right arrow in Fig. 1a). Although a narrower pre-edge window gives a more reasonable carbon K-edge signal in Fig. 1b, the inclusion of fewer data points in the fitting process results in a statistically less accurate fit. The decreased suitability of fitting a one-term power law to the background with a larger range of data is an indication of the inadequacy of the power law in describing the entire background accurately.

26While NLLSE methods are appropriate for EELS background fitting, especially for EEL spectra containing a small number of counts [23], GMS 3 fitting models are limited to one-term power laws and polynomials. No goodness-of-fit information is given which can be useful when quantifying a fit and determining whether a background fit is appropriate or not.

27In comparison, fitting a two-term power law model to the same carbon K-edge background in MATLAB using EELS_fitting.m resulted in a much better fit across the entire pre-edge background. All data below several user-defined values of (i) eV were fitted, giving a range of background fits of windows from 176-200 eV to 176-280 eV. The background-subtracted spectra were then plotted in a rainbow of colours to aid finding the most appropriate window for background subtraction (Fig. 2a). In contrast to GMS 3, the widest window of 176-280 eV seemed to give the best fitthe subtracted spectrum had a flat baseline. Afterwards, this chosen background fit was analysed using EELS_fit_analysis.m (Fig. 2b) to show the equation used for fitting, the coefficient values, the goodness-of-fit, and the confidence bounds on the coefficients amongst other statistical information (see the output of this script in the Supplementary Information, Section 3, pages 5-14, for all this information as well as a guide on how to use the scripts). The prediction bounds (Fig. 2b; left plot) are particularly narrow in Fig. 2b which suggests low uncertainty in predicting the background under the signal. Most of the residuals of the fit (Fig. 2b; right plot) are distributed evenly which further suggests that this background fit is good. The script also outputs the h-parameter (which should typically be between 2 and 30 for low extrapolation errors) and the signal-to-noise ratio (SNR). Using signal and background integrals between 284 and 300 eV, we can see that the h-parameter is reasonable at a value of 25 which gives a good SNR of 507. The energy width of the integrals used to calculate the h-parameter and the SNR will vary depending on the elements in the sample and whether there are any overlapping edges. The background fitting window should be a similar width or wider than the energy width of the integrals in order to minimise extrapolation errors. The energy width should also be wide enough to have adequate signal but not too wide as this will introduce significant extrapolation errors [7,22].

28After finding and analysing the best fit for removing the background, the subtracted spectrum can then be plotted separately using EELS_subtracted_spectrum.m (Fig. 2c). This demonstrates MATLAB's ability to produce post-processed spectra similar to GMS 3 but with additional statistical information on the fit. Understanding the goodness-of-fit allows one to extrapolate this fit across the entire background with higher accuracy.

29It is straightforward to determine whether or not a fit is appropriate an example of the results of deliberate poor fitting is shown in Fig. 3. In this case, a smaller fitting window of 176-200 eV was used for the carbon K-edge of the SWNTs instead of the larger window shown in Fig. 2. While the two-term power law fits that small window relatively well (adjusted R-square value of 0.9982), the prediction bounds of the fit are not as good and this is shown visually by the bounds curving away from the actual fit (Fig. 3a). The h-parameter and SNR are part of the output from MATLAB and can used to quantitatively assess the goodness-of-fit above the edge threshold energy. Using the same energy width as in Fig. 2b (between 284 and 300 eV), the h-parameter is much larger at a value of 351 which gives a smaller SNR of 467. These two values also show that the power law fit is less suitable than the exponential fit for this spectrum. Fitting a smaller data set means that extrapolating the fit under the signal has a larger degree of uncertainty and leads to an under-estimation of the background in the edge region and therefore incorrect background subtraction (Fig. 3b).

30Having a range of models available for fitting in the provided scripts, in contrast to GMS 3, allows the user to find the most applicable model for background subtraction that uses as many data points as possible. This gives a statistically more accurate fit with lower error which is useful for many situations, such as accurate quantification of elemental composition, extracting signals from noisy spectra, or background subtraction in the ultralow-loss region.

Fitting the background of the carbon K-edge of a polycrystalline diamond composite containing additional signals

31The background of the carbon K-edge of a polycrystalline diamond (PCD) composite sample from Pacella et al. [24] was fitted using the same series of steps as above (Fig. 4). This is an example of EELS analysis of a sample approximately 100-150 nm in thickness, produced using focused ion beam (FIB) milling. The PCD composite sample is thicker than the above carbon nanotube sample prepared using a dropcasting technique and is therefore more likely to contain regions with significant multiple scattering. Several background windows below 280 eV were fitted using a one-term exponential function. Since all the windows gave similar subtracted spectra ( Supplementary Information, Fig. 1, page 1), the largest window was chosen to include as much data in the fit as possible. The residuals are not evenly distributed ( Fig. 4a; right plot); in the subtracted spectrum (Fig. 4c), there is a signal peaking at 170 eV which is in the region of the silicon L 1 -edge, as well as a phosphor response artefact at 250 eV (a dip in intensity caused from having the ZLP focused on the spectrometer). Many EEL spectra may have backgrounds that contain additional signals or multiple scattering effects from thicker samples, and therefore non-evenly distributed residuals do not always indicate inappropriate fitting. These scripts are robust and not easily confused by irregularities in the background. Due to the thickness of the sample and the possible resulting tail of the Si L 1 -edge, the h-parameter is comparatively large in this case (3447), with a small SNR of 83. Analysis of the absolute values of h and the SNR may be of limited relevance for such samples, however a relative comparison when varying fit parameters may still be instructive and help in determining the most suitable background fit. The published EEL spectrum of this PCD sample was fitted in GMS 3 using a one-term power law and there is a residual 'hump' at the start of the spectrum which can be replicated in MATLAB (Fig. 4b). The prediction bounds for the one-term power law (Fig. 4b) are also much wider than those for the one-term exponential ( Fig. 4a; left plot), suggesting the exponential fit is more suitable for this spectrum. The power law fit in Fig. 4b has a large h-parameter of 2085 and a low SNR of 22. The exponential fit has a comparatively larger SNR of 83 which suggests the exponential fit is more suitable for signal extraction. Regardless of the fit, the SNR will be quite low because the original dataset is of a thick sample and thus has a significantly large background contribution. It should be noted that the fit of a one-term power law from Pacella et al. [24] did not affect their chemical analysis of this PCD sample. However, the presence of fitting artefacts gives unrealistic ratios of peak intensities, preventing accurate elemental quantification in samples containing multiple elements.

Fitting the background of a carbon nanotube inside boron nitride nanotube sample to extract the signals of the carbon, boron, and nitrogen Kedges

32The MATLAB scripts can also be used to fit EELS data containing multiple elements. When choosing a fitting window for overlapping edges, the widest possible window may not be the most appropriate as this may include weak signals from previous edges. The integral of the edges can be obtained from the EELS_fit_analysis.m script using the trapezoidal rule from which absolute quantification of the element without plural scattering can be calculated, provided the required parameters are known, using the equation below. in the EELS_fitting.m MATLAB script. Several fitting windows were chosen below (i) eV, from 176-200 eV to 176-280 eV, and plotted in a rainbow of colours to visually aid finding the best fit. b) The best fit using the widest window of 176-280 eV was analysed using EELS_fit_analysis.m which produced two plots as well as statistical information on the fit. This information can be found in the Supplementary Information (Section 3, pages 5-14) which contains a step-by-step guide on how to use these scripts. The guide uses the SWNTs EEL spectrum as an example to illustrate how carry out background subtraction and obtain the same data shown in this figure. The left plot shows that the model closely matches the background (the prediction bounds are shown as dotted lines). The right plot shows that the residuals after subtracting the fitted curves from the original EELS data are evenly distributed which suggests that the fit is good. The fit has an adjusted R-square value of 0.9998. The h-parameter and SNR (calculated using integrals between 284 and 300 eV) are 25 and 507 respectively. c) The original and backgroundsubtracted spectra were plotted on the same axes for comparison using EELS_subtracted_spectrum.m. is the integral edge of element k with no plural scattering, integrated over a window Δ; I o is the zero-loss integral; β is the effective collection angle; Δ is the signal integration width; and σ k (β, Δ) is the partial inelastic scattering cross-section [8].

33Obtaining accurate edge integrals relies on having a good fit for the background, and this is particularly pertinent for spectra where the signal-to-noise ratio is low. It is useful to note here that the contributions to the background may not stay identical under an ionisation edge, especially a few eV past the onset. Therefore, in terms of quantification, even if the best possible background fit is achieved using preedge fitting windows, there may still remain some unknown errors that could affect analysis.

34The example we chose to illustrate this section was boron nitride nanotubes containing carbon nanotubes within, synthesised by Walker et al. (EELS data from Ref. 25). The deposited electron dose was minimised to reduce beam damage to the sample, so the EEL spectrum is noisy and has a low signal-to-background ratio. The boron edge can be fitted first ( Supplementary Information, Fig. 2, page 2), then the carbon edge ( Supplementary Information, Fig. 3, page 3), and then the nitrogen edge to give better elemental quantification ( Supplementary Information, Fig. 4, page 4).

35The models used for fitting varied between all three elements (see Supplementary Information Figs 2, 3 and 4, pages 2-4) and the adjusted R-square values get progressively smaller as the signal-to-noise ratio decreases. The prediction bounds also get wider as the data becomes noisier ( Supplementary Information Figs 2b, 3b, and 4b). The h-parameters are all quite low, giving large SNR values (Supplemetary Information Figs 2, 3 and 4) which suggest that the models used for fitting are appropriate. After the backgrounds from all the edges have been subtracted, the edges can then be plotted against one another as well as the original EEL spectrum (Fig. 5).

Low loss and ultra-low loss peaks

36The final example uses the MATLAB scripts to subtract the background of ultralow-loss spectra of glass blends of metal-organic Fig. 2. The fit was analysed using EELS_fit_analysis.m which produced two plots as well as statistical information on the fit. The left plot shows that the model deviates significantly from the background after the window (the prediction bounds curve away from the fitted curve). The right plot shows that the residuals after subtracting the fitted curves from the original EELS data are evenly distributed which suggests that the fit is good for the small window but this is not the case for the entire background. The fit has an adjusted R-square value of 0.9982. The h-parameter and SNR (calculated using integrals between 284 and 300 eV) are 351 and 467 respectively. b) The original and background-subtracted spectra were plotted on the same axes for comparison using EELS_subtracted_spectrum.m. The baseline of the background-subtracted spectrum is not flat due to underestimation of the background in the edge region. frameworks (MOFs) acquired using scanning transmission electron microscopy (STEM) EELS [26,27]. Electron beam monochromators were used to achieve an incredibly low energy spread of several tens to hundreds of meV (two different microscopes were used in these publications). The electron beam can lose energy to delocalised electronic excitations and cause low energy excitations less than an eV, which is in the infrared region where vibrational modes occur. An atom-sized probe allows the study of vibrational modes of many types of nanostructures with high spatial resolution [6]. The dominant feature in the experimental data is the ZLP which must be removed in order to analyse the vibrational peaks. In particular, the ZLP from a cold field emitter exhibits strong asymmetry due to the physics of the emission process and once the electron beam has passed through the sample, there can be further asymmetry between the gain and loss sides due to Fig. 4. a) The best fit using the widest window of 155.5-280 eV was analysed using EELS_fit_analysis.m which produced two plots as well as statistical information on the fit. The left plot shows that the model closely matches the background (the prediction bounds are shown as dotted lines). The right plot shows that the residuals after subtracting the fitted curves from the original EELS data are not evenly distributed due to a possible silicon L 1edge at around 170 eV as well as a phosphor response at 250 eV. The fit has an adjusted R-square value of 0.9998. The h-parameter and SNR (calculated using integrals between 284 and 300 eV) are 3447 and 83 respectively. b) An unsuitable model of a one-term power law of the form = f x ax ( ) b was used instead with the same fitting window of 155.5-280 eV to demonstrate that the power law does not fit the background well. A one-term power law was used to fit the background by Pacella et al. [24]. The fit was analysed using EELS_fit_analysis.m which produced two plots as well as statistical information on the fit. The left plot shows that the fit both over-and under-estimates the background. Note that the prediction bounds are much wider than for the fit using a one-term exponential. The right plot shows that the residuals after subtracting the fitted curves from the original EELS data are not evenly distributed. The adjusted R-square value is 0.9966; however, this may not be meaningful. The h-parameter and SNR (calculated using integrals between 284 and 300 eV) are 2085 and 22 respectively. c) The original and both background-subtracted spectra were plotted on the same axes for comparison using EELS_subtracted_spectrum.m. The baseline of the EEL spectrum after fitting with a oneterm power law contains a residual 'hump' peaking around 180 eV, as seen in the original paper. electron-sample interactions.

37All of the example spectra are of element-rich regions of particles of glass blends or composites. Fig. 6 shows the low-loss plasmon spectra of particles with Co-and Zn-rich regions [26]. All new red spectra in Fig. 6 are similar to the published blue spectra and have the added benefit of having statistical information on the goodness-of-fit. Due to the data being in the low-loss region, the background contribution from the ZLP is significant and the SNR values are correspondingly small compared to the core-loss example of SWNTs above. At this point, it is worth discussing the camera technology which can affect how background fitting is carried out. The digital signals given by the CCD camera have an offset and gain applied by the pre-amplifier. The offset is a value added or subtracted to the analogue signal while the gain is the analogue signal multiplied by a value to boost the signal. Generally, these values are corrected by calibration so when there is no analogue signal, the digital signal is at zero. However, calibrations can drift so incorrect offset values can give negative values, which can therefore affect the fitting. The offset and gain can either be assumed to be correct or a correction can be applied to the fit. The published spectra took into account the camera offset and incorporated that into their fitting, which is why some of the blue spectra have a higher intensity than the black pre-background subtraction spectra. There will be trade-offs in any background fitting and this fitting routine provides one alternative which may be suitable in many applications.

38The d-d ligand field transition spectra of the same type of particle with Co-and Zn-rich regions are shown in Fig. 7 [26]. This was acquired using high resolution monochromated STEM-EELS. The same colour scheme has been used where the pre-background subtraction spectra are black, the original published background subtracted spectra are blue, and the new background subtracted spectra are red. Similar to Fig. 6, all new red spectra in Fig. 7 are similar to the published blue spectra and have goodness-of-fit information. However, the SNR may not be a particularly useful metric because the signals are relatively weak in this region and signals may overlap with the ZLP. The SNR does point to intrinsic challenges in robust background subtraction in this spectral range, especially given a prominent ZLP tail or when limited spectral channels are available preceding the signals of interest. Statistical parameters nevertheless enable optimisation of the fitting and background subtraction steps.

39The following datasets were acquired for crystal-glass composite particles with Zn-and Al-rich regions [27]. Background subtraction was not carried out on the ultralow-loss vibrational spectra in Fig. 8 (the spectra for similar particles was published with background subtraction) so there are no blue plots for the original published background subtracted spectra. The new red spectra have realistic intensities with the exception of some negative values close to 0 eV where irregularities in the ZLPs meant the background fittings occasionally went above the acquired spectra. This does not appear to affect the rest of the background subtraction, i.e. the fits are statistically good and the adjusted Rsquare values are close to 1.

40Finally, the background subtracted vibrational spectra of a similar particle is shown in Fig. 9 [27]. The original spectra in blue were [27]) were fitted using one-term exponential functions of the form = f x ae ( ) bx . Data below 0.13 eV was used as the fitting window. All fits had adjusted R-square values between 0.9925 and 0.9994. Due to intrinsically low signal levels in this energy range, the calculated SNR values appear comparatively low (below 1). Data pre-background subtraction (black plots) were plotted against the new background subtractions carried out in MATLAB (red plots).

41unpublished due to difficulties with background subtraction (note the unrealistic negative values in the Fig. 9b) blue spectrum). The new red spectra fitted in MATLAB, however, have realistic intensities and the goodness-of-fit information suggest the fits are statistically good.

42In summary, the MATLAB scripts presented can offer a different method for background subtraction in the low-loss region that allows the user to analyse the fit. This is particularly important for vibrational spectra where the peak positions and intensities are greatly affected by the background fit chosen. Accurate background subtractions provide more information on the sample that may otherwise be obscured by the huge contribution from the ZLP.

Conclusions

43We have shown that the MATLAB scripts can be used to extract signals from a variety of spectra, ranging from core-loss to low and ultra-low loss EELS. The focus of this approach gives users the opportunity to quantitatively assess the goodness of their fit using the statistical information provided in order to get accurate fitting for the background and signal extraction. In addition to this, the large database of fitting models in the MATLAB Curve Fitting toolbox allows users to apply many different fits to backgrounds. This will be particularly useful for background subtraction of the low-loss region where the signals are quite weak compared to the core-loss region and accurate background fitting with different models is needed to extract the signals. While these scripts have been designed specifically for analysis of EELS data, they could very well be applied to any analysis that requires background subtraction. The MATLAB scripts provide an alternative to the widely-used GMS 3 EELS fitting software and could be ported into GNU Octave, an open-source program which has many features similar to MATLAB, or indeed Python as mentioned previously.

Methods

44The single-walled carbon nanotubes (SWNTs) were purchased from Carbon Solutions, Inc. (product code P2-SWNT). The lacey carbon film copper (200 mesh) TEM grid that the SWNTs were deposited onto for EELS analysis were purchased from Agar Scientific Ltd.

45The SWNTs EEL spectrum was recorded on a JEOL 2100Plus operating at an accelerating voltage of 80 kV at the University of Nottingham Nanoscale and Microscale Research Centre (nmRC), equipped with a Gatan Enfinium. The spectrum was acquired in imaging mode with an effective convergence angle of < 3 mrad and a collection angle of > 100 mrad. A total of 20 individual exposures of 0.05 s was accumulated with a dispersion of 0.1 eV/channel.

Processing and cleaning of single-walled carbon nanotubes

46Single-walled carbon nanotubes (50 mg) were refluxed in nitric acid (3 M, 50 mL) for 2 hr, then washed with deionised water (500 mL) and dried under vacuum. The dried nanotubes (11 mg) were heated at their oxidation temperature of 600°C for 17 min to give cleaned singlewalled carbon nanotubes as a black powder (2.3 mg).

Preparing the EELS sample of single-walled carbon nanotubes

47The processed single-walled carbon nanotubes were sonicated in HPLC-grade isopropyl alcohol and drop-cast, or deposited, onto a lacey carbon film copper TEM grid.

Declaration of Competing Interest

48The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. Fig. 9. The pre-edge backgrounds of metal-organic framework crystal-glass composite particles of (MIL-53) 0.25 (a g ZIF-62) 0.75 (unpublished EELS data from Ref. [27]) were fitted using one-term exponential functions of the form = f x ae ( ) bx . Data below 0.10 eV was used as the fitting window. The fits had adjusted R-square values of 0.9939 and 0.9998 for the top and bottom spectra respectively. Due to intrinsically low signal in this energy range, the calculated SNR values appear comparatively low (below 1). Data pre-background subtraction (black plots) were plotted against the new background subtractions carried out in MATLAB (red plots). Unpublished background subtracted spectra by Collins et al. are shown on the same axes for comparison (blue plots).

Introduction

49Incident electrons passing through a thin volume of matter in an electron microscope lose energy due to a variety of interactions that are dependent on the nature of the sample. The resulting energy distribution of electrons can be measured using electron energy-loss spectroscopy (EELS), and used to study structure, chemical composition or bonding. Specifically, EELS can for instance probe sample thickness using the integrated intensity of the zero-loss peak relative to the total integrated intensity of the spectrum [1], valence or conduction electron density using the plasmon peaks [2], elemental composition using coreloss edges, bonding and oxidation state using energy loss near edge structure (ELNES) [3], as well as band structure [4,5] and vibrational modes [6] using near zero-loss features. Accurate background fitting is essential to extract this information from raw EELS data. An excellent overview of EELS theory, instrumentation, and applications is presented in Ref. 1.

50The majority of electrons passing through a suitable sample lose little to no energy, resulting in a high intensity zero-loss peak (ZLP). This peak is often in practice asymmetric, especially in the case of a cold field emitter, and often exhibits a tail extending significantly beyond the full-width at half-maximum (FWHM) of the ZLP which must be subtracted from the low-loss region (< 50 eV) before any quantification can be made. The background will also have contributions from any excitations of lower binding energy. In the core-loss region (> 50 eV), the major contributions to the large background come from several processes such as the plasmon tail, lower energy core-edges, multiple scattering, and instrument noise. Because of this, it can be difficult to extract quantitative elemental composition information from EEL spectra, even though EELS is particularly useful for quantification of light elements and for high spatial resolution [7]. In contrast, this information can be more readily obtained using the complementary technique of energy dispersive X-ray spectroscopy (EDXS) where background removal for non-overlapping transition metals and heavier elements causes fewer issues.

51There is an approximately linear relationship between the logarithm of the energy loss and the logarithm of the intensity of the background of a core-loss EEL spectrum, where the largest contribution is from excitation of plasmons [8]. An ideal background can be fitted using a power law function in the form of = − I E AE ( ) r where I is the spectral intensity, E is the energy loss, and A and r are the coefficients. A description of the theoretical explanation for this behaviour can be found in Ref. 9. However, in practice, the spectral background deviates significantly from the ideal. Because of this, power laws may not accurately describe the backgrounds of low-loss ionisation edges below 50 eV or the majority of edges around 100 eV in medium-thick samples such as some K (Li, Be, B), L (Mg, Al, Si, P, S), M (Fe), and even N or O (Th, U) edges [10]. Power laws are more useful for background subtraction of non-overlapping edges at higher energy losses [11] and have limited application to ultralow-loss excitations close to the ZLP [6,12].

52Recently there has been much progress in monochromators and aberration-correction for EELS which decreases the energy distribution of the ZLP and reduces the electron probe to the size of an atom. As a result, in state-of-the-art monochromated instruments the intense tail of the ZLP is now reduced to the point that it no longer obscures ultralowloss features such as band gaps, optical or even phonon excitations. Typically, the FWHM of the ZLP is used as the energy-resolution indicator and an energy resolution of below 10 meV has been achieved [6,12]. Statistically good fitting is particularly important for background subtraction of the ultralow-loss region because the signal-tobackground ratios are much smaller and the signals tend to be broader than core-loss EELS (> 50 eV). As a result, the peak position and edge integration can be greatly affected by the model and fitting window chosen for background subtraction [12]. A statistically worse fit can also lead to incorrect extrapolation of the background in the edge region. Background fitting can be further complicated when only small pre-edge regions can be used to model the background, such as when there are overlapping edges, because the width of the pre-edge window used can affect the fitting result [10]. It is important to process data with clarity and accuracy because curve fitting is often an essential, but not always appropriately used, tool across many areas of research (see the recent discussion in Ref. 13 on curve fitting in the analysis of X-ray photoelectron spectroscopic data).

53The ubiquitous Gatan Microscopy Suite (GMS) 3 is the most commonly used software for EELS background fitting, offering users a straightforward non-linear least squares estimation (NLLSE) method to fit the background to a power law function. Many alternative methods have also been developed in the literature for quantification of EELS data such as the ImageJ plugin Cornell Spectrum Imager (CSI) developed as an open source software package for spectroscopic analysis [14,15], a stand-alone program for EELS quantification called EELSM-ODEL [16], quantitative multiple least-squares fitting [17], improved algorithms for fitting a power law that places constraints on the background above and below the ionisation threshold energy [18] which was subsequently expanded upon to provide a robust background subtraction method for noisy spectra containing multiple core-loss edges [19], high-throughput automated extraction of band gap maps using EELS mapping scripts written in MATLAB [20], as well as a signal-from-background separation algorithm written for GMS 3 that uses subspace division [21]. All of these methods have their merits and uses, and the consensus in the EELS community is that no single method is generally appropriate for every kind of EELS dataset.

54In this paper we present a series of scripts written in MATLAB v. R2019b that can be applied to background fitting and subtraction of both the low-loss region as well as more generic uses of EELS, such as core-loss ionisation edges. We demonstrate several examples of their use for different applications of EELS and compare the quality of the results obtained to typical background subtraction in GMS 3. The primary focus of the scripts is to ensure accuracy in the background subtraction, allowing the user to manually assess the goodness-of-fit and estimate the effect of the background subtraction on the extracted data. The scripts are written in the MATLAB programming languagewidely used in research and industry for data analysis and post-processingand have a general format applicable to many types of EELS data. This allows users to easily modify the code if needed to suit their specific research needs. The three MATLAB scripts can be downloaded alongside the Supplementary Information which contains step-by-step instructions on usage (Section 3, pages 5-14). These instructions have been written to be user-friendly for researchers new to MATLAB. The MATLAB scripts are also available from GitHub at https://github.com/ Fungussy/EELS-background-subtraction-in-MATLAB.

Functions used for fitting

55The MATLAB scripts use the Curve Fitting Toolbox provided by MathWorks and have extensive commenting (text beginning with '%' or '%%') within the scripts to describe how the code works. There is also comprehensive MATLAB documentation by MathWorks as well as many sources of information on the Internet for researchers who wish to modify the scripts to their purposes. Alternatively, the scripts could also be ported over to an open source language such as Python since MATLAB has similarities with Python scripting.

56There are three scripts described: EELS_fitting.m (fitting script), EELS_fit_analysis.m (fit analysis script), and EELS_subtracted_spectrum.m (plotting script). The first two scripts enable the researcher to find and analyse the best fit for the background while the third is to guide newer users of MATLAB in plotting their subtracted spectra. The fitting script gives a broad overview of a model fitted to a range of windows for background subtraction to estimate the best fit visually before using the fit analysis script to properly assess the goodness-of-fit. The x and y values of the subtracted spectrum can then be saved as separate MATLAB files and plotted using the plotting script. This third script also allows users to save the subtracted spectrum as a .txt for plotting in other software such as Origin.

57The models available for fitting in the Curve Fitting Toolbox include one-and two-term power laws and exponentials. The models are as follows, with the MATLAB nomenclature in parentheses.

58One-term power model ('power1′)

59Two-term power model ('power2′)

60One-term exponential model ('exp1′)

61Two-term exponential model ('exp2′)

62Exponential models can be more useful when the behaviour of the background deviates from a power law, such as in the low-loss region or when there are overlapping edges.

Statistical information on fitting

63MATLAB uses an NLLSE method to iteratively fit the power law or exponential function to the data and can also give detailed information on the fit. For example, the output of running the script can contain the equation and coefficients of the fit as well as goodness-of-fit information such as the sum of squares due to error (SSE) and the adjusted Rsquare value. The SSE measures the total deviation of the fit values to the original data. The smaller the SSE value, the smaller the random error component in the model, and therefore the better the model is for prediction. For EELS background subtraction, there may be cases where only a small window can be used for fitting and therefore the SSE will be quite a large value and not necessarily useful for analysing the goodness-of-fit.

64The adjusted R-square value, v, is the R-square value adjusted based on the residual degrees of freedom. This is the number of response values, n, minus the number of fitted coefficients, m, estimated from the response values.

= − v n m

65The adjusted R-square value is a statistical measure of how successful the fit is in explaining the variation of the data. A value closer to 1 indicates that a greater proportion of variance is accounted for by the model, and therefore the closer to 1, the better the fit is for the data. It is worth noting that the R-square value provides little distinction between systematic errors in the fit and errors in the fit due to noise in the data.

66The root mean squared error (RMSE) is an estimate of the standard deviation of the random component in the data. A smaller RMSE indicates a better fit for prediction.

67In addition to the fit information, the fit analysis script also plots the prediction bounds and the residuals. The observation prediction bounds take into account the mean square error and therefore accounts for random errors in predicting the fitted curve above the edge threshold energy. The residuals are the difference between an observed value and the fitted value provided by a modelthese should be randomly distributed if the fit is good. The user will be able to inspect the residuals for features such as artefacts and extra signals, which can affect background fitting.

68Finally, the fit analysis script calculates the "h-parameter" and the signal-to-noise ratio (SNR) using the signal and background integrals (I k and I B respectively) which can be used to evaluate the background subtraction. Extrapolating the background fit under the signal can introduce errors into the extracted signal, leading to a lower SNR.

69The h-parameter accounts for any statistical uncertainties in the background-dependant part of the signal integral that arise from fitting and extrapolation errors (i.e. the variance in I B ) [7,22].

70All the information about the fit should be considered when determining whether a fit for the background is statistically good or not. The MATLAB scripts we provide show this information which allows the user to objectively assess the goodness of their background fit and compare the suitability of different fits. This gives accurately subtracted EEL spectra with peak positions and integrals that can be used to describe the sample in a more quantitative way. Other statistical estimators of the goodness-of-fit are available in MATLAB, such as the chisquared test, and can be implemented in addition to the examples demonstrated in the current set of scripts depending on the specific scientific questions the user may have.

Results and discussion

71In this section we present four example cases using the scripts. In Section 3.1 we compare the method to the commonly used process available in GMS 3, using a simple example of background subtraction for the carbon K-edge of single-walled carbon nanotubes. The information that can be obtained in this case is comparable to GMS, but the presented MATLAB scripts offer the user increased transparency and flexibility. Section 3.2 demonstrates the increased accuracy enabled by an improved background fitting process, resulting in the elimination of artefacts in the subtracted spectrum of the carbon K-edge in diamond. Section 3.3 subsequently gives an example of when this kind of quantitatively accurate fitting is essential: independent background extraction for multiple overlapping peaks of different elements, in order to determine elemental composition of a sample. The spectrum recorded for this systemcomposed of carbon nanotubes inside boron nanotubes also has a large degree of noise, demonstrating the resilience of our method. Section 3.4 considers low loss and vibrational/ultra-low loss EELS, for which accurate background subtraction is vital even for qualitative analysis; the choice of background and model can lead to substantially different peak positions, intensities, and integrations.

Comparison to GMS 3: background subtraction of the carbon K-edge of single-walled carbon nanotubes

72The Gatan Microscopy Suite (GMS) 3 software contains a highly automated signal extraction method where the edge intensity is extracted by fitting a model to a single pre-edge region and extrapolating this fit to the entire background intensity below the edge signal. The most commonly used model for background subtraction in the core-loss region is a power law. It is recommended that the pre-edge fitting region precedes the edge (for example by 5 eV) and should be as wide as possible to reduce statistical error. However, at the same time, the fit region should only be around 10-30% of the edge energy. Comprehensive information on EEL spectral acquisition and post-processing using GMS 3 can be found at the website www.eels.info. The example used here for comparison between GMS 3 and MATLAB is a sample of single-walled carbon nanotubes (SWNTs) which has minimal multiple scattering since the SWNT bundles are, at most, only a few tens of nanometres thick. As can be seen in Fig. 1a, a wide pre-edge fitting Fig. 1. Background fitting and subtraction for the carbon K-edge of single-walled carbon nanotubes using a oneterm power law in Gatan Microscopy Suite (GMS 3) with a wide pre-edge window of 176-280 eV a) showing a processing artefact around 220 eV from the fitted curve dipping below the background signal (left arrow) as well as an over-estimation of the background in the edge region (right arrow). A narrow pre-edge window of 249-280 eV b) was also used, giving a more reasonable carbon K-edge signal. Original spectra in teal; fitting windows indicated with red rectangles; subtracted spectra overlaid in green. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) window of the carbon K-edge of SWNTs results in a worse background fit than a narrow pre-edge window using the default one-term power law model. There is a processing artefact around 220 eV from the fitted curve dipping below the background signal (left arrow in Fig. 1a) as well as an over-estimation of the background in the edge region (right arrow in Fig. 1a). Although a narrower pre-edge window gives a more reasonable carbon K-edge signal in Fig. 1b, the inclusion of fewer data points in the fitting process results in a statistically less accurate fit. The decreased suitability of fitting a one-term power law to the background with a larger range of data is an indication of the inadequacy of the power law in describing the entire background accurately.

73While NLLSE methods are appropriate for EELS background fitting, especially for EEL spectra containing a small number of counts [23], GMS 3 fitting models are limited to one-term power laws and polynomials. No goodness-of-fit information is given which can be useful when quantifying a fit and determining whether a background fit is appropriate or not.

74In comparison, fitting a two-term power law model to the same carbon K-edge background in MATLAB using EELS_fitting.m resulted in a much better fit across the entire pre-edge background. All data below several user-defined values of (i) eV were fitted, giving a range of background fits of windows from 176-200 eV to 176-280 eV. The background-subtracted spectra were then plotted in a rainbow of colours to aid finding the most appropriate window for background subtraction (Fig. 2a). In contrast to GMS 3, the widest window of 176-280 eV seemed to give the best fitthe subtracted spectrum had a flat baseline. Afterwards, this chosen background fit was analysed using EELS_fit_analysis.m (Fig. 2b) to show the equation used for fitting, the coefficient values, the goodness-of-fit, and the confidence bounds on the coefficients amongst other statistical information (see the output of this script in the Supplementary Information, Section 3, pages 5-14, for all this information as well as a guide on how to use the scripts). The prediction bounds (Fig. 2b; left plot) are particularly narrow in Fig. 2b which suggests low uncertainty in predicting the background under the signal. Most of the residuals of the fit (Fig. 2b; right plot) are distributed evenly which further suggests that this background fit is good. The script also outputs the h-parameter (which should typically be between 2 and 30 for low extrapolation errors) and the signal-to-noise ratio (SNR). Using signal and background integrals between 284 and 300 eV, we can see that the h-parameter is reasonable at a value of 25 which gives a good SNR of 507. The energy width of the integrals used to calculate the h-parameter and the SNR will vary depending on the elements in the sample and whether there are any overlapping edges. The background fitting window should be a similar width or wider than the energy width of the integrals in order to minimise extrapolation errors. The energy width should also be wide enough to have adequate signal but not too wide as this will introduce significant extrapolation errors [7,22].

75After finding and analysing the best fit for removing the background, the subtracted spectrum can then be plotted separately using EELS_subtracted_spectrum.m (Fig. 2c). This demonstrates MATLAB's ability to produce post-processed spectra similar to GMS 3 but with additional statistical information on the fit. Understanding the goodness-of-fit allows one to extrapolate this fit across the entire background with higher accuracy.

76It is straightforward to determine whether or not a fit is appropriate an example of the results of deliberate poor fitting is shown in Fig. 3. In this case, a smaller fitting window of 176-200 eV was used for the carbon K-edge of the SWNTs instead of the larger window shown in Fig. 2. While the two-term power law fits that small window relatively well (adjusted R-square value of 0.9982), the prediction bounds of the fit are not as good and this is shown visually by the bounds curving away from the actual fit (Fig. 3a). The h-parameter and SNR are part of the output from MATLAB and can used to quantitatively assess the goodness-of-fit above the edge threshold energy. Using the same energy width as in Fig. 2b (between 284 and 300 eV), the h-parameter is much larger at a value of 351 which gives a smaller SNR of 467. These two values also show that the power law fit is less suitable than the exponential fit for this spectrum. Fitting a smaller data set means that extrapolating the fit under the signal has a larger degree of uncertainty and leads to an under-estimation of the background in the edge region and therefore incorrect background subtraction (Fig. 3b).

77Having a range of models available for fitting in the provided scripts, in contrast to GMS 3, allows the user to find the most applicable model for background subtraction that uses as many data points as possible. This gives a statistically more accurate fit with lower error which is useful for many situations, such as accurate quantification of elemental composition, extracting signals from noisy spectra, or background subtraction in the ultralow-loss region.

Fitting the background of the carbon K-edge of a polycrystalline diamond composite containing additional signals

78The background of the carbon K-edge of a polycrystalline diamond (PCD) composite sample from Pacella et al. [24] was fitted using the same series of steps as above (Fig. 4). This is an example of EELS analysis of a sample approximately 100-150 nm in thickness, produced using focused ion beam (FIB) milling. The PCD composite sample is thicker than the above carbon nanotube sample prepared using a dropcasting technique and is therefore more likely to contain regions with significant multiple scattering. Several background windows below 280 eV were fitted using a one-term exponential function. Since all the windows gave similar subtracted spectra ( Supplementary Information, Fig. 1, page 1), the largest window was chosen to include as much data in the fit as possible. The residuals are not evenly distributed ( Fig. 4a; right plot); in the subtracted spectrum (Fig. 4c), there is a signal peaking at 170 eV which is in the region of the silicon L 1 -edge, as well as a phosphor response artefact at 250 eV (a dip in intensity caused from having the ZLP focused on the spectrometer). Many EEL spectra may have backgrounds that contain additional signals or multiple scattering effects from thicker samples, and therefore non-evenly distributed residuals do not always indicate inappropriate fitting. These scripts are robust and not easily confused by irregularities in the background. Due to the thickness of the sample and the possible resulting tail of the Si L 1 -edge, the h-parameter is comparatively large in this case (3447), with a small SNR of 83. Analysis of the absolute values of h and the SNR may be of limited relevance for such samples, however a relative comparison when varying fit parameters may still be instructive and help in determining the most suitable background fit. The published EEL spectrum of this PCD sample was fitted in GMS 3 using a one-term power law and there is a residual 'hump' at the start of the spectrum which can be replicated in MATLAB (Fig. 4b). The prediction bounds for the one-term power law (Fig. 4b) are also much wider than those for the one-term exponential ( Fig. 4a; left plot), suggesting the exponential fit is more suitable for this spectrum. The power law fit in Fig. 4b has a large h-parameter of 2085 and a low SNR of 22. The exponential fit has a comparatively larger SNR of 83 which suggests the exponential fit is more suitable for signal extraction. Regardless of the fit, the SNR will be quite low because the original dataset is of a thick sample and thus has a significantly large background contribution. It should be noted that the fit of a one-term power law from Pacella et al. [24] did not affect their chemical analysis of this PCD sample. However, the presence of fitting artefacts gives unrealistic ratios of peak intensities, preventing accurate elemental quantification in samples containing multiple elements.

Fitting the background of a carbon nanotube inside boron nitride nanotube sample to extract the signals of the carbon, boron, and nitrogen Kedges

79The MATLAB scripts can also be used to fit EELS data containing multiple elements. When choosing a fitting window for overlapping edges, the widest possible window may not be the most appropriate as this may include weak signals from previous edges. The integral of the edges can be obtained from the EELS_fit_analysis.m script using the trapezoidal rule from which absolute quantification of the element without plural scattering can be calculated, provided the required parameters are known, using the equation below. in the EELS_fitting.m MATLAB script. Several fitting windows were chosen below (i) eV, from 176-200 eV to 176-280 eV, and plotted in a rainbow of colours to visually aid finding the best fit. b) The best fit using the widest window of 176-280 eV was analysed using EELS_fit_analysis.m which produced two plots as well as statistical information on the fit. This information can be found in the Supplementary Information (Section 3, pages 5-14) which contains a step-by-step guide on how to use these scripts. The guide uses the SWNTs EEL spectrum as an example to illustrate how carry out background subtraction and obtain the same data shown in this figure. The left plot shows that the model closely matches the background (the prediction bounds are shown as dotted lines). The right plot shows that the residuals after subtracting the fitted curves from the original EELS data are evenly distributed which suggests that the fit is good. The fit has an adjusted R-square value of 0.9998. The h-parameter and SNR (calculated using integrals between 284 and 300 eV) are 25 and 507 respectively. c) The original and backgroundsubtracted spectra were plotted on the same axes for comparison using EELS_subtracted_spectrum.m. is the integral edge of element k with no plural scattering, integrated over a window Δ; I o is the zero-loss integral; β is the effective collection angle; Δ is the signal integration width; and σ k (β, Δ) is the partial inelastic scattering cross-section [8].

80Obtaining accurate edge integrals relies on having a good fit for the background, and this is particularly pertinent for spectra where the signal-to-noise ratio is low. It is useful to note here that the contributions to the background may not stay identical under an ionisation edge, especially a few eV past the onset. Therefore, in terms of quantification, even if the best possible background fit is achieved using preedge fitting windows, there may still remain some unknown errors that could affect analysis.

81The example we chose to illustrate this section was boron nitride nanotubes containing carbon nanotubes within, synthesised by Walker et al. (EELS data from Ref. 25). The deposited electron dose was minimised to reduce beam damage to the sample, so the EEL spectrum is noisy and has a low signal-to-background ratio. The boron edge can be fitted first ( Supplementary Information, Fig. 2, page 2), then the carbon edge ( Supplementary Information, Fig. 3, page 3), and then the nitrogen edge to give better elemental quantification ( Supplementary Information, Fig. 4, page 4).

82The models used for fitting varied between all three elements (see Supplementary Information Figs 2, 3 and 4, pages 2-4) and the adjusted R-square values get progressively smaller as the signal-to-noise ratio decreases. The prediction bounds also get wider as the data becomes noisier ( Supplementary Information Figs 2b, 3b, and 4b). The h-parameters are all quite low, giving large SNR values (Supplemetary Information Figs 2, 3 and 4) which suggest that the models used for fitting are appropriate. After the backgrounds from all the edges have been subtracted, the edges can then be plotted against one another as well as the original EEL spectrum (Fig. 5).

Low loss and ultra-low loss peaks

83The final example uses the MATLAB scripts to subtract the background of ultralow-loss spectra of glass blends of metal-organic Fig. 2. The fit was analysed using EELS_fit_analysis.m which produced two plots as well as statistical information on the fit. The left plot shows that the model deviates significantly from the background after the window (the prediction bounds curve away from the fitted curve). The right plot shows that the residuals after subtracting the fitted curves from the original EELS data are evenly distributed which suggests that the fit is good for the small window but this is not the case for the entire background. The fit has an adjusted R-square value of 0.9982. The h-parameter and SNR (calculated using integrals between 284 and 300 eV) are 351 and 467 respectively. b) The original and background-subtracted spectra were plotted on the same axes for comparison using EELS_subtracted_spectrum.m. The baseline of the background-subtracted spectrum is not flat due to underestimation of the background in the edge region. frameworks (MOFs) acquired using scanning transmission electron microscopy (STEM) EELS [26,27]. Electron beam monochromators were used to achieve an incredibly low energy spread of several tens to hundreds of meV (two different microscopes were used in these publications). The electron beam can lose energy to delocalised electronic excitations and cause low energy excitations less than an eV, which is in the infrared region where vibrational modes occur. An atom-sized probe allows the study of vibrational modes of many types of nanostructures with high spatial resolution [6]. The dominant feature in the experimental data is the ZLP which must be removed in order to analyse the vibrational peaks. In particular, the ZLP from a cold field emitter exhibits strong asymmetry due to the physics of the emission process and once the electron beam has passed through the sample, there can be further asymmetry between the gain and loss sides due to Fig. 4. a) The best fit using the widest window of 155.5-280 eV was analysed using EELS_fit_analysis.m which produced two plots as well as statistical information on the fit. The left plot shows that the model closely matches the background (the prediction bounds are shown as dotted lines). The right plot shows that the residuals after subtracting the fitted curves from the original EELS data are not evenly distributed due to a possible silicon L 1edge at around 170 eV as well as a phosphor response at 250 eV. The fit has an adjusted R-square value of 0.9998. The h-parameter and SNR (calculated using integrals between 284 and 300 eV) are 3447 and 83 respectively. b) An unsuitable model of a one-term power law of the form = f x ax ( ) b was used instead with the same fitting window of 155.5-280 eV to demonstrate that the power law does not fit the background well. A one-term power law was used to fit the background by Pacella et al. [24]. The fit was analysed using EELS_fit_analysis.m which produced two plots as well as statistical information on the fit. The left plot shows that the fit both over-and under-estimates the background. Note that the prediction bounds are much wider than for the fit using a one-term exponential. The right plot shows that the residuals after subtracting the fitted curves from the original EELS data are not evenly distributed. The adjusted R-square value is 0.9966; however, this may not be meaningful. The h-parameter and SNR (calculated using integrals between 284 and 300 eV) are 2085 and 22 respectively. c) The original and both background-subtracted spectra were plotted on the same axes for comparison using EELS_subtracted_spectrum.m. The baseline of the EEL spectrum after fitting with a oneterm power law contains a residual 'hump' peaking around 180 eV, as seen in the original paper. electron-sample interactions.

84All of the example spectra are of element-rich regions of particles of glass blends or composites. Fig. 6 shows the low-loss plasmon spectra of particles with Co-and Zn-rich regions [26]. All new red spectra in Fig. 6 are similar to the published blue spectra and have the added benefit of having statistical information on the goodness-of-fit. Due to the data being in the low-loss region, the background contribution from the ZLP is significant and the SNR values are correspondingly small compared to the core-loss example of SWNTs above. At this point, it is worth discussing the camera technology which can affect how background fitting is carried out. The digital signals given by the CCD camera have an offset and gain applied by the pre-amplifier. The offset is a value added or subtracted to the analogue signal while the gain is the analogue signal multiplied by a value to boost the signal. Generally, these values are corrected by calibration so when there is no analogue signal, the digital signal is at zero. However, calibrations can drift so incorrect offset values can give negative values, which can therefore affect the fitting. The offset and gain can either be assumed to be correct or a correction can be applied to the fit. The published spectra took into account the camera offset and incorporated that into their fitting, which is why some of the blue spectra have a higher intensity than the black pre-background subtraction spectra. There will be trade-offs in any background fitting and this fitting routine provides one alternative which may be suitable in many applications.

85The d-d ligand field transition spectra of the same type of particle with Co-and Zn-rich regions are shown in Fig. 7 [26]. This was acquired using high resolution monochromated STEM-EELS. The same colour scheme has been used where the pre-background subtraction spectra are black, the original published background subtracted spectra are blue, and the new background subtracted spectra are red. Similar to Fig. 6, all new red spectra in Fig. 7 are similar to the published blue spectra and have goodness-of-fit information. However, the SNR may not be a particularly useful metric because the signals are relatively weak in this region and signals may overlap with the ZLP. The SNR does point to intrinsic challenges in robust background subtraction in this spectral range, especially given a prominent ZLP tail or when limited spectral channels are available preceding the signals of interest. Statistical parameters nevertheless enable optimisation of the fitting and background subtraction steps.

86The following datasets were acquired for crystal-glass composite particles with Zn-and Al-rich regions [27]. Background subtraction was not carried out on the ultralow-loss vibrational spectra in Fig. 8 (the spectra for similar particles was published with background subtraction) so there are no blue plots for the original published background subtracted spectra. The new red spectra have realistic intensities with the exception of some negative values close to 0 eV where irregularities in the ZLPs meant the background fittings occasionally went above the acquired spectra. This does not appear to affect the rest of the background subtraction, i.e. the fits are statistically good and the adjusted Rsquare values are close to 1.

87Finally, the background subtracted vibrational spectra of a similar particle is shown in Fig. 9 [27]. The original spectra in blue were [27]) were fitted using one-term exponential functions of the form = f x ae ( ) bx . Data below 0.13 eV was used as the fitting window. All fits had adjusted R-square values between 0.9925 and 0.9994. Due to intrinsically low signal levels in this energy range, the calculated SNR values appear comparatively low (below 1). Data pre-background subtraction (black plots) were plotted against the new background subtractions carried out in MATLAB (red plots).

88unpublished due to difficulties with background subtraction (note the unrealistic negative values in the Fig. 9b) blue spectrum). The new red spectra fitted in MATLAB, however, have realistic intensities and the goodness-of-fit information suggest the fits are statistically good.

89In summary, the MATLAB scripts presented can offer a different method for background subtraction in the low-loss region that allows the user to analyse the fit. This is particularly important for vibrational spectra where the peak positions and intensities are greatly affected by the background fit chosen. Accurate background subtractions provide more information on the sample that may otherwise be obscured by the huge contribution from the ZLP.

Conclusions

90We have shown that the MATLAB scripts can be used to extract signals from a variety of spectra, ranging from core-loss to low and ultra-low loss EELS. The focus of this approach gives users the opportunity to quantitatively assess the goodness of their fit using the statistical information provided in order to get accurate fitting for the background and signal extraction. In addition to this, the large database of fitting models in the MATLAB Curve Fitting toolbox allows users to apply many different fits to backgrounds. This will be particularly useful for background subtraction of the low-loss region where the signals are quite weak compared to the core-loss region and accurate background fitting with different models is needed to extract the signals. While these scripts have been designed specifically for analysis of EELS data, they could very well be applied to any analysis that requires background subtraction. The MATLAB scripts provide an alternative to the widely-used GMS 3 EELS fitting software and could be ported into GNU Octave, an open-source program which has many features similar to MATLAB, or indeed Python as mentioned previously.

Methods

91The single-walled carbon nanotubes (SWNTs) were purchased from Carbon Solutions, Inc. (product code P2-SWNT). The lacey carbon film copper (200 mesh) TEM grid that the SWNTs were deposited onto for EELS analysis were purchased from Agar Scientific Ltd.

92The SWNTs EEL spectrum was recorded on a JEOL 2100Plus operating at an accelerating voltage of 80 kV at the University of Nottingham Nanoscale and Microscale Research Centre (nmRC), equipped with a Gatan Enfinium. The spectrum was acquired in imaging mode with an effective convergence angle of < 3 mrad and a collection angle of > 100 mrad. A total of 20 individual exposures of 0.05 s was accumulated with a dispersion of 0.1 eV/channel.

Processing and cleaning of single-walled carbon nanotubes

93Single-walled carbon nanotubes (50 mg) were refluxed in nitric acid (3 M, 50 mL) for 2 hr, then washed with deionised water (500 mL) and dried under vacuum. The dried nanotubes (11 mg) were heated at their oxidation temperature of 600°C for 17 min to give cleaned singlewalled carbon nanotubes as a black powder (2.3 mg).

Preparing the EELS sample of single-walled carbon nanotubes

94The processed single-walled carbon nanotubes were sonicated in HPLC-grade isopropyl alcohol and drop-cast, or deposited, onto a lacey carbon film copper TEM grid.

Declaration of Competing Interest

95The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. Fig. 9. The pre-edge backgrounds of metal-organic framework crystal-glass composite particles of (MIL-53) 0.25 (a g ZIF-62) 0.75 (unpublished EELS data from Ref. [27]) were fitted using one-term exponential functions of the form = f x ae ( ) bx . Data below 0.10 eV was used as the fitting window. The fits had adjusted R-square values of 0.9939 and 0.9998 for the top and bottom spectra respectively. Due to intrinsically low signal in this energy range, the calculated SNR values appear comparatively low (below 1). Data pre-background subtraction (black plots) were plotted against the new background subtractions carried out in MATLAB (red plots). Unpublished background subtracted spectra by Collins et al. are shown on the same axes for comparison (blue plots).

참고문헌 29건

  1. Electron energy loss spectroscopy Physics Subject Headings (PhySH) · 2018 10.29172/8d9a550072044ae48a93388da8f8d432
  2. Electron Energy-loss Spectroscopy in the Electron Microscope Journal of Modern Optics · Taylor & Francis · 1987 10.1080/09500348714550571
  3. Electron Energy Loss Spectroscopy Micron · Elsevier BV · 2002 10.1016/s0968-4328(02)00019-7
  4. Weighted least squares estimation of background in EELS imaging Journal of Microscopy · Wiley · 1985 10.1111/j.1365-2818.1985.tb02565.x
  5. Electron energy-loss spectroscopy in the TEM Reports on Progress in Physics · IOP Publishing · 2008 10.1088/0034-4885/72/1/016502
  6. <i>Electron Energy-Loss Spectroscopy in the Electron Microscope</i> Physics Today · AIP Publishing · 1987 10.1063/1.2820276
  7. Direct and indirect transitions in the region of the band gap using electron-energy-loss spectroscopy Physical review. B, Condensed matter · American Physical Society · 1998 10.1103/physrevb.58.10326
  8. Multiple least-squares fitting for quantitative electron energy-loss spectroscopy — an experimental investigation using standard specimens Ultramicroscopy · Elsevier BV · 1995 10.1016/0304-3991(94)00198-v
  9. A new background subtraction for low‐energy EELS core edges Journal of Microscopy · Wiley · 1992 10.1111/j.1365-2818.1992.tb01529.x
  10. Improved background-fitting algorithms for ionization edges in electron energy-loss spectra Ultramicroscopy · Elsevier BV · 2002 10.1016/s0304-3991(01)00155-3
  11. FIB/TEM/EELS micro/nanometric investigations of the effects of laser ablation on the diamond/binder structure in polycrystalline diamond composites Journal of Materials Processing Technology · Elsevier BV · 2013 10.1016/j.jmatprotec.2013.10.007
  12. Quantitative valence plasmon mapping in the TEM: viewing physical properties at the nanoscale Ultramicroscopy · Elsevier BV · 2003 10.1016/s0304-3991(03)00115-3
  13. Advantages of a monochromator for bandgap measurements using electron energy-loss spectroscopy Micron · Elsevier BV · 2004 10.1016/j.micron.2004.11.001
  14. Optimization of the Signal to Noise Ratio in EFTEM Elemental Maps with Regard to Different Ionization Edge Types Micron · Elsevier BV · 1998 10.1016/s0968-4328(98)00014-6
  15. Vibrational spectroscopy in the electron microscope Nature · Nature Portfolio · 2014 10.1038/nature13870
  16. The Theory and Interpretation of Electron Energy Loss Near-Edge Fine Structure Annual Review of Materials Research · Annual Reviews · 2008 10.1146/annurev.matsci.37.052506.084209
  17. Model based quantification of EELS spectra Ultramicroscopy · Elsevier BV · 2004 10.1016/j.ultramic.2004.06.004
  18. Parallel EELS elemental mapping in scanning transmission electron microscopy: use of the difference methods Microscopy Microanalysis Microstructures · EDP Sciences · 1991 10.1051/mmm:0199100205053100
  19. The Open-Source Cornell Spectrum Imager Microscopy Today · Oxford University Press · 2012 10.1017/s1551929512000995
  20. Automated approaches for band gap mapping in STEM-EELS Ultramicroscopy · Elsevier BV · 2017 10.1016/j.ultramic.2017.08.006
  21. Growth of Carbon Nanotubes inside Boron Nitride Nanotubes by Coalescence of Fullerenes: Toward the World's Smallest Coaxial Cable Small Methods · Wiley · 2017 10.1002/smtd.201700184
  22. Exploring the capabilities of monochromated electron energy loss spectroscopy in the infrared regime Scientific Reports · Nature Portfolio · 2018 10.1038/s41598-018-23805-5
  23. An EELS signal-from-background separation algorithm for spectral line-scan/image quantification Ultramicroscopy · Elsevier BV · 2018 10.1016/j.ultramic.2018.08.013
  24. Subwavelength Spatially Resolved Coordination Chemistry of Metal–Organic Framework Glass Blends Journal of the American Chemical Society · American Chemical Society · 2018 10.1021/jacs.8b11548
  25. The use and misuse of curve fitting in the analysis of core X‐ray photoelectron spectroscopic data Surface and Interface Analysis · Wiley · 2019 10.1002/sia.6629
  26. Simultaneous multi-region background subtraction for core-level EEL spectra Ultramicroscopy · Elsevier BV · 2019 10.1016/j.ultramic.2019.112919
  27. Functional Group Mapping by Electron Beam Vibrational Spectroscopy from Nanoscale Volumes Nano Letters · American Chemical Society · 2020 10.1021/acs.nanolett.9b04732
  28. Data Processing for Atomic Resolution Electron Energy Loss Spectroscopy Microscopy and Microanalysis · Oxford University Press · 2012 10.1017/s1431927612000244
  29. Quantitative Analysis of the Energy-Loss Spectrum Springer eBooks · Springer Nature · 1996 10.1007/978-1-4757-5099-7_4