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

Quantitative analysis of spectroscopic low energy electron microscopy data: High-dynamic range imaging, drift correction and cluster analysis

간접 관련 필름·전자재료 · (15) 디스플레이 패널재료 (11) 배리어 필름(16) CPI(투명 폴리이미드)

기본 정보

저자
  1. Tobias A. de Jong — Huygens-Kamerlingh Onnes Laboratorium, Leiden Institute of Physics, Leiden University, Niels Bohrweg 2, P.O. Box 9504, RA Leiden NL-2300, the Netherlands
  2. David Kok — Mathematical Institute, Leiden University, Niels Bohrweg 1, Leiden 23332CA, the Netherlands
  3. Alexander J. H. van der Torren — Huygens-Kamerlingh Onnes Laboratorium, Leiden Institute of Physics, Leiden University, Niels Bohrweg 2, P.O. Box 9504, RA Leiden NL-2300, the Netherlands
  4. H. Schopmans — Huygens-Kamerlingh Onnes Laboratorium, Leiden Institute of Physics, Leiden University, Niels Bohrweg 2, P.O. Box 9504, RA Leiden NL-2300, the Netherlands
  5. R. M. Tromp — Huygens-Kamerlingh Onnes Laboratorium, Leiden Institute of Physics, Leiden University, Niels Bohrweg 2, P.O. Box 9504, RA Leiden NL-2300, the Netherlands|||IBM T. J. Watson Research Center, 1101 Kitchawan Road, P.O. Box 218, Yorktown Heights, NY 10598, USA
  6. Sense Jan van der Molen — Huygens-Kamerlingh Onnes Laboratorium, Leiden Institute of Physics, Leiden University, Niels Bohrweg 2, P.O. Box 9504, RA Leiden NL-2300, the Netherlands
  7. Johannes Jobst — Huygens-Kamerlingh Onnes Laboratorium, Leiden Institute of Physics, Leiden University, Niels Bohrweg 2, P.O. Box 9504, RA Leiden NL-2300, the Netherlands
DOI
10.1016/j.ultramic.2019.112913
저널
Ultramicroscopy
발행년도
2019
발행기관
Elsevier BV
피인용수
15
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1016/j.ultramic.2019.112913
토픽
Electron and X-Ray Spectroscopy Techniques
OpenAlex ID
W2989772863

평가 내용

관련도
간접 관련
사업분야
필름·전자재료 · (15) 디스플레이 패널재료
부 분야
(11) 배리어 필름, (16) CPI(투명 폴리이미드)
R&D 측면
분석·모델링
확신도
0.70
근거 용어
Low Energy Electron Microscopy (LEEM), spectroscopic imaging, graphene, surface science, data analysis
판단 근거
이 논문은 저에너지 전자 현미경(LEEM)을 이용한 표면 분석 및 데이터 처리 알고리즘에 관한 연구입니다. 직접적인 제품 연구는 아니나, 코오롱인더스트리의 디스플레이 소재(15)나 필름(11, 16) 개발 시 필수적인 나노 단위 표면 물성 분석 및 박막 구조(graphene 등) 분석 기법으로 응용 가능합니다.
R&D 활용 포인트
디스플레이용 투명 폴리이미드(CPI)나 배리어 필름의 표면 결함, 박막 두께, 결정 구조 등을 정밀하게 분석하는 계측 기술 및 데이터 처리 모델로 활용할 수 있습니다.
평가 입력
본문 88,942자 중 30,032자 발췌

초록

For many complex materials systems, low-energy electron microscopy (LEEM) offers detailed insights into morphology and crystallography by naturally combining real-space and reciprocal-space information. Its unique strength, however, is that all measurements can easily be performed energy-dependently. Consequently, one should treat LEEM measurements as multi-dimensional, spectroscopic datasets rather than as images to fully harvest this potential. Here we describe a measurement and data analysis approach to obtain such quantitative spectroscopic LEEM datasets with high lateral resolution. The employed detector correction and adjustment techniques enable measurement of true reflectivity values over four orders of magnitudes of intensity. Moreover, we show a drift correction algorithm, tailored for LEEM datasets with inverting contrast, that yields sub-pixel accuracy without special computational demands. Finally, we apply dimension reduction techniques to summarize the key spectroscopic features of datasets with hundreds of images into two single images that can easily be presented and interpreted intuitively. We use cluster analysis to automatically identify different materials within the field of view and to calculate average spectra per material. We demonstrate these methods by analyzing bright-field and dark-field datasets of few-layer graphene grown on silicon carbide and provide a high-performance Python implementation.

본문 88,942자

본문 펼치기
## Quantitative analysis of spectroscopic Low Energy Electron Microscopy data: High-dynamic range imaging, drift correction and cluster analysis T.A. de Jong <sup>a,</sup> <sup>_∗_</sup>, D.N.L. Kok <sup>b</sup>, A.J.H. van der Torren <sup>a</sup>, H. Schopmans <sup>a</sup>, R.M. Tromp <sup>a,c</sup>, S.J. van der Molen <sup>a</sup>, J. Jobst <sup>a</sup> _aHuygens-Kamerlingh_ _Onnes_ _Laboratorium,_ _Leiden_ _Institute_ _of_ _Physics,_ _Leiden_ _University,_ _Niels_ _Bohrweg_ _2,_ _P.O._ _Box_ _9504,_ _NL-2300_ _RA_ _Leiden,_ _The_ _Netherlands_ _bMathematical_ _Institute,_ _Leiden_ _University,_ _Niels_ _Bohrweg_ _1,_ _23332CA_ _Leiden,_ _The_ _Netherlands_ _cIBM_ _T._ _J._ _Watson_ _Research_ _Center,_ _1101_ _Kitchawan_ _Road,_ _P.O._ _Box_ _218,_ _Yorktown_ _Heights,_ _New_ _York_ _10598,_ _USA_ Abstract For many complex materials systems, low-energy electron microscopy (LEEM) offers detailed insights into morphology and crystallography by naturally combining real-space and reciprocal-space information. Its unique strength, however, is that all measurements can easily be performed energy-dependently. Consequently, one should treat LEEM measurements as multi-dimensional, spectroscopic datasets rather than as images to fully harvest this potential. Here we describe a measurement and data analysis approach to obtain such quantitative spectroscopic LEEM datasets with high lateral resolution. The employed detector correction and adjustment techniques enable measurement of true reflectivity values over four orders of magnitudes of intensity. Moreover, we show a drift correction algorithm, tailored for LEEM datasets with inverting contrast, that yields sub-pixel accuracy without special computational demands. Finally, we apply dimension reduction techniques to summarize the key spectroscopic features of datasets with hundreds of images into two single images that can easily be presented and interpreted intuitively. We use cluster analysis to automatically identify different materials within the field of view and to calculate average spectra per material. We demonstrate these methods by analyzing bright-field and dark-field datasets of few-layer graphene grown on silicon carbide and provide a high-performance Python implementation. _Keywords:_ LEEM, low-energy electron microscopy, image registration, detector correction, data analysis, parallel computation, spectroscopic imaging 1. Introduction Low Energy Electron Microscope (LEEM) is a surface science technique where images are formed from reflected electrons of low kinetic energy—down to single electronvolts. This is achieved by decelerating the electrons before they reach the sample and projecting them onto a pixelated detector after interaction with the sample. LEEM has proven to be a versatile tool, due to its damage-free, real-time imaging capabilities and its combination of electron diffraction with spectroscopic, and real-space information. This enables more advanced LEEM-based techniques such as dark-field imaging, where electrons from a single diffracted beam are used to create a real-space image, revealing spatial information on the atomic lattice of the sample [1, 2]. Aside from usage as an imaging tool, LEEM is frequently used as a tool for quantitative analysis of physical properties of a wide range of materials. Multi-dimensional datasets can be created by recording LEEM images as a function of one or more parameters such as interaction energy _E_ 0, angle of incidence or temperature [3, 4]. Using _∗_ Corresponding Author _Email_ _address:_ `jongt@physics.leidenuniv.nl` (T.A. de Jong) this, a wide range of properties can be studied, for example, layer interaction, electron bands [5], layer stacking [2], catalysis [6], plasmons [7], and surface corrugation [8]. (a) (b) (c) raw data stack drift corrected data stack local spectra j i h 70 60 50 40 30 20 10 0 10−1 100 101 intensity (arb. units) dxij dyij _Figure_ _1:_ _(a)_ _A_ _stack_ _of_ _raw_ _LEEM_ _images_ _where_ _images_ _are_ _shifted with respect to each other due to experimental drift._ _(b)_ _Drift_ _correction_ _aligns_ _features_ _in_ _the_ _images_ _to_ _compensate._ _(c)_ _Spectra_ _corresponding_ _to_ _pixels_ _indicated_ _in_ _(b)._ However, to unlock the true potential of quantitative analysis of multi-dimensional LEEM data, post-processing of images and combination with meta-data is needed. In particular, it is necessary to correct for detector artifacts and image drift and to convert image intensity to physical quantities. To this end, we here present a modular data acqui _Preprint_ _submitted_ _to_ _Ultramicroscopy_ _August_ _1,_ _2019_ sition and analysis pipeline for multi-dimensional LEEM data, combining techniques well established in other fields such as general astronomy or transmission electron microscopy (TEM), that yields high resolution spectroscopic datasets and visualizations thereof. In particular, we start with the correction of the raw data for detector artifacts using flat field and dark current correction, as illustrated in Fig. 1(a). Combining these corrections on the images with active feedback on detector gain enables High Dynamic Range (HDR) spectroscopy, which makes it possible to measure spectra over four orders of magnitude of intensity. Subsequently, we demonstrate that compensation of detector artifacts also enables drift correction with sub-pixel accurate image registration, yielding a fully corrected data stack (Fig. 1 (b)). This creates a true pixelby-pixel spectroscopic dataset, as shown in Fig. 1(c), i.e. every pixel contains a reflectivity spectrum of the corresponding position on the sample. Finally, we explore the potential for more advanced computational data analysis. We show that by using relatively simple dimension reduction techniques and clustering, these datasets can be intuitively analyzed and visualized, enabling semi-automatic identification of areas with different spectra. To demonstrate these features and quantify the accuracy, we apply the drift correction algorithm to artificial data and then apply the full pipeline to a real dataset acquired on the SPECS P90 based ESCHER system in Leiden [9, 10, 11]. The sample of the dataset is fewlayer graphene grown by thermal decomposition of Silicon Carbide (SiC) [12], followed by hydrogen intercalation to decouple the graphene from the SiC substrate [13, 14]. Bright Field LEEM spectra can be used to distinguish the resulting mixture of bilayer, trilayer and thicker graphene, as interlayer states cause distinct minima in the reflectivity spectra [15, 16]. In addition, the growth process causes strain-induced stacking domains, which can be distinguished using Dark Field LEEM spectra [17, 2]. The sample dataset consists of bright-field and dark-field LEEM images of the same area for a range of landing energies (sometimes referred to as LEEM-I(V)). The dark-field dataset uses a first order diffraction spot and tilted illumination such that the incident beam has the opposite angle to the normal as the diffracted beam, as described in more detail in Ref. [2]. The data is available as open data [18] and is interpreted and investigated in detail in Ref. [2, 19]. 2. Detector Correction No physical detector system is perfect, i.e. each detector system introduces systematic errors and noise. Knowledge of the sources of these imperfections enables the correction of most of them. The ESCHER LEEM has the classical detector layout: A chevron microchannel plate array (MCP, manufactured by Hamamatsu) for electron multiplication, a phosphor screen to convert electrons to photons and a CCD camera (a PCO sensicam SVGA) to record images of the phosphor screen. The CCD introduces artifacts in the form of added dark counts and a non-uniform gain [20, 21, 22, 23]. Furthermore, the MCP gain is also spatially non-uniform, for example due to overexposure damaging of the MCP, resulting in locally reduced gain. Therefore we describe the measured intensity _I_ CCD on the CCD as the following combination of the previously named detector artifacts and the ‘true’ signal _I_ in: _I_ CCD( _x, y_ ) = _DC_ ( _x, y_ ) + _I_ in( _x, y_ ) _· G_ ( _x, y_ ) (1) Where _DC_ ( _x, y_ ) is the intensity caused by dark current and _G_ ( _x, y_ ) is the position-dependent and as-of-yet unknown gain factor comprising all modifications to the gain. To compensate for these detector artifacts, we employ techniques well-established in astronomy (and other fields using CCD cameras) to effectively invert the relation in Eq. (1), to extract _I_ in( _x, y_ ) without the deleterious effects of background dark counts _DC_ ( _x, y_ ) and local gain variations _G_ ( _x, y_ ). First, the dark current of the CCD is compensated by pixel-wise subtracting a non-illuminated _dark_ _count_ image, i.e. an image with the same exposure time as used for the measurement, but no electron illumination at all. A pixel-wise average of a set of such dark count images is shown in Fig. 2a. The dark current arises from thermal excitations in the sensor and varies over time with an approximately Gaussian distribution. The mean of this distribution is dependent on the pixel, i.e. the _x, y_ location, for example visible in Fig 2(a) as a slight increase in the lower right corner. To suppress the thermal fluctuations in the template dark current image, it is desirable to average over several dark count images to prevent the introduction of systematic errors. We assume that the per-pixel dark currents are identically distributed with a variance Vartherm except for a spatial variance Varspatial of the mean. This is mathematically equivalent to assuming the dark current fluctuates around its mean with both spatially dependent (but fixed in time) noise and timedependent thermal noise. By averaging multiple dark images, we reduce the thermal variance but not the spatial variance. The remaining variance is given by: Vartot( _n_ ) = Vartherm( _n_ ) + Varspatial = <sup><u>1</u></sup> _n_ <sup>Vartherm(1) + Varspatial</sup> Where Var( _n_ ) is used to denote the variance of _n_ pixel-wise averaged images. By determining Vartot( _n_ ) and Vartot(1) experimentally we can isolate the thermal noise on a single image: For the ESCHER system with its Peltier-cooled camera, we find Vartherm(16 _×_ 250 ms images) = 114 _._ 3. Therefore, a set of 120 _×_ 16 images (a total exposure time of 8 Vartherm(1) = �Vartot(1) _−_ Vartot( _n_ )� _·_ _<u>n</u>_ (2) _n −_ 1 2 (a) 0 65 (b) 0 0.40 0.35 0.30 0 65 60 55 50 45 40 35 (e) raw DC and FF corrected 50000 200 400 600 800 200 400 600 800 0.25 0.20 0.15 0.10 <u>0</u> <u>200</u> <u>400</u> <u>600</u> <u>800</u> <u>1000</u> y (pixels) 1000 1000 <u>0</u> <u>200</u> <u>400</u> <u>600</u> <u>800</u> <u>1000</u> <u>1200</u> <u>0</u> <u>200</u> <u>400</u> <u>600</u> <u>800</u> <u>1000</u> <u>1200</u> 40000 30000 20000 10000 <u>0</u> <u>200</u> <u>400</u> <u>600</u> <u>800</u> <u>1000</u> <u>1200</u> 1000 (c) 0 (d) 0 0 200 400 600 800 50000 40000 30000 20000 10000 200 400 600 800 1000 1000 <u>0</u> <u>200</u> <u>400</u> <u>600</u> <u>800</u> <u>1000</u> <u>1200</u> <u>0</u> <u>200</u> <u>400</u> <u>600</u> <u>800</u> <u>1000</u> <u>1200</u> 50000 40000 30000 20000 10000 0.40 0.35 0.30 0.25 0.20 0.15 0.10 <u>0</u> <u>200</u> <u>400</u> <u>600</u> <u>800</u> <u>1000</u> <u>1200</u> 1000 _Figure_ _2:_ _(a)_ _Dark_ _Count_ _image_ _taken_ _on_ _ESCHER_ _averaged_ _over_ 19 _×_ 16 _images_ _with_ 250 ms _exposure_ _time._ _(b)_ _Flat_ _field_ _image_ _with_ _visible_ _edges_ _of_ _the_ _round_ _microchannel_ _plate_ _and_ _damaged_ _areas_ _(arrow)._ _(c)_ _Uncorrected_ _bright-field_ _LEEM_ _image_ _from_ _the_ _sample_ _dataset._ _The_ _field_ _of_ _view_ _corresponds_ _to_ 3 _._ 5 µm _._ _(d)_ _Dark_ _count_ _and_ _flat_ _field_ _corrected_ _version_ _of_ _the_ _image_ _in_ _(c)._ _(e)_ _Line_ _cut_ _through_ _the_ _raw_ _image_ _(c)_ _and_ _the_ _corrected_ _image_ _(d)_ _shown_ _in_ _red_ _and_ _green,_ _respectively._ _Note_ _that_ _the_ _dip_ _due_ _to_ _MCP_ _damage_ _at_ _y_ = 140 _(arrow)_ _is_ _removed_ _and_ _the_ _profiles_ _for_ _similar_ _areas_ _are_ _flattened._ minutes) is sufficient to suppress the systematic errors to values smaller than the discretization error. We find that the dark count image does not significantly change over time, and therefore remeasuring dark count images is seldomly needed. Second, to compensate for spatial gain variations, which are mostly due to the MCP, a (conventional) _flat_ _field_ correction is performed, dividing the full dark count-corrected dataset by an evenly illuminated image [24]. In LEEM, at negative landing energies of _E_ 0 _≈−_ 20 eV the sample behaves as a mirror, yielding an almost perfect flat field image as approximation of _G_ ( _x, y_ ) in Eq. (1). A relatively large value for the negative energy is taken to prevent artifacts from local in-plane electric field components, e.g. due to work function or height differences in the sample [25, 26, 27]. For the ESCHER system, it is necessary to take flat field images within hours of the measurement, as the MCP wears over time and the gun emission profile and system alignment change on relatively short timescales [28]. Furthermore, taking a flat field image at the same precise alignment as the measurement is preferred for two reasons. First, barring absolutely perfect alignment of the system as well as a perfectly uniform emission from the electron gun, the beam intensity is not spatially uniform. As illumination inhomogeneities are dependent on the precise settings of the lenses, these will also be compensated for if the flat field is recorded in the exact same configuration. Second, for proper normalization of the data, as explained in Section 3, the same magnification (projector settings) is needed. An alternative to this mirror mode flat fielding is to average over a sufficiently large set of images of different positions on the sample and use the resulting average as a flat field image. In most cases however, mirror mode flat fielding is preferred over such ensemble-average flat fielding since for the latter many images of different locations are required. Even when such a set is already available, it is hard to rule out any systematic (statistical) errors. Lastly ensemble-average cannot provide proper normalization of the data to convert to true reflectivity. 3. High dynamic range spectroscopy In LEEM and LEED, large variations occur in the amplitude of the signal, both within individual images and from image to image. For example, in LEED spectroscopy, features of interest are often orders of magnitude less bright than primary Bragg peaks. This necessitates a detector system with a large dynamic range. The CCDcamera of the ESCHER setup has a bit depth of 12 bits and a possibility to accumulate 16 images in hardware, yielding an effective bit depth of 16 bits for singular images. For most materials, the reflected intensity _I_ ( _E_ 0) changes over orders of magnitude as a function of _E_ 0. Starting in mirror mode, the reflected intensity tends to decrease roughly exponentially for _E_ 0 ≲ 100 eV. To obtain spectra with such a large dynamic range, the dynamic range offered by the bit depth of the CCD alone is not sufficient. However, the gain _G_ of the MCP, i.e. the ratio of outgoing electrons to incoming electrons, can be tuned by the 3 Channel Plate bias (kV) <u>0.8</u> <u>1.0</u> <u>1.2</u> <u>1.4</u> <u>1.6</u> <u>1.8</u> Channel Plate bias (kV) <u>0.8</u> <u>1.0</u> <u>1.2</u> <u>1.4</u> <u>1.6</u> <u>1.8</u> Channel Plate bias (kV) Channel Plate bias (kV) (a) <u>0.8</u> <u>1.0</u> <u>1.2</u> <u>1.4</u> <u>1.6</u> <u>1.8</u> <u>0.8</u> <u>1.0</u> <u>1.2</u> <u>1.4</u> <u>1.6</u> <u>1.8</u> (b) 10 <sup>4</sup> 10 <sup>3</sup> 10 <sup>2</sup> 10 <sup>1</sup> ~~DC~~ 10 <sup>4</sup> 10 <sup>3</sup> 10 <sup>2</sup> 10 <sup>1</sup> 10 <sup>0</sup> 10 <sup>0</sup> _E_ 0 = −13.0 _E_ 0 = 27.8 _E_ 0 = 61.8 (c) (d) 10 <sup>11</sup> 10 <sup>10</sup> 10 <sup>9</sup> 10 <sup>8</sup> 10 <sup>7</sup> 10 <sup>6</sup> 10 <sup>5</sup> 10 <sup>4</sup> 0.4 0.2 0.0 −0.2 −0.4 <u>0.8</u> <u>1.0</u> <u>1.2</u> <u>1.4</u> <u>1.6</u> <u>1.8</u> Channel Plate bias (kV) <u>0.8</u> <u>1.0</u> <u>1.2</u> <u>1.4</u> <u>1.6</u> <u>1.8</u> Channel Plate bias (kV) _Figure_ _3:_ _(a)_ _Calibration curves as measured with_ 16 _×_ 250 ms _exposure_ _time_ _per_ _image_ _measured_ _on_ _graphene_ _on_ _SiC._ _(b)_ _Calibration_ _curves_ _corrected_ _for_ _dark_ _count._ _(c)_ _Calibration_ _curves_ _with_ _matched_ _intensity_ _and_ _normalized_ _by_ _joint_ _curve_ _fit_ _of_ _Eq._ _(3)_ _and_ _resulting_ _best_ _fit_ _(black_ _line)._ _(d)_ _Residuals_ _of_ _the_ _joint_ _fit_ _in_ _(c)._ voltage _V_ MCP applied over the MCP. This gain scales approximately exponential in _V_ MCP (over a reasonable range, see next section), enabling image formation of approximately constant intensity on the CCD, for a wide range of incident electron intensities. We use this property to develop a scheme to further increase the dynamic range in which _G_ ( _V_ MCP) is adjusted by setting a new MCP bias for each new image, i.e. increasing the gain for images where the reflected intensity is low. Measuring _V_ MCP for each recorded image and calibrating _G_ ( _V_ MCP) makes it possible to employ the full dynamic range of the CCD-camera for all landing energies, without losing the information of the absolute magnitude of the measured intensities, thus extending the range of spectroscopy without significant decrease in signal-to-noise ratio. _3.1._ _Calibration_ Hamamatsu Photonics K.K., the manufacturer of the microchannel plate in the ESCHER setup, specifies an exponential gain as function of voltage for a part of the range of possible biases [29]. To extend the useful range beyond this limit and thus enable the use of the full bias range up to the maximal 1800 V, the gain versus bias curve was calibrated as follows: 1. First, in mirror mode, _V_ MCP is adjusted such that the maximum intensity in the image corresponds to the full intensity on the CCD, staying just below intensities damaging the MCP. 2. While decreasing _V_ MCP, images are acquired for evenly spaced bias values. The intensities of these images form the dataset for calibration of the low bias part. 3. Returning _V_ MCP to the previous maximum value, _E_ 0 is increased until the intensity of the image is so low that it is barely distinguishable from the dark count. 4. Again _V_ MCP is turned up until the maximum image intensity corresponds to the maximum CCD intensity. 5. Steps 2. to 4. are repeated until a dataset is acquired starting at maximum MCP bias _V_ MCP. The resulting curves are shown in Fig. 3(a). 6. These datasets are then corrected for dark count as discussed above, resulting in the curves shown in Fig. 3(b). Comparing to the uncorrected curves, the increase in accuracy for low intensity values, crucial for accurate calibration, is very apparent. 7. A joint fit of Eq. (3), allowing for a different amplitude _Ai_ for each curve, is performed to the corrected data to obtain a general expression for MCP gain _G_ as a function of _V_ MCP. The fit is performed using least squares on the logarithm of the original data with no additional weights, to ensure a good fit over the large range of orders of magnitude. The fitted curve is then normalized to a convenient value, e.g. _G_ (1 kV) = 1. This normalization can be freely chosen, as _G_ will be applied equally to datasets and flat field images, yielding absolute reflectivity as resulting data. A first choice for a fitting function would be a simple exponential, but this would not account for any deviation from perfect exponential gain, visible as deviations from a straight line in Fig. 3(b). For the ESCHER setup we therefore choose to add correction terms of odd power in the exponent: Only odd powers were used to accurately capture the visible trends in the data. For the ESCHER setup correction terms up to order _V_ MCP <sup>19</sup> <sup>(</sup> <sup>_k_</sup> <sup>_<_</sup> <sup>9) turned out to give a satis-</sup> factory good approximation, as illustrated by the residuals in Fig. 3(d). _3.2._ _Active_ _per-image_ _optimization_ _of_ _MCP_ _bias_ The resulting curve with calibration coefficients is then used to actively tune the MCP bias during spectroscopic measurements: A desired range is defined for the maximum intensity on the camera, corresponding to a maximum safe electron intensity on the MCP to prevent damage on the one hand, and a minimum desired intensity of the image on the CCD on the other hand. Whenever the maximum intensity of an image falls outside this range, the MCP gain _G_ ( _V_ ) will be adjusted such that the intensity of the next image again falls in the center of this range. (3) _G_ ( _V_ MCP) = _Ai_ exp - 5 _k_ =0 _ckV_ MCP 2 _k_ +1 4 Assuming the intensity changes continuously, this method ensures the use of the full intensity range of the camera for each image, while protecting the MCP against damage. 1.75 1.50 1.25 10 <sup>0</sup> 10 <sup>−1</sup> 10 <sup>−2</sup> 10 <sup>−3</sup> 10 <sup>−4</sup> HDR corrected Constant _Vmcp_, corrected 0 25 50 75 100 125 150 175 200 _E_ 0 ( _eV_ ) _Figure_ _4:_ _Regular_ _spectroscopic_ _reflectivity_ _curve_ _(orange)_ _of_ _bilayer_ _graphene_ _on_ _SiC,_ _corrected_ _for_ _dark_ _count_ _and_ _flat_ _field,_ _but_ _with_ _a_ _single_ _setting_ _of_ _VMCP_ _(top_ _panel)._ _The_ _HDR_ _measurement_ _of_ _the_ _same_ _area_ _with_ _active_ _MCP_ _bias_ _tuning_ _(blue)_ _can_ _resolve_ _details_ _down_ _to_ _lower_ _intensity._ Additionally, after the measurements, the calibration curve is used to calculate the real, relative intensity from the image intensity and the recorded _V_ MCP. By dividing this intensity by the intensity of the flat field image (taken in mirror mode and corrected for dark current and the MCP bias), we calculate a (floating point) conversion factor to true _reflectivity_ values for each image. These ratios are added to the metadata of every image. By applying this conversion as a final step after any analysis of the data, errors due to discretization of highly amplified, and therefore low true intensity, images are minimized. Note that this procedure makes the conversion to true reflectivity possible even for datasets with no mirror mode in the dataset itself, such as dark field measurements. _3.3._ _Comparison_ _of_ _results_ Spectroscopic LEEM-I(V) curves on bilayer graphene on silicon carbide are measured both with constant MCP bias and with adaptive MCP bias as described above. A comparison between the resulting curves is shown in Fig. 4. While the regular, constant MCP, curve starts to lose detail around _E_ 0 = 50 eV, i.e. after a factor of 100 decrease in signal, the adaptive measurement captures intensity variations in the spectrum almost 4 orders of magnitude lower than the initial intensity. We thus call the adaptive method high dynamic range (HDR) imaging. 4. Drift Correction by image registration In LEEM imaging, the position of the image on the detector tends to shift during measurement as shown in Fig. 1(a). This prevents per-location interpretation of the data, both for spectroscopic measurements and measurements with varying temperature. Although the shift can be minimized by precise alignment of the system, we find that a significant shift always remains, especially in tilted illumination experiments such as DF-LEEM or angle-resolved reflected-electron spectroscopy (ARRES) [4, 27, 2], which makes the compensation of this image drift necessary. This problem has been studied in depth in the field of image registration, motivated by wide-ranging applications such as stabilization of conventional video, combination of satellite imagery and medical imaging [30, 31, 32]. Techniques generally rely on defining a measure of similarity between a template and other images, either by some form of cross correlation, or by identifying specific matching features in both. The image is then deformed by a fixed set of transformations (either affine, i.e. purely shifts and rotations or non-rigid, i.e. additional deformation), until the match between the features in the images and the features in the template is maximal. For LEEM data, the measurement drift is almost completely described by inplane shifts, significantly reducing the space of expected transformations. A common approach in this case is to use the (two-dimensional) cross-correlation as a measure of similarity between two shifted images and to find the maximum for all images compared to a template, as the location of maximum of the cross-correlation corresponds directly to the shift between the image and the used template. The cross correlation of two _n×n_ pixels images _I_ 1( _x, y_ ) and _I_ 2( _x, y_ ) is defined as follows: (6) Where _F_ ( _I_ 2) denotes the complex conjugate of the Fourier transform of image 2. This makes the cross-correlation extra suitable as a measure of similarity, since it can be computed efficiently using the two-dimensional Fast Fourier Transform (FFT). Determining the local maximum of the cross-correlation yields the integer shift for which the two input images are most similar, with the height of the maximum an indication of the quality of the match. To further _n−_ 1 _y_ <sup>_′_</sup> =0 _C_ ( _I_ 1 _, I_ 2)( _x, y_ ) = <sup><u>1</u></sup> _n_ <sup>2</sup> _n−_ 1 _x_ <sup>_′_</sup> =0 _I_ 1( _x_ <sup>_′_</sup> _, y_ <sup>_′_</sup> ) _I_ 2( _x_ + _x_ <sup>_′_</sup> _, y_ + _y_ <sup>_′_</sup> ) (4) where the coordinates can be wrapped around, i.e. all spatial coordinates are modulo _n_ . Furthermore, we can relate this to the convolution operation (denoted as _◦_ ): _n−_ 1 _y_ <sup>_′_</sup> =0 _C_ ( _I_ 1 _, I_ 2)( _x, y_ ) = <sup><u>1</u></sup> _n_ <sup>2</sup> _n−_ 1 _x_ <sup>_′_</sup> =0 _I_ 1( _x_ <sup>_′_</sup> _, y_ <sup>_′_</sup> ) _I_ 2( _x −_ ( _−x_ <sup>_′_</sup> ) _, y −_ ( _−y_ <sup>_′_</sup> )) =: - _I_ 1( _x_ <sup>_′_</sup> _, y_ <sup>_′_</sup> ) _◦_ _I_ 2( _−x_ <sup>_′_</sup> _, −y_ <sup>_′_</sup> )�( _x, y_ ) (5) Using this, the cross correlation can be expressed in terms of (two-dimensional) Fourier transforms _F_ : _C_ ( _I_ 1 _, I_ 2) = _I_ 1( _x_ <sup>_′_</sup> _, y_ <sup>_′_</sup> ) _◦_ _I_ 2( _−x_ <sup>_′_</sup> _, −y_ <sup>_′_</sup> ) = _F_ <sup>_−_</sup> <sup>1 �</sup> _F_ ( _I_ 1) _· F_ ( _I_ 2) 5 increase accuracy, several variants, such as gradient crosscorrelation and phase-shift cross-correlation, have been shown to achieve sub-pixel accuracy for pairs of images [30, 33, 34, 35]. artificial test dataset and show that the accompanying Python implementation [37] is fast enough to process stacks of hundreds of images in mere minutes by performing benchmarks on a real dataset, followed by a discussion of the algorithm and results. The algorithm consists of the following steps: 1. Select an area of each of the (detector-corrected) _N_ images, suitably sized for FFTs (i.e. preferably 2 <sup>_n_</sup> _×_ 2 <sup>_n_</sup> pixels). 2. Apply Gaussian smoothing with standard deviation of _σ_ pixels to reduce Poissonian noise in the images. 3. Apply a (magnitude) Sobel filter to highlight edges only, as shown in Fig. 5(c) and (d). As such, images with inverted contrast (c.f. Fig. 5(a) and (b)) become similar to each other. 4. Using Eq. (6), compute the cross-correlation, as shown in Fig. 5(e). Do this for all pairs ( _i, j_ ) of images. 5. Compute the location ( _DX, DY_ ) _ij_ and value _Wij_ of the maximum of the cross-correlation for all image pairs ( _i, j_ ). _DXij_ and _DYij_ form the anti-symmetric matrices of found relative shifts in either direction, while _Wij_ is a symmetric matrix of weights of the found matches, as shown in Fig. 6. 6. Normalize the maximum values _Wij_ to be used as weights in step 8: _W ij_ = _~~√~~_ _WWiiij·Wjj_ <sup>.</sup> 7. Pick a threshold _W_ min to remove any false positive matches between images. A threshold of _W_ min = 0 _._ 15, based on _DX_, _<u>DY</u>_ and _Wij_, is <u>shown</u> in Fig. 6 as gray shading. Set _W ij_ = 0 for all _W ij_ _< W_ min. 8. To reduce the _N_ <sup>2</sup> relative shifts _DX_ to a length _N_ vector of horizontal shifts _dx_, minimize the errors ~~4~~ ( _dxi −_ _dxj_ _−_ _DXij_ ) _W_ _ij_ <sup>(using</sup> <sup>least</sup> <sup>squares).</sup> Do the same with _DY_ to obtain the vertical shift vector _dy_ . 9. Apply these found shifts _dx_ and _dy_ to the original detector corrected images, interpolating (either bilinearly or via Fourier) for non-integer shifts. <u>j=100</u> 0 (a) <u>i=58</u> <u>j=100</u> (b) 0 0 0 <u>i=58</u> 100 200 300 400 500 <u>0</u> <u>200</u> <u>400</u> <u>0</u> <u>200</u> <u>400</u> 100 200 300 400 500 (c) (d) 0 0 0 0 100 200 300 400 500 <u>0</u> <u>200</u> <u>400</u> <u>0</u> <u>200</u> <u>400</u> 100 200 300 400 500 (e) 200 100 0 −100 −200 2.5 2.0 1.5 1.0 0.5 0.0 <u>−200</u> <u>−100</u> <u>0</u> <u>100</u> <u>200</u> _Figure_ _5:_ _(a,b)_ _Two_ _bright-field_ _LEEM_ _images_ _of_ _few-layer_ _graphene_ _obtained_ _at_ _different_ _E_ 0 _._ _(c,d)_ _Their_ _Gaussian_ _and_ _Sobel-filtered_ _versions_ _with_ _a_ _Gaussian_ _standard_ _deviation_ _of_ 3 _pixels_ _highlights_ _the_ _edges_ _and_ _erases_ _the_ _contrast_ _inversion._ _(e)_ _The_ _cross-correlation_ _of_ _the_ _filtered_ _images_ _exhibits_ _a_ _clear_ _maximum._ _Its_ _position_ _compared_ _to_ _zero_ _(white_ _lines)_ _corre-_ _sponds_ _to_ _the_ _relative_ _shift_ _of_ _the_ _images._ For LEEM data however, the straightforward crosscorrelation approach is often hindered by the physics underlying the electron spectra, resulting in contrast changes (c.f. Fig. 5(a,b)) and even inversions for different values of _E_ 0. The problem can be slightly alleviated by using multiple templates, but in general this approach is unsatisfactory. Instead we present another approach here: We first apply digital filters and then compare each image to all other images, similar to the algorithm by Schaffer et al. for energy filtered transmission electron microscopy [36]. It then uses a statistical average of the found integer shifts between all pairs of images to achieve sub-pixel accuracy. We analyze the accuracy of this algorithm using an _Figure_ _<u>6:</u>_ _Calculated_ _shift_ _matrices_ _DX_ _and_ _DY_ _and_ _weight_ _matrix_ _W ij_ _for_ _the_ _bright-field_ _dataset._ _Matches_ _of_ _a_ _weight_ _below_ _W_ min = 0 _._ 15 _(shaded_ _in_ _gray)_ _are_ _mostly_ _false_ _positives._ _Consequently,_ _they_ _are_ _set_ _to_ _zero_ _weight_ _in_ _the_ _algorithm._ _4.1._ _Accuracy_ _testing_ To validate and benchmark the accuracy of the drift correction algorithm beyond visual inspection of resulting drift corrected datasets, an artificial test dataset with _<u>DXij</u>_ _i_ _<u>DYij</u>_ _i_ 200 100 0 −100 −200 _<u>Wij</u>_ _i_ 0.8 0.6 0.4 0.2 0.0 6 (a) (b) (c) 15 x 500 4 500 15 x y 0.100 0.075 0.050 0.025 0.000 10 5 0 −5 400 300 200 100 0 <u>0</u> <u>200</u> <u>400</u> 2 0 −2 −4 <u>0</u> <u>25</u> <u>50</u> <u>75</u> <u>100</u> index 500 400 300 200 100 0 <u>0</u> <u>200</u> <u>400</u> x _Figure_ _7:_ _(a)_ _Image_ _shifts_ _in_ _x_ _and_ _y_ _used_ _for_ _the_ _synthetic_ _dataset._ _(b)_ _Image_ _0_ _of_ _the_ _synthetic_ _dataset_ _with_ _Gaussian_ _noise_ _with_ _standard_ _deviation_ _of_ _A_ = 1 _._ 0 _._ _(c)_ _Gaussian-_ _and_ _Sobel-filtered_ _version_ _of_ _(b),_ _with_ _a_ _Gaussian_ _filter_ _width_ _of_ _5_ _pixels,_ _highlighting_ _edges._ (a) <u>Max error</u> (b) <u>Max error</u> <u>Mean error</u> (c) 1.0 (c) 10 8 6 4 2 0 10 8 6 4 2 1.0 0.8 0.6 0.4 0.2 1.0 0.8 0.6 0.4 0.2 0.8 0.6 0.4 0.2 1.0 0.8 0.6 0.4 0.2 (f) 0.0 <u>0.5</u> <u>1.0</u> <u>1.5</u> A Optimal error spread 0.4 (d) 100 1.0 (e) 0.3 0.2 0.1 0.0 0.4 0.3 0.2 0.1 0.0 10 8 6 4 2 0 10 8 6 4 2 00.0 <u>0.5</u> <u>1.0</u> <u>1.5</u> A 00.0 <u>0.5</u> <u>1.0</u> <u>1.5</u> A _Figure_ _8:_ _(a,b)_ _Maximum_ _and_ _mean_ _error_ _in_ _dx_ _shift_ _as_ _cal-_ _culated by the algorithm for different values of noise amplitude_ _A and smoothing parameter σ._ _The optimal value of the Gaus-_ _sian_ _smoothing_ _σ_ _as_ _a_ _function_ _of_ _added_ _noise_ _amplitude_ _A_ _is_ _drawn_ _in_ _white._ _Black_ _contour_ _lines_ _are_ _added_ _as_ _a_ _guide_ _to_ _the_ _eye._ _(c)_ _Spread_ _of_ _the_ _error_ _for_ _the_ _optimal_ _values_ _of_ _σ_ _for_ _varying_ _A._ _Dark_ _and_ _light_ _bands_ _are_ _respectively_ 1 _and_ 2 _standard_ _deviations,_ _maximum_ _error_ _is_ _indicated_ _as_ _gray_ _line._ _(d,e,f)_ _Same_ _for_ _the_ _y_ _direction._ known shifts was created. This enables exact comparison of results to a ‘true’ drift. The test dataset, as shown in Fig. 7, consists of _N_ = 100 copies of an annulus of intensity 1 _._ 0 on a background of 0 _._ 0. The dataset is shifted over a parabolic shift in the _x_ -direction and random shifts uniformly chosen from the interval [ _−_ 0 _._ 5 _,_ 0 _._ 5] pixels in the _y_ direction (see Fig. 7(a)). Finally pixel-wise Gaussian (pseudo-) random noise is added to all images. The standard deviation _A_ of the added random noise is then varied to simulate images with different signal-to-noise ratios (SNR). The resulting maximum error in the found shift compared to the original, ‘true’ shift, as well as the resulting mean error for different values of _A_ and _σ_ is shown in Fig. 8, separately for the _x_ and _y_ directions. These results verify that, at least for synthetic datasets, the algorithm achieves sub-pixel accuracy, with the mean absolute error in pixels of about 0.1 times the relative noise amplitude _A_ for the optimal value of smoothing _σ_, and the maximum absolute error just reaching 0.5 pixel for the extreme value of _A_ = 2. As expected, the error is strictly increasing for decreasing SNR, i.e. increasing _A_ . After an initial cutoff, visible in saturated yellow in Fig. 8, the accuracy of the algorithm is also generally decreasing for increasing smoothing width _σ_ . However, after this initial cutoff, there is a comfortably large range of _σ_ where the algorithm performs well. We found that most features visible in the high- _σ_, high_A_ regime of Fig. 8 (b,d) are dependent on the initialization of the random generator for the added pixel-wise noise and are thus not significant (c.f. a second run in Supplementary Fig. A.13). _4.2._ _Time_ _complexity_ To benchmark the computational complexity of the algorithm, it was applied to subsequently larger parts of the real dataset, while measuring the computation times for the least squares optimization (step 8 above) and the shifting and writing of images (step 9) separately. The results show calculating the cross-correlations takes the most time, as it scales almost perfectly quadratically in the number of images _N_, as shown in Fig. 9. The shifting and writing of images scales linearly and is not significant for larger datasets. The total time therefore scales nearly perfectly quadratically, with a dataset of 500 images drift corrected in less than 7 minutes of computation time (exact details of the hardware and software used for benchmarking can be found in the Supplemental Information). As such, LEEM spectroscopy datasets can be comfortably and regularly drift corrected on a desktop PC. Phase: <u>Least Squares</u> <u>10</u> <sup><u>1</u></sup> 10 <sup><u>2</u></sup> N Phase: <u>Shift & write</u> <u>10</u> <sup><u>1</u></sup> 10 <sup><u>2</u></sup> N <u>Total</u> <u>10</u> <sup><u>1</u></sup> 10 <sup><u>2</u></sup> N 10 <sup>3</sup> 10 <sup>2</sup> 10 <sup>1</sup> 10 <sup>0</sup> 10 <sup>−1</sup> Phase: <u>Filter & CC</u> <u>10</u> <sup><u>1</u></sup> 10 <sup><u>2</u></sup> N sigma 3 7 9 11 13 17 _Figure_ _9:_ _Run_ _times_ _of_ _different_ _phases_ _of_ _the_ _drift_ _correc-_ _tion_ _algorithm_ _on_ 256 _×_ 256 _pixel_ _images._ _Linear_ _(green)_ _and_ _quadratic_ _(red)_ _slopes_ _are_ _added_ _as_ _a_ _guide_ _to_ _the_ _eye,_ _illus-_ _trating_ _that_ _the_ _cross_ _correlations_ _scales_ _quadratically_ _in_ _the_ _number_ _of_ _images_ _N_ _,_ _while_ _the_ _shifting_ _and_ _saving_ _of_ _images_ _itself_ _is_ _linear._ _4.3._ _Discussion_ We elaborate here on the choices made in the algorithm. The use of the magnitude Sobel filter has multiple benefits, similar to using the gradient cross-correlation: Contrast inversions between areas with different spectroscopic properties nonetheless result in similar images (c.f. Fig. 5(c,d)). In addition, the constant zero background reduces errors due to wrap-around effects due to performing the calculation in the Fourier domain. The exponent 4 for the weighing matrix _Wij_ in the least squares minimization step 8 was empirically found to give the best results for real datasets. 7 As already noted by Schaffer et al., the use of crosscorrelation between multiple image pairs and combining the returned integer shift values enables sub-pixel accuracy. The maximum theoretical accuracy is _N_ <u>1</u> <sup>pixels,</sup> <sup>but</sup> is reduced for pixels where false positive matches are thresholded out. Alternative methods of obtaining sub-pixel accuracy in determining shifts include a combination of upscaling and matrix-multiplication discrete cosine transforms [34] and a rather elegant interpolation of the phase cross-correlation method proposed by Foroosh et al. [30]. However our current method is less complex and combines robustness against global drift with handling of changing contrasts, which is crucial for spectroscopic LEEM data. Although the sub-pixel precise phase correlation method seems a straightforward extension of regular cross correlation, it is less suitable for datasets with changing noise levels and not suitable for false positive detection by normalization, both properties we found essential to handle spectroscopic LEEM data. Contrary to Schaffer et al., we found smaller values of Gaussian smoothing width _σ_ yield the best results, with larger values yielding artificial shifts around contrast inversions for real datasets and generally performing worse for the synthetic dataset, as visible in Fig. 8. Schaffer et al. found their approach at the time (2004) not computationally feasible for large amounts of images but, as shown in the previous section, the current implementation is able to drift correct a stack of several hundreds of images comfortably on a single desktop computer. We want to emphasize that the use of `Python` gives flexibility and makes it easy to adapt the code. For instance, increasing performance even more lies within reach by performing the FFT cross-correlations and maximum search on one or more graphical processing units using one of several libraries or by using a cluster running a `dask` scheduler. Further speedup would be possible by pruning which pairs of images are to be cross-correlated. An avenue not explored here, is the use of pyramid methods to create a multi-step routine where firstly a fast estimate of the shift is computed on a smoothened and reduced-size image before using consecutively larger images to refine the estimate [38, 39]. Beyond drift correction, the same method presented here can also be applied to create precisely stitched overview images of areas much larger than the electron beam spot size. Although, as no contrast inversions or large feature differences are expected for the matching areas, the added value of using a gradient filter is nullified. Additionally the number of images that can be matched to the same template is limited, forcing a low upper bound on the subpixel accuracy of the optimization part of the algorithm. Instead, we found that an algorithm based on more regular phase-shift cross-correlation is sufficient for sub-pixel accurate stitching. 5. Dimension reduction The sub-pixel accuracy drift correction now makes it possible to reinterpret a LEEM-I(V) dataset as a truly per-pixel set of spectroscopic curves, opening up possibilities for further data analysis. For a dataset of _N_ images, each such curve (c.f. Fig. 1) can be seen as a vector in a _N_ -dimensional vector space of the mathematically possible spectra. Even for moderate datasets of a few hundred images this is a huge vector space. In almost all cases however, the physical behavior of the data can be described with a model with far fewer degrees of freedom, i.e. the vector space of physically possible spectra has a much lower number of dimensions. Therefore, it should be possible to summarize all significant behavior in a much smaller dataset, which can be analyzed (and visualized) much more easily. Here, we use Principal Component Analysis (PCA), a linear technique based on singular value decomposition (SVD), often used for dimension reduction in data science fields [40, 41, 42]. The randomized iterative variant of PCA allows for efficient computation of the largest variance components without performing the full SVD decomposition [43]. This technique therefore projects the spectroscopic data to a lower dimensional subspace, in such a way that maximal data variance is retained. It does so in a computationally efficient way, making it well suited for, and popular in, data science. Before applying PCA, we crop the dataset to remove any areas that lie outside of the detector for any image inside the used range of _E_ 0. Additionally, each image is scaled to zero mean and unit variance, to not let brighter images contribute stronger to the analysis as they have larger variance. A lot of other choices for standardization of the data are possible, most of them with useful results, but for the scope of this paper we adhere to this standard choice. After performing PCA, the lower dimensional subspace or PCA-space, is now spanned by orthogonal ‘eigen-spectra’, referred to as PCA components. Since the projection map onto this subspace retains most of the variance in the dataset, it is possible to build an approximate reconstruction of the full physical spectra from the reduced PCA spectra. For spectroscopic LEEM datasets, we find that reducing down to 6 dimensions is often enough to capture more than 90% of all variance. This is shown in a so-called scree plot in Fig. 10(a) for the sample dataset of dark-field images of _N_ = 300 energies. The dataset can be projected onto a single PCA component by taking the per-pixel inner product with the corresponding ‘eigen-spectrum‘. This yields images visualizing the variance retained by the respective components, as shown in the top half of Fig. 10(b) for all 6 PCA components. Below each image, the spectra corresponding to the pixels with the minimum and maximum value of this projection are shown in black and color, respectively. 8 (a) 1.0 (b) 0.8 <u>PCA component 2</u> <u>0</u> <u>500</u> <u>20</u> <u>40</u> _E_ 0 (eV) <u>PCA component 3</u> <u>0</u> <u>500</u> <u>20</u> <u>40</u> _E_ 0 (eV) <u>PCA component 4</u> <u>0</u> <u>500</u> <u>20</u> <u>40</u> _E_ 0 (eV) <u>PCA component 5</u> <u>0</u> <u>500</u> <u>20</u> <u>40</u> _E_ 0 (eV) <u>PCA component 6</u> <u>0</u> <u>500</u> <u>20</u> <u>40</u> _E_ 0 (eV) 0.6 0.4 0.2 0.0 relative cumulative <u>0</u> <u>1</u> <u>2</u> <u>3</u> <u>4</u> <u>5</u> <u>6</u> Number of PCA components 10 <sup>−1</sup> 10 <sup>−2</sup> 10 <sup>−3</sup> 0 200 400 600 800 <u>PCA component 1</u> <u>0</u> <u>500</u> <u>20</u> <u>40</u> _E_ 0 (eV) _Figure_ _10:_ _(a)_ _Scree_ _plot_ _indicating_ _the_ _retained_ _variance_ _per_ _PCA_ _component_ _for_ _the_ _Dark_ _Field_ _dataset._ _(b)_ _Images_ _of_ _the_ _first_ _six_ _PCA_ _components_ _for_ _the_ _Dark_ _Field_ _sample_ _dataset_ _and_ _the_ _spectra_ _corresponding_ _to_ _the_ _maximum_ _and_ _minimum_ _of_ _the_ _respective_ _components_ _occurring_ _in_ _the_ _dataset._ (a) <u>BF PCA component 1 to 3</u> (b) 0 acy in the possibilities of the sign of the PCA components (a PCA eigen-spectrum with the opposite signs retains as much variance), we change the signs such that the a positive projection onto the PCA component corresponds to being brighter in the majority of the images. This way, areas that are bright in the majority of the original images also appear bright in the visualization. To compensate for the human eyes’ preference for green, a scaling of colors as proposed by Kovesi is applied [44]. It is given by the following matrix: 0 <u>BF PCA component 1 to 3</u> 100 200 300 400 500 600 700 800 100 200 300 400 500 600 700 800 <u>0</u> <u>200</u> <u>400</u> <u>600</u> <u>800</u> (c) <u>DF PCA component 1 to 3</u> (d) 0 0 <u>DF PCA component 1 to 3</u> <u>BF PCA component 4 to 6</u> <u>0</u> <u>200</u> <u>400</u> <u>600</u> <u>800</u> <u>DF PCA component 4 to 6</u> <u>0</u> <u>200</u> <u>400</u> <u>600</u> <u>800</u>   _R_ <sup>_′_</sup> _G_ <sup>_′_</sup> _B_ <sup>_′_</sup>   =     _R_ _G_ _B_ 0 _._ 90 0 _._ 17 0 _._ 00 0 _._ 00 0 _._ 50 0 _._ 00 0 _._ 10 0 _._ 33 1 _._ 00     100 200 300 400 500 600 700 800 100 200 300 400 500 600 700 800 <u>0</u> <u>200</u> <u>400</u> <u>600</u> <u>800</u> _Figure_ _11:_ _The first six PCA components can be used to sum-_ _marize_ _a_ _spectroscopic_ _LEEM_ _measurement_ _in_ _two_ _RGB_ _pic-_ _tures._ _(a,b)_ _Visualization of a spectroscopic bright-field LEEM_ _measurement_ _of_ _quasi-freestanding_ _few-layer_ _graphene_ _on_ _SiC._ _Different_ _layer_ _counts,_ _stacking_ _boundaries_ _of_ _two_ _types_ _and_ _point defects are distinguishable._ _(c,d)_ _Visualization of a spec-_ _troscopic_ _dark-field_ _LEEM_ _measurement_ _of_ _the_ _same_ _area._ _All_ _six different possible stacking orders for up to trilayer graphene_ _are_ _easily_ _distinguishable._ _5.1._ _Visualization_ Reducing a spectrum from hundreds of dimensions to a few opens up new opportunities for data visualization. In particular, it allows for the visualization of nearly all of the variation in spectra of an entire dataset in only two images, as shown in Fig. 11. Here, the values of the six principal components (c.f. Fig. 10), are displayed as the RGB color channels of two pictures per dataset. To lift the degener The results are striking. All the sample features are directly visible in Fig. 11: In the bright field dataset, bilayer and thicker graphene are clearly separated in orange and green, respectively in the first three PCA components [Fig. 11(a)]. Moreover, SiC step edges, domain walls and point-like defects are clearly visible. The next three PCA components [Fig. 11(b)] highlights the difference between bilayer (green), trilayer (orange) and four-layer graphene (dark green) and in addition separates step edges (orange), domain boundaries (turquoise) and the defects in different colors. Furthermore, two types of domain boundaries can be observed in the four-layer area that are hard to tell apart in conventional LEEM images. The light green and dark ones are presumably domain boundaries in the topmost and lower layers, respectively. This visualization using the first three PCA components of the dark field dataset [Fig. 11(c)] clearly separates the different stacking orders in bilayer (AB in orange and AC in blue) and trilayer graphene. The PCA components 4 to 6 [Fig. 11(d)] highlights the different stacking orders in trilayer and four-layer areas (different shades of orange and blue) and display an interference effect causing double lines at one type of (corresponding to one direction of) domain edge. This clear visualization is particularly remarkable as the dark-field dataset presents a worst case 9 (a) (c) 5 0 −5 0 200 400 600 800 <u>0</u> <u>200</u> <u>400</u> <u>600</u> <u>800</u> _x_ (pixels) <u>0</u> <u>20</u> <u>40</u> <u>60</u> Energy (eV) (e) (f) 10 <sup>−1</sup> 10 <sup>−2</sup> 10 <sup>−3</sup> −4 −2 0 2 −3 −2 −1 0 1 (b) (d) 0 200 400 600 800 10 <sup>0</sup> <u>0</u> <u>200</u> <u>400</u> <u>600</u> <u>800</u> _x_ (pixels) <u>10</u> <u>20</u> <u>30</u> <u>40</u> <u>50</u> Energy (eV) 5 0 −5 −4 −2 10 <sup>−1</sup> 10 <sup>−2</sup> 10 <sup>−3</sup> 0 2 −3 −2 −1 0 1 _Figure_ _12:_ _(a)_ _Bright-field_ _dataset_ _visualized_ _as_ _point_ _cloud_ _in_ _the_ _space_ _of_ _the_ _first_ _three_ _PCA_ _components._ _The_ _points_ _are_ _colored_ _according_ _to_ _the_ _mapping_ _in_ _Fig._ _11(a)_ _and_ _are_ _projected_ _onto_ _the_ _planes_ _in_ _gray_ _scale._ _(b)_ _Point_ _cloud_ _as_ _in_ _subfigure_ _(a),_ _but_ _colored_ _according_ _to_ _the_ _computed_ _clustering._ _(c)_ _Indication_ _of_ _the_ _cluster_ _labels_ _in_ _the_ _real-space_ _image._ _(d)_ _Mean_ _bright-field_ _spectroscopy_ _curves_ _for_ _each_ _cluster,_ _automatically_ _recovering_ _layer_ _count_ _and_ _domain_ _walls._ _(e,f)_ _Same_ _as_ _subfigures_ _(c,d) for the dark-field dataset reveals all stacking orders present as well as two sets of edge-case curves._ _C.f. Fig. 2(c,d) of Ref. [2]._ scenario due to its extreme off-axis alignment (see [2] for full details), which causes strong image drift and relative shifts of features. _5.2._ _Clustering_ _and_ _automatic_ _classification_ In addition to the visualization possibilities explored in the previous section, the dimension reduction by PCA lowers the complexity of the data enough to enable the use of other, more quantitative data analysis techniques. In particular, reduction to less than ten dimensions is enough to perform unsupervised classification or clustering on the entire dataset. Here, we show that a relatively simple clustering algorithm, the classical _k_ -means, also known as Lloyd’s algorithm [45], applied to the PCA reduced dataset, can already be used to distinguish the relevant, different areas. The structure of the bright field dataset is visualized in terms of the first three PCA components in Fig. 12(a), both as a point cloud with colors corresponding to Fig. 11(a) and as density projections (gray scale) on the three planes. The resulting classification from the application of _k_ -means to the six PCA components is visualized in the same way in Fig. 12(b), where the color of the points now corresponds to the assigned labels. These same label colors are shown in real space in Fig. 12(c). In the real space visualization it is clear that the different layer counts are separated (bilayer, trilayer and four-layer as purple, orange and red, respectively) from a class with the point defects and step edges (blue) and a class containing the domain boundaries in the bilayer (green). The cluster labels can now be used to calculate spectra of each area, e.g. all trilayer pixels without the defects. For this, we take the mean over all pixels belonging to one cluster for each energy. This can be done even for energies outside the range used for the initial clustering as well as for energies where we only have partial data due to drift. The resulting spectra for the clustering in Fig. 12(c) are plotted in Fig. 12(d). The same clustering method is applied only to the first 4 PCA components of the dark-field dataset since component 5 and 6 show virtually no distinguishing features and corresponds to very little variance [cf. Fig. A.14(a,b)]. The resulting real space labeling of the clusters and the spec 10 tra are shown in Fig. 12(e) and (f), respectively. Here, although not perfect, the clustering algorithm manages to mostly separate the different possible stacking orders (red and orange for the bilayer and purple, brown, pink and blue for the trilayer). The green and gray areas correspond to areas where clear classification as a stacking order is not possible due to phase contrast and non-uniform illumination artifacts due to the tilted illumination. Thanks to the proper calibration and mutual registration of the data, this relatively simple algorithm classifies the areas in the dark-field data set with only minor errors (e.g. the incorrect assignment of brown trilayer spectrum in the lower left), _without_ any input of the positions of each spectrum in the image or any input about the expected differences between spectra. We anticipate that this classification using unsupervised machine learning will be useful for identifying unknown spectra in new datasets. 6. Conclusion We have shown that treating (energy-dependent) LEEM measurements as multi-dimensional datasets rather than as collection of images, opens rich opportunities for detailed and quantitative insights into complex material systems that go well beyond morphological and crystallographic characterization. Three key steps are necessary to convert a stack of raw LEEM images into spectroscopic dataset with a greatly increased body of quantitative information. First, we compensate for common detector artifacts such as camera dark count and non-uniform detector gain, which is crucial to quantitatively interpret LEEM images. Second, by calibrating the channel plate gain and adjusting it during spectroscopic measurements, we can not only extend the dynamic range of the dataset by two orders of magnitude, but also convert image intensity into absolute reflectivity or electron intensity (provided the beam current is accurately measured). Third, we describe a drift-correction algorithm that is tailored for spectroscopic LEEM datasets where contrast inversions make many other approaches unfeasible. It relies on digital filtering and cross-correlation of every image to all other images and, without requiring large computation times, yields sub-pixel accuracy. It thus produces spectral LEEM data with high spatial resolution, i.e., true pixel-wise spectra. This suite of techniques is already in regular use to obtain data from the ESCHER system in Leiden [9, 11, 10, 5, 46, 2]. In addition, the resulting spectral datasets enable more sophisticated data classification and visualization methods that rely on the spectrum (I(V)-curve) in every pixel. We demonstrate how we can use dimension reduction on the spectra to automatically compose images from only the six strongest spectroscopic features (PCA components). This approach produces rich color images that capture most of the features of the dataset and can thus give an intuitive view on complex material systems. Furthermore, we show that a relatively simple cluster analysis on those data sets of reduced dimensionality yields a quantitative representation of this information. Different materials within a field of view are automatically identified and statistical information such as the mean spectra and their spread per material can be extracted. Treating LEEM measurements as multidimensional datasets as presented here will further strengthen the role of LEEM as a quantitative spectroscopic tool rather than as a pure imaging instrument, thus deepening its impact in the research and discovery of novel material systems. Furthermore, the presented techniques can be applied to related spectroscopic imaging techniques, such as energy-filtered PEEM [47] or even adapted for use in scanning probe techniques such as scanning tunneling spectroscopy [41, 48]. To facilitate the use of the approaches discussed here, the test data as well as Python code is available online [ ? ? ]. Acknowledgements We thank Marcel Hesselberth and Douwe Scholma for their indispensable technical support and Christian Ott and Heiko Weber for the fabrication of the graphene on SiC samples. Funding: This work was supported by the Netherlands Organisation for Scientific Research (NWO/OCW) via the VENI Grant No. 680-47-447 (J.J.); and as part of the Frontiers of Nanoscience program. References References [1] E. Bauer, M. Mundschau, W. Swiech, W. Telieps, [Surface](https://www.sciencedirect.com/science/article/pii/0304399189900338 https://linkinghub.elsevier.com/retrieve/pii/0304399189900338) studies by low-energy electron microscopy (LEEM) and conventional UV photoemission electron microscopy (PEEM), Ultramicroscopy 31 (1) (1989) 49–57. URL `[https://www.sciencedirect.com/science/article/](https://www.sciencedirect.com/science/article/pii/0304399189900338 https://linkinghub.elsevier.com/retrieve/pii/0304399189900338)` ``` pii/0304399189900338https://linkinghub.elsevier.com/ retrieve/pii/0304399189900338 ``` [2] T. A. de Jong, E. E. Krasovskii, C. Ott, R. M. Tromp, S. J. van der Molen, J. Jobst, Intrinsic [stacking](https://link.aps.org/doi/10.1103/PhysRevMaterials.2.104005) domains in graphene on silicon carbide: A pathway for intercalation, Physical Review Materials 2 (10) (2018) 104005. `[doi:10.1103/](https://doi.org/10.1103/PhysRevMaterials.2.104005)` `[PhysRevMaterials.2.104005](https://doi.org/10.1103/PhysRevMaterials.2.104005)` . URL `[https://link.aps.org/doi/10.1103/PhysRevMaterials.](https://link.aps.org/doi/10.1103/PhysRevMaterials.2.104005)` ``` 2.104005 ``` [3] J. I. Flege, E. E. Krasovskii, Intensity-voltage low-energy elec [tron microscopy for functional materials characterization, Phys-](http://doi.wiley.com/10.1002/pssr.201409102) ica Status Solidi - Rapid Research Letters 8 (6) (2014) 463–477. `[doi:10.1002/pssr.201409102](https://doi.org/10.1002/pssr.201409102)` . URL `[http://doi.wiley.com/10.1002/pssr.201409102](http://doi.wiley.com/10.1002/pssr.201409102)` [4] J. Jobst, J. Kautz, D. Geelen, R. M. Tromp, S. J. van der Molen, Nanoscale measurements of [unoccupied](http://www.nature.com/articles/ncomms9926) band dispersion in few[layer graphene, Nature Communications 6 (1) (2015) 8926.](http://www.nature.com/articles/ncomms9926) `[doi:](https://doi.org/10.1038/ncomms9926)` `[10.1038/ncomms9926](https://doi.org/10.1038/ncomms9926)` . URL `[http://www.nature.com/articles/ncomms9926](http://www.nature.com/articles/ncomms9926)` [5] J. Jobst, A. J. H. van der Torren, E. E. Krasovskii, J. Balgley, C. R. Dean, R. M. Tromp, S. J. van der Molen, [Quantifying](http://www.nature.com/doifinder/10.1038/ncomms13621 http://www.nature.com/articles/ncomms13621) electronic band interactions in van der Waals materials using angle-resolved [reflected-electron](http://www.nature.com/doifinder/10.1038/ncomms13621 http://www.nature.com/articles/ncomms13621) spectroscopy, Nature Communications 7 (1) (2016) 13621. `[doi:10.1038/ncomms13621](https://doi.org/10.1038/ncomms13621)` . URL `[http://www.nature.com/doifinder/10.1038/](http://www.nature.com/doifinder/10.1038/ncomms13621 http://www.nature.com/articles/ncomms13621)` ``` ncomms13621http://www.nature.com/articles/ncomms13621 ``` 11 [6] A. Schmid, W. Swich, <sup>´</sup> C. Rastomjee, B. Rausenberger, W. En [gel, E. Zeitler, A. Bradshaw, The chemistry of reaction-diffusion](https://linkinghub.elsevier.com/retrieve/pii/003960289500128X) fronts investigated by [microscopic](https://linkinghub.elsevier.com/retrieve/pii/003960289500128X) LEED IV fingerprinting, Surface Science 331-333 (PART A) (1995) 225–230. URL `[https://linkinghub.elsevier.com/retrieve/pii/](https://linkinghub.elsevier.com/retrieve/pii/003960289500128X)` ``` 003960289500128X ``` [7] B. Frank, P. Kahl, D. Podbiel, G. Spektor, M. Orenstein, L. Fu, T. Weiss, M. Horn-von Hoegen, T. J. Davis, F.-J. Meyer zu Heringdorf, H. Giessen, Short-range surface [plasmonics:](http://advances.sciencemag.org/lookup/doi/10.1126/sciadv.1700721) Localized electron emission dynamics [from](http://advances.sciencemag.org/lookup/doi/10.1126/sciadv.1700721) a 60-nm spot on an atomically flat [single-crystalline](http://advances.sciencemag.org/lookup/doi/10.1126/sciadv.1700721) gold surface, Science Advances 3 (7) (2017) e1700721. `[doi:10.1126/sciadv.1700721](https://doi.org/10.1126/sciadv.1700721)` . URL `[http://advances.sciencemag.org/lookup/doi/10.1126/](http://advances.sciencemag.org/lookup/doi/10.1126/sciadv.1700721)` ``` sciadv.1700721 ``` [8] A. Locatelli, K. R. Knox, D. Cvetko, T. O. Mente, M. A. Ni˜no, S. Wang, M. B. Yilmaz, P. Kim, R. M. Osgood, A. Morgante, Corrugation in Exfoliated [Graphene:](http://pubs.acs.org/doi/10.1021/nn101116n) An Electron Microscopy and [Diffraction](http://pubs.acs.org/doi/10.1021/nn101116n) Study, ACS Nano 4 (8) (2010) 4879–4889. `[doi:](https://doi.org/10.1021/nn101116n)` `[10.1021/nn101116n](https://doi.org/10.1021/nn101116n)` . URL `[http://pubs.acs.org/doi/10.1021/nn101116n](http://pubs.acs.org/doi/10.1021/nn101116n)` [9] R. Tromp, J. Hannon, A. Ellis, W. Wan, A. Berghaus, O. Schaff, A new aberration-corrected, [energy-filtered](https://linkinghub.elsevier.com/retrieve/pii/S0304399110000835) LEEM/PEEM instrument. I. [Principles](https://linkinghub.elsevier.com/retrieve/pii/S0304399110000835) and design, Ultramicroscopy 110 (7) (2010) 852–861. `[doi:10.1016/j.ultramic.2010.03.005](https://doi.org/10.1016/j.ultramic.2010.03.005)` . URL `[https://linkinghub.elsevier.com/retrieve/pii/](https://linkinghub.elsevier.com/retrieve/pii/S0304399110000835)` ``` S0304399110000835 ``` [10] S. Schramm, J. Kautz, A. Berghaus, O. Schaff, R. M. Tromp, S. J. van der Molen, Low-energy electron microscopy and spectroscopy with escher: Status and prospects, IBM Journal of Research and Development 55 (4) (2011) 1–1. `[doi:10.1147/](https://doi.org/10.1147/JRD.2011.2150691)` `[JRD.2011.2150691](https://doi.org/10.1147/JRD.2011.2150691)` . [11] R. M. Tromp, J. B. Hannon, W. Wan, A. Berghaus, O. Schaff, A new aberration-corrected, [energy-filtered](https://www.sciencedirect.com/science/article/pii/S0304399112001866) LEEM/PEEM in[strument II. Operation and results,](https://www.sciencedirect.com/science/article/pii/S0304399112001866) Ultramicroscopy 127 (2013) 25–39. `[doi:10.1016/j.ultramic.2012.07.016](https://doi.org/10.1016/j.ultramic.2012.07.016)` . URL `[https://www.sciencedirect.com/science/article/pii/](https://www.sciencedirect.com/science/article/pii/S0304399112001866)` ``` S0304399112001866 ``` [12] J. R¨ohrl, E. Rotenberg, J. Jobst, T. Seyller, D. Waldmann, L. Ley, J. L. McChesney, G. L. Kellogg, A. K. Schmid, K. Horn, S. A. Reshanov, A. Bostwick, T. Ohta, H. B. Weber, K. V. Emt[sev, Towards wafer-size graphene layers by atmospheric pressure](http://dx.doi.org/10.1038/nmat2382) graphitization [of](http://dx.doi.org/10.1038/nmat2382) silicon carbide, Nature Materials 8 (3) (2009) 203–207. `[doi:10.1038/nmat2382](https://doi.org/10.1038/nmat2382)` . URL `[http://dx.doi.org/10.1038/nmat2382](http://dx.doi.org/10.1038/nmat2382)` [13] F. Speck, J. Jobst, F. Fromm, M. Ostler, D. Waldmann, M. Hundhausen, H. B. Weber, T. Seyller, The [quasi-free-](http://link.aip.org/link/APPLAB/v99/i12/p122106/s1{&}Agg=doi http://aip.scitation.org/doi/10.1063/1.3643034) [standing nature of graphene on H-saturated SiC(0001),](http://link.aip.org/link/APPLAB/v99/i12/p122106/s1{&}Agg=doi http://aip.scitation.org/doi/10.1063/1.3643034) Applied Physics Letters 99 (12) (2011) 122106. `[doi:10.1063/1.3643034](https://doi.org/10.1063/1.3643034)` . URL `[http://link.aip.org/link/APPLAB/v99/i12/p122106/](http://link.aip.org/link/APPLAB/v99/i12/p122106/s1{&}Agg=doi http://aip.scitation.org/doi/10.1063/1.3643034)` ``` s1{&}Agg=doihttp://aip.scitation.org/doi/10.1063/1. 3643034 ``` [14] C. Riedl, C. Coletti, T. Iwasaki, A. A. Zakharov, U. Starke, Quasi-Free-Standing Epitaxial Graphene on SiC Obtained by Hydrogen Intercalation, Physical Review Letters 103 (24) (2009) 246804. `[doi:10.1103/PhysRevLett.103.246804](https://doi.org/10.1103/PhysRevLett.103.246804)` . URL `[http://link.aps.org/doi/10.1103/PhysRevLett.103.](http://link.aps.org/doi/10.1103/PhysRevLett.103.246804)` ``` 246804 ``` [15] H. Hibino, H. Kageshima, F. Maeda, M. Nagase, Y. Kobayashi, H. Yamaguchi, Microscopic thickness determination of thin graphite films formed on SiC from quantized oscillation in reflectivity of [low-energy](https://link.aps.org/doi/10.1103/PhysRevB.77.075413) electrons, Physical Review B 77 (7) (2008) 075413. `[doi:10.1103/PhysRevB.77.075413](https://doi.org/10.1103/PhysRevB.77.075413)` . URL `[https://link.aps.org/doi/10.1103/PhysRevB.77.](https://link.aps.org/doi/10.1103/PhysRevB.77.075413)` ``` 075413 ``` [16] R. M. Feenstra, N. Srivastava, Q. Gao, M. Widom, B. Dia conescu, T. Ohta, G. L. Kellogg, J. T. Robinson, I. V. Vlassiouk, [Low-energy electron reflectivity from graphene, Physical Review](https://link.aps.org/doi/10.1103/PhysRevB.87.041406) B 87 (4) (2013) 041406. `[doi:10.1103/PhysRevB.87.041406](https://doi.org/10.1103/PhysRevB.87.041406)` . URL `[https://link.aps.org/doi/10.1103/PhysRevB.87.](https://link.aps.org/doi/10.1103/PhysRevB.87.041406)` ``` 041406 ``` [17] H. Hibino, S. Mizuno, H. Kageshima, M. Nagase, H. Ya maguchi, Stacking domains of [epitaxial](https://link.aps.org/doi/10.1103/PhysRevB.80.085406) few-layer graphene on [SiC(0001),](https://link.aps.org/doi/10.1103/PhysRevB.80.085406) Physical Review B 80 (8) (2009) 085406. `[doi:10.1103/PhysRevB.80.085406](https://doi.org/10.1103/PhysRevB.80.085406)` . URL `[https://link.aps.org/doi/10.1103/PhysRevB.80.](https://link.aps.org/doi/10.1103/PhysRevB.80.085406)` ``` 085406 ``` [18] de Jong, T.A. (Tobias), Jobst, J. (Johannes), [Data](https://data.4tu.nl/repository/uuid:7f672638-66f6-4ec3-a16c-34181cc45202) underlying the paper: [Quantitative](https://data.4tu.nl/repository/uuid:7f672638-66f6-4ec3-a16c-34181cc45202) analysis of spectroscopic low energy [electron](https://data.4tu.nl/repository/uuid:7f672638-66f6-4ec3-a16c-34181cc45202) microscopy data (2019). `[doi:10.4121/uuid:7f672638-66f6-4ec3-a16c-34181cc45202](https://doi.org/10.4121/uuid:7f672638-66f6-4ec3-a16c-34181cc45202)` . URL `[https://data.4tu.nl/repository/uuid:](https://data.4tu.nl/repository/uuid:7f672638-66f6-4ec3-a16c-34181cc45202)` ``` 7f672638-66f6-4ec3-a16c-34181cc45202 ``` [19] T. A. De Jong, E. E. Krasovskii, C. Ott, R. M. Tromp, S. J. Van Der Molen, J. Jobst, Data [underly-](https://data.4tu.nl/repository/uuid:a7ff07f4-0ac8-4778-bec9-636532cfcfc1) ing the paper: Intrinsic [Stacking](https://data.4tu.nl/repository/uuid:a7ff07f4-0ac8-4778-bec9-636532cfcfc1) domains in graphene on silicon carbide: a [pathway](https://data.4tu.nl/repository/uuid:a7ff07f4-0ac8-4778-bec9-636532cfcfc1) for intercalation (2018). `[doi:10.4121/UUID:A7FF07F4-0AC8-4778-BEC9-636532CFCFC1](https://doi.org/10.4121/UUID:A7FF07F4-0AC8-4778-BEC9-636532CFCFC1)` . URL `[https://data.4tu.nl/repository/uuid:](https://data.4tu.nl/repository/uuid:a7ff07f4-0ac8-4778-bec9-636532cfcfc1)` ``` a7ff07f4-0ac8-4778-bec9-636532cfcfc1 ``` [20] R. van Gastel, I. Sikharulidze, S. Schramm, J. Abrahams, B. Poelsema, R. Tromp, S. van der Molen, Medipix 2 detector applied to low [energy](https://www.sciencedirect.com/science/article/pii/S0304399109001983) electron microscopy, Ultramicroscopy 110 (1) (2009) 33–35. `[doi:10.1016/J.ULTRAMIC.2009.09.002](https://doi.org/10.1016/J.ULTRAMIC.2009.09.002)` . URL `[https://www.sciencedirect.com/science/article/pii/](https://www.sciencedirect.com/science/article/pii/S0304399109001983)` ``` S0304399109001983 ``` [21] R. Widenhorn, M. M. Blouke, A. Weber, A. Rest, E. Bodegom, Temperature dependence of dark current in a CCD, Vol. 4669, International Society for Optics and Photonics, 2002, pp. 193–201. `[doi:10.1117/12.463446](https://doi.org/10.1117/12.463446)` . URL `[http://proceedings.spiedigitallibrary.org/](http://proceedings.spiedigitallibrary.org/proceeding.aspx?articleid=876982)` ``` proceeding.aspx?articleid=876982 ``` [22] R. Widenhorn, J. C. Dunlap, E. Bodegom, Exposure Time De pendence of Dark [Current](http://ieeexplore.ieee.org/document/5378633/) in CCD Imagers, IEEE Transactions on Electron Devices 57 (3) (2010) 581–587. `[doi:10.1109/TED.](https://doi.org/10.1109/TED.2009.2038649)` `[2009.2038649](https://doi.org/10.1109/TED.2009.2038649)` . URL `[http://ieeexplore.ieee.org/document/5378633/](http://ieeexplore.ieee.org/document/5378633/)` [23] R. Widenhorn, L. M¨undermann, A. Rest, E. Bodegom, Meyer Neldel rule for dark current in charge-coupled devices, Journal of Applied Physics 89 (12) (2001) 8179–8182. `[doi:10.1063/1.](https://doi.org/10.1063/1.1372365)` `[1372365](https://doi.org/10.1063/1.1372365)` . [24] J. A. Seibert, J. M. Boone, K. K. Lindfors, [Flat-field](http://proceedings.spiedigitallibrary.org/proceeding.aspx?doi=10.1117/12.317034) correction technique for digital detectors, Vol. 3336, International Society for Optics and Photonics, 1998, p. 348. `[doi:10.1117/12.317034](https://doi.org/10.1117/12.317034)` . URL `[http://proceedings.spiedigitallibrary.org/](http://proceedings.spiedigitallibrary.org/proceeding.aspx?doi=10.1117/12.317034)` ``` proceeding.aspx?doi=10.1117/12.317034 ``` [25] R. Yu, S. Kennedy, D. Paganin, D. Jesson, Phase [retrieval](https://linkinghub.elsevier.com/retrieve/pii/S096843280900170X) low energy [electron](https://linkinghub.elsevier.com/retrieve/pii/S096843280900170X) microscopy, Micron 41 (3) (2010) 232–238. `[doi:10.1016/j.micron.2009.10.010](https://doi.org/10.1016/j.micron.2009.10.010)` . URL `[https://linkinghub.elsevier.com/retrieve/pii/](https://linkinghub.elsevier.com/retrieve/pii/S096843280900170X)` ``` S096843280900170X ``` [26] S. M. Kennedy, C. X. Zheng, W. X. Tang, D. M. Paganin, D. E. Jesson, Laplacian image [contrast](http://rspa.royalsocietypublishing.org/cgi/doi/10.1098/rspa.2011.0204 http://rspa.royalsocietypublishing.org/cgi/doi/10.1098/rspa.2010.0093) in mirror electron [microscopy,](http://rspa.royalsocietypublishing.org/cgi/doi/10.1098/rspa.2011.0204 http://rspa.royalsocietypublishing.org/cgi/doi/10.1098/rspa.2010.0093) Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences 466 (2124) (2010) 2857– 2874. `[doi:10.1098/rspa.2010.0093](https://doi.org/10.1098/rspa.2010.0093)` . URL `[http://rspa.royalsocietypublishing.org/cgi/doi/10.](http://rspa.royalsocietypublishing.org/cgi/doi/10.1098/rspa.2011.0204 http://rspa.royalsocietypublishing.org/cgi/doi/10.1098/rspa.2010.0093)` ``` 1098/rspa.2011.0204http://rspa.royalsocietypublishing. org/cgi/doi/10.1098/rspa.2010.0093 ``` [27] J. Jobst, L. M. Boers, C. Yin, J. Aarts, R. M. Tromp, S. J. van der Molen, Quantifying work [function](https://linkinghub.elsevier.com/retrieve/pii/S0304399118304182) differences using low-energy electron [microscopy:](https://linkinghub.elsevier.com/retrieve/pii/S0304399118304182) The case of mixedterminated [strontium](https://linkinghub.elsevier.com/retrieve/pii/S0304399118304182) titanate, Ultramicroscopy 200 (2019) 43–49. `[doi:10.1016/j.ultramic.2019.02.018](https://doi.org/10.1016/j.ultramic.2019.02.018)` . URL `[https://linkinghub.elsevier.com/retrieve/pii/](https://linkinghub.elsevier.com/retrieve/pii/S0304399118304182)` ``` S0304399118304182 ``` [28] S. M. Schramm, S. J. van der Molen, R. M. Tromp, [Intrin-](https://link.aps.org/doi/10.1103/PhysRevLett.109.163901) sic Instability of [Aberration-Corrected](https://link.aps.org/doi/10.1103/PhysRevLett.109.163901) Electron Microscopes, Physical Review Letters 109 (16) (2012) 163901. `[doi:10.1103/](https://doi.org/10.1103/PhysRevLett.109.163901)` `[PhysRevLett.109.163901](https://doi.org/10.1103/PhysRevLett.109.163901)` . URL `[https://link.aps.org/doi/10.1103/PhysRevLett.109.](https://link.aps.org/doi/10.1103/PhysRevLett.109.163901)` ``` 163901 ``` 12 [29] Hamamatsu Photonics K.K.,, accessed on July 9, 2019. [[link].](https://www.hamamatsu.com/resources/pdf/etd/MCP_TMCP0002E.pdf) URL `[https://www.hamamatsu.com/resources/pdf/etd/MCP_](https://www.hamamatsu.com/resources/pdf/etd/MCP_TMCP0002E.pdf)` ``` TMCP0002E.pdf ``` [30] H. Foroosh, J. Zerubia, M. Berthod, Extension [of](http://ieeexplore.ieee.org/document/988953/) phase cor relation to [subpixel](http://ieeexplore.ieee.org/document/988953/) registration, IEEE Transactions on Image Processing 11 (3) (2002) 188–200. `[doi:10.1109/83.988953](https://doi.org/10.1109/83.988953)` . URL `[http://ieeexplore.ieee.org/document/988953/](http://ieeexplore.ieee.org/document/988953/)` [31] S. Klein, M. Staring, K. Murphy, M. Viergever, J. Pluim, elastix: A Toolbox for [Intensity-Based](http://ieeexplore.ieee.org/document/5338015/) Medical Image Regis[tration,](http://ieeexplore.ieee.org/document/5338015/) IEEE Transactions on Medical Imaging 29 (1) (2010) 196–205. `[doi:10.1109/TMI.2009.2035616](https://doi.org/10.1109/TMI.2009.2035616)` . URL `[http://ieeexplore.ieee.org/document/5338015/](http://ieeexplore.ieee.org/document/5338015/)` [32] D. Shamonin, E. E. Bron, B. P. Lelieveldt, M. Smits, S. Klein, M. Staring, Fast parallel image [registration](http://journal.frontiersin.org/article/10.3389/fninf.2013.00050/abstract) on CPU and GPU for diagnostic [classification](http://journal.frontiersin.org/article/10.3389/fninf.2013.00050/abstract) of Alzheimer’s disease, Frontiers in Neuroinformatics 7 (2013) 50. `[doi:10.3389/fninf.2013.00050](https://doi.org/10.3389/fninf.2013.00050)` . URL `[http://journal.frontiersin.org/article/10.3389/](http://journal.frontiersin.org/article/10.3389/fninf.2013.00050/abstract)` ``` fninf.2013.00050/abstract ``` [33] E. M. Ismaili Aalaoui, E. Ibn-Elhaj, Estimation of Subpixel Motion [Using](http://www.hindawi.com/journals/jece/2008/417915/) Bispectrum, Research Letters in Signal Processing 2008 (13) (2008) 1–5. `[doi:10.1155/2008/417915](https://doi.org/10.1155/2008/417915)` . URL `[http://www.hindawi.com/journals/jece/2008/417915/](http://www.hindawi.com/journals/jece/2008/417915/)` [34] M. Guizar-Sicairos, S. T. Thurman, J. R. Fienup, [Efficient](https://www.osapublishing.org/abstract.cfm?URI=ol-33-2-156) subpixel image [registration](https://www.osapublishing.org/abstract.cfm?URI=ol-33-2-156) algorithms, Optics Letters 33 (2) (2008) 156. `[doi:10.1364/OL.33.000156](https://doi.org/10.1364/OL.33.000156)` . URL `[https://www.osapublishing.org/abstract.cfm?URI=](https://www.osapublishing.org/abstract.cfm?URI=ol-33-2-156)` ``` ol-33-2-156 ``` [35] G. Tzimiropoulos, V. Argyriou, T. Stathaki, Subpixel Registra tion With [Gradient](http://ieeexplore.ieee.org/document/5648352/) Correlation, IEEE Transactions on Image Processing 20 (6) (2011) 1761–1767. `[doi:10.1109/TIP.2010.](https://doi.org/10.1109/TIP.2010.2095867)` `[2095867](https://doi.org/10.1109/TIP.2010.2095867)` . URL `[http://ieeexplore.ieee.org/document/5648352/](http://ieeexplore.ieee.org/document/5648352/)` [36] B. Schaffer, W. Grogger, G. Kothleitner, [Automated](https://www.sciencedirect.com/science/article/pii/S0304399104001652 http://linkinghub.elsevier.com/retrieve/pii/S0304399104001652) spatial drift correction for [EFTEM](https://www.sciencedirect.com/science/article/pii/S0304399104001652 http://linkinghub.elsevier.com/retrieve/pii/S0304399104001652) image series, Ultramicroscopy 102 (1) (2004) 27–36. `[doi:10.1016/j.ultramic.2004.08.003](https://doi.org/10.1016/j.ultramic.2004.08.003)` . URL `[https://www.sciencedirect.com/science/article/](https://www.sciencedirect.com/science/article/pii/S0304399104001652 http://linkinghub.elsevier.com/retrieve/pii/S0304399104001652)` ``` pii/S0304399104001652http://linkinghub.elsevier.com/ retrieve/pii/S0304399104001652 ``` [37] de Jong, T.A., Quantitative data [analysis](https://github.com/TAdeJong/LEEM-analysis) for spectroscopic [LEEM](https://github.com/TAdeJong/LEEM-analysis) (2019). URL `[https://github.com/TAdeJong/LEEM-analysis](https://github.com/TAdeJong/LEEM-analysis)` [38] E. Adelson, P. Burt, C. Anderson, J. Ogden, J. Bergen, Pyramid methods in image processing, RCA engineer 29 (6) (1984) 33– 41. [39] P. Thevenaz, U. Ruttimann, M. Unser, A pyramid [approach](http://ieeexplore.ieee.org/document/650848/) to subpixel [registration](http://ieeexplore.ieee.org/document/650848/) based on intensity, IEEE Transactions on Image Processing 7 (1) (1998) 27–41. `[doi:10.1109/83.650848](https://doi.org/10.1109/83.650848)` . URL `[http://ieeexplore.ieee.org/document/650848/](http://ieeexplore.ieee.org/document/650848/)` [40] S. Wold, K. Esbensen, P. Geladi, Principal [component](https://www.sciencedirect.com/science/article/pii/0169743987800849 https://linkinghub.elsevier.com/retrieve/pii/0169743987800849) analysis, Chemometrics and Intelligent Laboratory Systems 2 (1-3) (1987) 37–52. `[doi:10.1016/0169-7439(87)80084-9](https://doi.org/10.1016/0169-7439%0x2887%0x2980084-9)` . URL `[https://www.sciencedirect.com/science/article/](https://www.sciencedirect.com/science/article/pii/0169743987800849 https://linkinghub.elsevier.com/retrieve/pii/0169743987800849)` ``` pii/0169743987800849https://linkinghub.elsevier.com/ retrieve/pii/0169743987800849 ``` [41] S. Jesse, S. V. Kalinin, Principal [component](http://stacks.iop.org/0957-4484/20/i=8/a=085714?key=crossref.c67bebb898c90cc5d61d15749a4d5c63) and spatial correlation analysis of [spectroscopic-imaging](http://stacks.iop.org/0957-4484/20/i=8/a=085714?key=crossref.c67bebb898c90cc5d61d15749a4d5c63) data in scanning probe [microscopy,](http://stacks.iop.org/0957-4484/20/i=8/a=085714?key=crossref.c67bebb898c90cc5d61d15749a4d5c63) Nanotechnology 20 (8) (2009) 085714. `[doi:10.1088/0957-4484/20/8/085714](https://doi.org/10.1088/0957-4484/20/8/085714)` . URL `[http://stacks.iop.org/0957-4484/20/i=8/a=085714?](http://stacks.iop.org/0957-4484/20/i=8/a=085714?key=crossref.c67bebb898c90cc5d61d15749a4d5c63)` ``` key=crossref.c67bebb898c90cc5d61d15749a4d5c63 ``` [42] H. Abdi, L. J. Williams, Principal [component](http://doi.wiley.com/10.1002/wics.101) analysis, Wi ley Interdisciplinary Reviews: Computational Statistics 2 (4) (2010) 433–459. `[doi:10.1002/wics.101](https://doi.org/10.1002/wics.101)` . URL `[http://doi.wiley.com/10.1002/wics.101](http://doi.wiley.com/10.1002/wics.101)` [43] [N. Halko, P. G. Martinsson, J. A. Tropp, Finding Structure with](http://epubs.siam.org/doi/10.1137/090771806 http://arxiv.org/abs/0909.4061) Randomness: Probabilistic [Algorithms](http://epubs.siam.org/doi/10.1137/090771806 http://arxiv.org/abs/0909.4061) for Constructing Approximate [Matrix](http://epubs.siam.org/doi/10.1137/090771806 http://arxiv.org/abs/0909.4061) Decompositions, SIAM Review 53 (2) (2011) 217–288. `[arXiv:0909.4061](http://arxiv.org/abs/0909.4061)`, `[doi:10.1137/090771806](https://doi.org/10.1137/090771806)` . URL `[http://epubs.siam.org/doi/10.1137/090771806http://](http://epubs.siam.org/doi/10.1137/090771806 http://arxiv.org/abs/0909.4061)` ``` arxiv.org/abs/0909.4061 ``` [44] P. Kovesi, Good Colour Maps: [How](http://arxiv.org/abs/1509.03700) to Design Them, arXiv preprint arXiv:1509.03700 (2015). `[arXiv:1509.03700](http://arxiv.org/abs/1509.03700)` . URL `[http://arxiv.org/abs/1509.03700](http://arxiv.org/abs/1509.03700)` [45] S. Lloyd, Least squares [quantization](http://ieeexplore.ieee.org/document/1056489/) in PCM, IEEE Trans actions on Information Theory 28 (2) (1982) 129–137. `[doi:](https://doi.org/10.1109/TIT.1982.1056489)` `[10.1109/TIT.1982.1056489](https://doi.org/10.1109/TIT.1982.1056489)` . URL `[http://ieeexplore.ieee.org/document/1056489/](http://ieeexplore.ieee.org/document/1056489/)` [46] T. A. de Jong, J. Jobst, H. Yoo, E. E. Krasovskii, P. Kim, S. J. van der Molen, Measuring the [Local](http://arxiv.org/abs/1806.05155 http://doi.wiley.com/10.1002/pssb.201800191) Twist Angle and Layer Arrangement in Van der Waals Heterostructures, physica status solidi (b) (2018) 1800191 `[doi:10.1002/pssb.201800191](https://doi.org/10.1002/pssb.201800191)` . URL `[http://arxiv.org/abs/1806.05155http://doi.wiley.](http://arxiv.org/abs/1806.05155 http://doi.wiley.com/10.1002/pssb.201800191)` ``` com/10.1002/pssb.201800191 ``` [47] O. Renault, N. Barrett, A. Bailly, L. Zagonel, D. Mariolle, J. Cezar, N. Brookes, K. Winkler, B. Kr¨omker, D. Funnemann, Energy-filtered XPEEM [with](https://www.sciencedirect.com/science/article/pii/S0039602807006085) NanoESCA using synchrotron and laboratory [X-ray](https://www.sciencedirect.com/science/article/pii/S0039602807006085) sources: Principles and first [demonstrated](https://www.sciencedirect.com/science/article/pii/S0039602807006085) results, Surface Science 601 (20) (2007) 4727– 4732. `[doi:10.1016/j.susc.2007.05.061](https://doi.org/10.1016/j.susc.2007.05.061)` . URL `[https://www.sciencedirect.com/science/article/pii/](https://www.sciencedirect.com/science/article/pii/S0039602807006085)` ``` S0039602807006085 ``` [48] J. Yamanishi, S. Iwase, N. Ishida, D. Fujita, [Multivariate](https://www.sciencedirect.com/science/article/pii/S0169433217327721) anal ysis for scanning [tunneling](https://www.sciencedirect.com/science/article/pii/S0169433217327721) spectroscopy data, Applied Surface Science 428 (2018) 186–190. `[doi:10.1016/J.APSUSC.2017.09.](https://doi.org/10.1016/J.APSUSC.2017.09.124)` `[124](https://doi.org/10.1016/J.APSUSC.2017.09.124)` . URL `[https://www.sciencedirect.com/science/article/pii/](https://www.sciencedirect.com/science/article/pii/S0169433217327721)` ``` S0169433217327721 ``` [49] Dask Development Team, Dask: Library [for](https://dask.org) dynamic task [scheduling](https://dask.org) (2016). URL `[https://dask.org](https://dask.org)` [50] M. Rocklin, Dask: Parallel [Computation](https://conference.scipy.org/proceedings/scipy2015/matthew{_}rocklin.html) with Blocked algo rithms and [Task](https://conference.scipy.org/proceedings/scipy2015/matthew{_}rocklin.html) Scheduling, in: K. Huff, J. Bergstra (Eds.), Proceedings of the 14th Python in Science Conference, 2015, pp. 126–132. `[doi:10.25080/Majora-7b98e3ed-013](https://doi.org/10.25080/Majora-7b98e3ed-013)` . URL `[https://conference.scipy.org/proceedings/](https://conference.scipy.org/proceedings/scipy2015/matthew{_}rocklin.html)` ``` scipy2015/matthew{_}rocklin.html ``` [51] S. van der Walt, J. L. Sch¨onberger, J. Nunez-Iglesias, F. Boulogne, J. D. Warner, N. Yager, E. Gouillart, T. Yu, scikit-image: image [processing](https://peerj.com/articles/453) in Python, PeerJ 2 (2014) e453. `[doi:10.7717/peerj.453](https://doi.org/10.7717/peerj.453)` . URL `[https://peerj.com/articles/453](https://peerj.com/articles/453)` [52] E. Jones, T. Oliphant, P. Peterson, E. Al., SciPy: [Open](http://www.scipy.org) source scientific tools for [Python,](http://www.scipy.org) http://www.scipy.org (2001). URL `[http://www.scipy.org](http://www.scipy.org)` [53] M. A. Branch, T. F. Coleman, Y. Li, A [Subspace,](http://epubs.siam.org/doi/10.1137/S1064827595289108) Interior, and Conjugate [Gradient](http://epubs.siam.org/doi/10.1137/S1064827595289108) Method for LargeScale Bound-Constrained Minimization Problems, SIAM Journal on Scientific Computing 21 (1) (1999) 1–23. `[doi:10.1137/S1064827595289108](https://doi.org/10.1137/S1064827595289108)` . URL `[http://epubs.siam.org/doi/10.1137/](http://epubs.siam.org/doi/10.1137/S1064827595289108)` ``` S1064827595289108 ``` [54] R. H. Byrd, R. B. Schnabel, G. A. Shultz, [Approximate](http://link.springer.com/10.1007/BF01580735) so lution of the trust region [problem](http://link.springer.com/10.1007/BF01580735) by minimization over two[dimensional subspaces,](http://link.springer.com/10.1007/BF01580735) Mathematical Programming 40-40 (1-3) (1988) 247–263. `[doi:10.1007/BF01580735](https://doi.org/10.1007/BF01580735)` . URL `[http://link.springer.com/10.1007/BF01580735](http://link.springer.com/10.1007/BF01580735)` [55] F. Perez, B. E. Granger, IPython: A [System](http://ipython.org http://ieeexplore.ieee.org/document/4160251/) for Interactive Scientific [Computing,](http://ipython.org http://ieeexplore.ieee.org/document/4160251/) Computing in Science & Engineering 9 (3) (2007) 21–29. `[doi:10.1109/MCSE.2007.53](https://doi.org/10.1109/MCSE.2007.53)` . URL `[http://ipython.orghttp://ieeexplore.ieee.org/](http://ipython.org http://ieeexplore.ieee.org/document/4160251/)` ``` document/4160251/ ``` [56] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, A. M¨uller, J. Nothman, G. Louppe, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, ´E. Duchesnay, Scikit-learn: [Machine](http://arxiv.org/abs/1201.0490) Learning in Python, Journal of machine learning research 12 (Oct) (2012) 2825–2830. `[arXiv:1201.0490](http://arxiv.org/abs/1201.0490)` . URL `[http://arxiv.org/abs/1201.0490](http://arxiv.org/abs/1201.0490)` 13 Appendix A. Supplemental information _Appendix_ _A.1._ _Implementation_ The implementation presented here is programmed in Python, making extensive use of `dask` [49, 50]. This open source library, developed and maintained by Anaconda Inc., in particular its `Array` submodule, enables easy parallelization of array operations in common `numpy` syntax. It allows the lazy definition of computational operations on data, forming a task graph describing the computations to be performed. Delaying actual computation until explicitly called for enables `dask` to easily parallelize and stream computations, efficiently using all cores of a single computer. It should even allow to easily scale up to compute clusters. The implementation uses of `dask` in combination with `scikit-image` code for blocked filtering of images [51]. The complete set of correlations is written in `dask` via the FFT functions and the multiplication in Fourier space. This, via `dask` ’s task graph, allows every forward FFT to be computed only once for each image, as opposed to the _N_ times for the naive implementation. The optimization step uses `scipy` code, in particular the `least-squares` routine in the `optimization` module in combination with an explicit `scipy.sparse` Jacobian. [51, 52, 53, 54]. We found that the use of an explicit Jacobian significantly reduced computation time and memory use for larger optimizations. For easy interfacing with the user, `jupyter-notebook` and `ipython-widgets` are used [55]. For the dimension reduction using principal component analysis and clustering `dask-ml` and `scikit-learn` are applied [56]. _Appendix_ _A.2._ _Benchmark_ _methodology_ Benchmarks were run on a desktop PC with an Intel `i7-7700K` running at 4.20 GHz with 32 GB of RAM and Windows 10 x64 installed. The full stack of images was read from separate `TIFF` files on a Toshiba XG5 NVMe SSD for each run during the filter and cross correlation phase and written to a uncompressed `zarr` archive on the same SSD during the shift and write phase. The benchmark was run in a Jupyter notebook, with an installation of the Anaconda environment of Python 3.7 with at least the following packages installed: ``` numpy=1.16.3, matplotlib=3.0.3, dask=1.2.0, distributed=1.27.1, scikit-image=0.15.0, scipy=1.2.1, jupyterlab, scikit-learn=0.20.3, dask-ml=0.12.0, xarray=0.12.0, h5py=2.9.0, mkl=2019.3, mkl f ft=1.0.12, numba=0.43.1, zarr=2.2.0 ``` Accuracy benchmarks were performed with 512 _×_ 512 images, time benchmarks on subimages of 256 _×_ 256. 14 <u>Max error</u> 10 8 6 4 2 0 10 8 6 4 2 0 0.0 <u>0.5</u> <u>1.0</u> <u>1.5</u> A 0.0 <u>0.5</u> <u>1.0</u> <u>1.5</u> A 1.0 0.8 0.6 0.4 0.2 1.0 0.8 0.6 0.4 0.2 <u>Mean error</u> 10 8 6 4 2 0 10 8 6 4 2 0 0.0 <u>0.5</u> <u>1.0</u> <u>1.5</u> A 1.0 0.8 0.6 0.4 0.2 1.0 0.8 0.6 0.4 0.2 Optimal error spread 0.5 0.4 0.3 0.2 0.1 0.0 0.5 0.4 0.3 0.2 0.1 0.0 _Figure_ _A.13:_ _Maximum_ _and_ _mean_ _error_ _in_ _x_ _and_ _y_ _shift_ _as_ _calculated_ _by_ _the_ _N_ <sup>2</sup> _algorithm,_ _with_ _a_ _different_ _random_ _seed_ _compared_ _to_ _Fig._ _8._ _The_ _optimal_ _value_ _of_ _the_ _Gaussian_ _smoothing_ _s_ _as_ _a_ _function_ _of_ _added_ _noise_ _amplitude_ _A_ _is_ _drawn_ _in_ _white._ _Contour_ _lines_ _are_ _added_ _as_ _a_ _guide_ _to_ _the_ _eye._ <u>PCA component 2</u> <u>0</u> <u>500</u> <u>10</u> <u>20</u> <u>30</u> <u>40</u> _E_ 0 (eV) <u>PCA component 3</u> <u>0</u> <u>500</u> <u>10</u> <u>20</u> <u>30</u> <u>40</u> _E_ 0 (eV) <u>PCA component 4</u> <u>0</u> <u>500</u> <u>10</u> <u>20</u> <u>30</u> <u>40</u> _E_ 0 (eV) <u>PCA component 5</u> <u>0</u> <u>500</u> <u>10</u> <u>20</u> <u>30</u> <u>40</u> _E_ 0 (eV) <u>PCA component 6</u> <u>0</u> <u>500</u> <u>10</u> <u>20</u> <u>30</u> <u>40</u> _E_ 0 (eV) 0 200 400 600 800 10 <sup>−1</sup> 10 <sup>−2</sup> <u>PCA component 1</u> <u>0</u> <u>500</u> <u>10</u> <u>20</u> <u>30</u> <u>40</u> _E_ 0 (eV) _Figure_ _A.14:_ _(a)_ _Images_ _of_ _the_ _first_ _six_ _PCA_ _components_ _for_ _the_ _Bright_ _Field_ _sample_ _data_ _set_ _and_ _the_ _spectra_ _corresponding_ _to_ _the_ _maximum_ _and_ _minimum_ _of_ _this_ _component_ _occurring_ _in_ _the_ _dataset._ 15

섹션 본문 71문단 · 42,909자

(제목 없음)

1For many complex materials systems, low-energy electron microscopy (LEEM) offers detailed insights into morphology and crystallography by naturally combining real-space and reciprocal-space information.Its unique strength, however, is that all measurements can easily be performed energy-dependently.Consequently, one should treat LEEM measurements as multi-dimensional, spectroscopic datasets rather than as images to fully harvest this potential.Here we describe a measurement and data analysis approach to obtain such quantitative spectroscopic LEEM datasets with high lateral resolution.The employed detector correction and adjustment techniques enable measurement of true reflectivity values over four orders of magnitudes of intensity.Moreover, we show a drift correction algorithm, tailored for LEEM datasets with inverting contrast, that yields sub-pixel accuracy without special computational demands.Finally, we apply dimension reduction techniques to summarize the key spectroscopic features of datasets with hundreds of images into two single images that can easily be presented and interpreted intuitively.We use cluster analysis to automatically identify different materials within the field of view and to calculate average spectra per material.We demonstrate these methods by analyzing bright-field and dark-field datasets of few-layer graphene grown on silicon carbide and provide a high-performance Python implementation.

Introduction

2Low Energy Electron Microscope (LEEM) is a surface science technique where images are formed from reflected electrons of low kinetic energy-down to single electronvolts.This is achieved by decelerating the electrons before they reach the sample and projecting them onto a pixelated detector after interaction with the sample.LEEM has proven to be a versatile tool, due to its damage-free, real-time imaging capabilities and its combination of electron diffraction with spectroscopic, and real-space information.This enables more advanced LEEM-based techniques such as dark-field imaging, where electrons from a single diffracted beam are used to create a real-space image, revealing spatial information on the atomic lattice of the sample [1,2].

3Aside from usage as an imaging tool, LEEM is frequently used as a tool for quantitative analysis of physical properties of a wide range of materials.Multi-dimensional datasets can be created by recording LEEM images as a function of one or more parameters such as interaction energy E 0 , angle of incidence or temperature [3,4].Using this, a wide range of properties can be studied, for example, layer interaction, electron bands [5], layer stacking [2], catalysis [6], plasmons [7], and surface corrugation [8].However, to unlock the true potential of quantitative analysis of multi-dimensional LEEM data, post-processing of images and combination with meta-data is needed.In particular, it is necessary to correct for detector artifacts and image drift and to convert image intensity to physical quantities.

4To this end, we here present a modular data acqui-sition and analysis pipeline for multi-dimensional LEEM data, combining techniques well established in other fields such as general astronomy or transmission electron microscopy (TEM), that yields high resolution spectroscopic datasets and visualizations thereof.In particular, we start with the correction of the raw data for detector artifacts using flat field and dark current correction, as illustrated in Fig. 1(a).Combining these corrections on the images with active feedback on detector gain enables High Dynamic Range (HDR) spectroscopy, which makes it possible to measure spectra over four orders of magnitude of intensity.Subsequently, we demonstrate that compensation of detector artifacts also enables drift correction with sub-pixel accurate image registration, yielding a fully corrected data stack (Fig. 1 (b)).This creates a true pixelby-pixel spectroscopic dataset, as shown in Fig. 1(c), i.e. every pixel contains a reflectivity spectrum of the corresponding position on the sample.Finally, we explore the potential for more advanced computational data analysis.We show that by using relatively simple dimension reduction techniques and clustering, these datasets can be intuitively analyzed and visualized, enabling semi-automatic identification of areas with different spectra.

5To demonstrate these features and quantify the accuracy, we apply the drift correction algorithm to artificial data and then apply the full pipeline to a real dataset acquired on the SPECS P90 based ESCHER system in Leiden [9,10,11].The sample of the dataset is fewlayer graphene grown by thermal decomposition of Silicon Carbide (SiC) [12], followed by hydrogen intercalation to decouple the graphene from the SiC substrate [13,14].Bright Field LEEM spectra can be used to distinguish the resulting mixture of bilayer, trilayer and thicker graphene, as interlayer states cause distinct minima in the reflectivity spectra [15,16].In addition, the growth process causes strain-induced stacking domains, which can be distinguished using Dark Field LEEM spectra [17,2].The sample dataset consists of bright-field and dark-field LEEM images of the same area for a range of landing energies (sometimes referred to as LEEM-I(V)).The dark-field dataset uses a first order diffraction spot and tilted illumination such that the incident beam has the opposite angle to the normal as the diffracted beam, as described in more detail in Ref. [2].The data is available as open data [18] and is interpreted and investigated in detail in Ref. [2,19].

Detector Correction

6No physical detector system is perfect, i.e. each detector system introduces systematic errors and noise.Knowledge of the sources of these imperfections enables the correction of most of them.The ESCHER LEEM has the classical detector layout: A chevron microchannel plate array (MCP, manufactured by Hamamatsu) for electron multiplication, a phosphor screen to convert electrons to photons and a CCD camera (a PCO sensicam SVGA) to record images of the phosphor screen.

7The CCD introduces artifacts in the form of added dark counts and a non-uniform gain [20,21,22,23].Furthermore, the MCP gain is also spatially non-uniform, for example due to overexposure damaging of the MCP, resulting in locally reduced gain.Therefore we describe the measured intensity I CCD on the CCD as the following combination of the previously named detector artifacts and the 'true' signal I in :

8Where DC(x, y) is the intensity caused by dark current and G(x, y) is the position-dependent and as-of-yet unknown gain factor comprising all modifications to the gain.

9To compensate for these detector artifacts, we employ techniques well-established in astronomy (and other fields using CCD cameras) to effectively invert the relation in Eq. ( 1), to extract I in (x, y) without the deleterious effects of background dark counts DC(x, y) and local gain variations G(x, y).

10First, the dark current of the CCD is compensated by pixel-wise subtracting a non-illuminated dark count image, i.e. an image with the same exposure time as used for the measurement, but no electron illumination at all.A pixel-wise average of a set of such dark count images is shown in Fig. 2a.The dark current arises from thermal excitations in the sensor and varies over time with an approximately Gaussian distribution.The mean of this distribution is dependent on the pixel, i.e. the x, y location, for example visible in Fig 2(a) as a slight increase in the lower right corner.To suppress the thermal fluctuations in the template dark current image, it is desirable to average over several dark count images to prevent the introduction of systematic errors.We assume that the per-pixel dark currents are identically distributed with a variance Var therm except for a spatial variance Var spatial of the mean.This is mathematically equivalent to assuming the dark current fluctuates around its mean with both spatially dependent (but fixed in time) noise and timedependent thermal noise.By averaging multiple dark images, we reduce the thermal variance but not the spatial variance.The remaining variance is given by:

11Where Var(n) is used to denote the variance of n pixel-wise averaged images.By determining Var tot (n) and Var tot (1) experimentally we can isolate the thermal noise on a single image:

12For the ESCHER system with its Peltier-cooled camera, we find Var therm (16 × 250 ms images) = 114.3.Therefore, a set of 120 × 16 images (a total exposure time of 8 minutes) is sufficient to suppress the systematic errors to values smaller than the discretization error.We find that the dark count image does not significantly change over time, and therefore remeasuring dark count images is seldomly needed.

13Second, to compensate for spatial gain variations, which are mostly due to the MCP, a (conventional) flat field correction is performed, dividing the full dark count-corrected dataset by an evenly illuminated image [24].In LEEM, at negative landing energies of E 0 ≈ −20 eV the sample behaves as a mirror, yielding an almost perfect flat field image as approximation of G(x, y) in Eq. (1).A relatively large value for the negative energy is taken to prevent artifacts from local in-plane electric field components, e.g.due to work function or height differences in the sample [25,26,27].For the ESCHER system, it is necessary to take flat field images within hours of the measurement, as the MCP wears over time and the gun emission profile and system alignment change on relatively short timescales [28].Furthermore, taking a flat field image at the same precise alignment as the measurement is preferred for two reasons.First, barring absolutely perfect alignment of the system as well as a perfectly uniform emission from the electron gun, the beam intensity is not spatially uniform.As illumination inhomogeneities are dependent on the precise settings of the lenses, these will also be compensated for if the flat field is recorded in the exact same configuration.Second, for proper normalization of the data, as explained in Section 3, the same magnification (projector settings) is needed.

14An alternative to this mirror mode flat fielding is to average over a sufficiently large set of images of different positions on the sample and use the resulting average as a flat field image.In most cases however, mirror mode flat fielding is preferred over such ensemble-average flat fielding since for the latter many images of different locations are required.Even when such a set is already available, it is hard to rule out any systematic (statistical) errors.Lastly ensemble-average cannot provide proper normalization of the data to convert to true reflectivity.

High dynamic range spectroscopy

15In LEEM and LEED, large variations occur in the amplitude of the signal, both within individual images and from image to image.For example, in LEED spectroscopy, features of interest are often orders of magnitude less bright than primary Bragg peaks.This necessitates a detector system with a large dynamic range.The CCDcamera of the ESCHER setup has a bit depth of 12 bits and a possibility to accumulate 16 images in hardware, yielding an effective bit depth of 16 bits for singular images.

16For most materials, the reflected intensity I(E 0 ) changes over orders of magnitude as a function of E 0 .Starting in mirror mode, the reflected intensity tends to decrease roughly exponentially for E 0 100 eV.To obtain spectra with such a large dynamic range, the dynamic range offered by the bit depth of the CCD alone is not sufficient.

17However, the gain G of the MCP, i.e. the ratio of outgoing electrons to incoming electrons, can be tuned by the voltage V MCP applied over the MCP.This gain scales approximately exponential in V MCP (over a reasonable range, see next section), enabling image formation of approximately constant intensity on the CCD, for a wide range of incident electron intensities.We use this property to develop a scheme to further increase the dynamic range in which G(V MCP ) is adjusted by setting a new MCP bias for each new image, i.e. increasing the gain for images where the reflected intensity is low.Measuring V MCP for each recorded image and calibrating G(V MCP ) makes it possible to employ the full dynamic range of the CCD-camera for all landing energies, without losing the information of the absolute magnitude of the measured intensities, thus extending the range of spectroscopy without significant decrease in signal-to-noise ratio.

Calibration

18Hamamatsu Photonics K.K., the manufacturer of the microchannel plate in the ESCHER setup, specifies an exponential gain as function of voltage for a part of the range of possible biases [29].To extend the useful range beyond this limit and thus enable the use of the full bias range up to the maximal 1800 V, the gain versus bias curve was calibrated as follows:

191. First, in mirror mode, V MCP is adjusted such that the maximum intensity in the image corresponds to the full intensity on the CCD, staying just below intensities damaging the MCP.

202. While decreasing V MCP , images are acquired for evenly spaced bias values.The intensities of these images form the dataset for calibration of the low bias part.3. Returning V MCP to the previous maximum value, E 0 is increased until the intensity of the image is so low that it is barely distinguishable from the dark count.4. Again V MCP is turned up until the maximum image intensity corresponds to the maximum CCD intensity.5. Steps 2. to 4. are repeated until a dataset is acquired starting at maximum MCP bias V MCP .The resulting curves are shown in Fig. 3(a).6.These datasets are then corrected for dark count as discussed above, resulting in the curves shown in Fig. 3(b).Comparing to the uncorrected curves, the increase in accuracy for low intensity values, crucial for accurate calibration, is very apparent.7. A joint fit of Eq. ( 3), allowing for a different amplitude A i for each curve, is performed to the corrected data to obtain a general expression for MCP gain G as a function of V MCP .The fit is performed using least squares on the logarithm of the original data with no additional weights, to ensure a good fit over the large range of orders of magnitude.The fitted curve is then normalized to a convenient value, e.g.G(1 kV) = 1.This normalization can be freely chosen, as G will be applied equally to datasets and flat field images, yielding absolute reflectivity as resulting data.

21A first choice for a fitting function would be a simple exponential, but this would not account for any deviation from perfect exponential gain, visible as deviations from a straight line in Fig. 3(b).For the ESCHER setup we therefore choose to add correction terms of odd power in the exponent:

22Only odd powers were used to accurately capture the visible trends in the data.For the ESCHER setup correction terms up to order V 19 MCP (k < 9) turned out to give a satisfactory good approximation, as illustrated by the residuals in Fig. 3(d).

Active per-image optimization of MCP bias

23The resulting curve with calibration coefficients is then used to actively tune the MCP bias during spectroscopic measurements: A desired range is defined for the maximum intensity on the camera, corresponding to a maximum safe electron intensity on the MCP to prevent damage on the one hand, and a minimum desired intensity of the image on the CCD on the other hand.Whenever the maximum intensity of an image falls outside this range, the MCP gain G(V ) will be adjusted such that the intensity of the next image again falls in the center of this range.

24Assuming the intensity changes continuously, this method ensures the use of the full intensity range of the camera for each image, while protecting the MCP against damage.Additionally, after the measurements, the calibration curve is used to calculate the real, relative intensity from the image intensity and the recorded V MCP .By dividing this intensity by the intensity of the flat field image (taken in mirror mode and corrected for dark current and the MCP bias), we calculate a (floating point) conversion factor to true reflectivity values for each image.These ratios are added to the metadata of every image.By applying this conversion as a final step after any analysis of the data, errors due to discretization of highly amplified, and therefore low true intensity, images are minimized.Note that this procedure makes the conversion to true reflectivity possible even for datasets with no mirror mode in the dataset itself, such as dark field measurements.

Comparison of results

25Spectroscopic LEEM-I(V) curves on bilayer graphene on silicon carbide are measured both with constant MCP bias and with adaptive MCP bias as described above.A comparison between the resulting curves is shown in Fig. 4.While the regular, constant MCP, curve starts to lose detail around E 0 = 50 eV, i.e. after a factor of 100 decrease in signal, the adaptive measurement captures intensity variations in the spectrum almost 4 orders of magnitude lower than the initial intensity.We thus call the adaptive method high dynamic range (HDR) imaging.

Drift Correction by image registration

26In LEEM imaging, the position of the image on the detector tends to shift during measurement as shown in Fig. 1(a).This prevents per-location interpretation of the data, both for spectroscopic measurements and measurements with varying temperature.Although the shift can be minimized by precise alignment of the system, we find that a significant shift always remains, especially in tilted illumination experiments such as DF-LEEM or angle-resolved reflected-electron spectroscopy (ARRES) [4,27,2], which makes the compensation of this image drift necessary.

27This problem has been studied in depth in the field of image registration, motivated by wide-ranging applications such as stabilization of conventional video, combination of satellite imagery and medical imaging [30,31,32].Techniques generally rely on defining a measure of similarity between a template and other images, either by some form of cross correlation, or by identifying specific matching features in both.The image is then deformed by a fixed set of transformations (either affine, i.e. purely shifts and rotations or non-rigid, i.e. additional deformation), until the match between the features in the images and the features in the template is maximal.For LEEM data, the measurement drift is almost completely described by inplane shifts, significantly reducing the space of expected transformations.A common approach in this case is to use the (two-dimensional) cross-correlation as a measure of similarity between two shifted images and to find the maximum for all images compared to a template, as the location of maximum of the cross-correlation corresponds directly to the shift between the image and the used template.

28The cross correlation of two n×n pixels images I 1 (x, y) and I 2 (x, y) is defined as follows:

29where the coordinates can be wrapped around, i.e. all spatial coordinates are modulo n.Furthermore, we can relate this to the convolution operation (denoted as •):

30) Using this, the cross correlation can be expressed in terms of (two-dimensional) Fourier transforms F:

31Where F(I 2 ) denotes the complex conjugate of the Fourier transform of image 2. This makes the cross-correlation extra suitable as a measure of similarity, since it can be computed efficiently using the two-dimensional Fast Fourier Transform (FFT).Determining the local maximum of the cross-correlation yields the integer shift for which the two input images are most similar, with the height of the maximum an indication of the quality of the match.To further increase accuracy, several variants, such as gradient crosscorrelation and phase-shift cross-correlation, have been shown to achieve sub-pixel accuracy for pairs of images [30,33,34,35].For LEEM data however, the straightforward crosscorrelation approach is often hindered by the physics underlying the electron spectra, resulting in contrast changes (c.f.Fig. 5(a,b)) and even inversions for different values of E 0 .The problem can be slightly alleviated by using multiple templates, but in general this approach is unsatisfactory.Instead we present another approach here: We first apply digital filters and then compare each image to all other images, similar to the algorithm by Schaffer et al. for energy filtered transmission electron microscopy [36].It then uses a statistical average of the found integer shifts between all pairs of images to achieve sub-pixel accuracy.

32We analyze the accuracy of this algorithm using an artificial test dataset and show that the accompanying Python implementation [37] is fast enough to process stacks of hundreds of images in mere minutes by performing benchmarks on a real dataset, followed by a discussion of the algorithm and results.

33The algorithm consists of the following steps:

341. Select an area of each of the (detector-corrected) N images, suitably sized for FFTs (i.e.preferably 2 n × 2 n pixels).

Accuracy testing

35To validate and benchmark the accuracy of the drift correction algorithm beyond visual inspection of resulting drift corrected datasets, an artificial test dataset with known shifts was created.This enables exact comparison of results to a 'true' drift.The test dataset, as shown in Fig. 7, consists of N = 100 copies of an annulus of intensity 1.0 on a background of 0.0.The dataset is shifted over a parabolic shift in the x-direction and random shifts uniformly chosen from the interval [−0.5, 0.5] pixels in the y direction (see Fig. 7(a)).Finally pixel-wise Gaussian (pseudo-) random noise is added to all images.The standard deviation A of the added random noise is then varied to simulate images with different signal-to-noise ratios (SNR).

36The resulting maximum error in the found shift compared to the original, 'true' shift, as well as the resulting mean error for different values of A and σ is shown in Fig. 8, separately for the x and y directions.These results verify that, at least for synthetic datasets, the algorithm achieves sub-pixel accuracy, with the mean absolute error in pixels of about 0.1 times the relative noise amplitude A for the optimal value of smoothing σ, and the maximum absolute error just reaching 0.5 pixel for the extreme value of A = 2.As expected, the error is strictly increasing for decreasing SNR, i.e. increasing A. After an initial cutoff, visible in saturated yellow in Fig. 8, the accuracy of the algorithm is also generally decreasing for increasing smoothing width σ.However, after this initial cutoff, there is a comfortably large range of σ where the algorithm performs well.

37We found that most features visible in the high-σ, high-A regime of Fig. 8 (b,d) are dependent on the initialization of the random generator for the added pixel-wise noise and are thus not significant (c.f. a second run in Supplementary Fig. A.13).

Time complexity

38To benchmark the computational complexity of the algorithm, it was applied to subsequently larger parts of the real dataset, while measuring the computation times for the least squares optimization (step 8 above) and the shifting and writing of images (step 9) separately.The results show calculating the cross-correlations takes the most time, as it scales almost perfectly quadratically in the number of images N , as shown in Fig. 9.The shifting and writing of images scales linearly and is not significant for larger datasets.The total time therefore scales nearly perfectly quadratically, with a dataset of 500 images drift corrected in less than 7 minutes of computation time (exact details of the hardware and software used for benchmarking can be found in the Supplemental Information).As such, LEEM spectroscopy datasets can be comfortably and regularly drift corrected on a desktop PC. Figure 9: Run times of different phases of the drift correction algorithm on 256 × 256 pixel images.Linear (green) and quadratic (red) slopes are added as a guide to the eye, illustrating that the cross correlations scales quadratically in the number of images N , while the shifting and saving of images itself linear.

Discussion

39We elaborate here on the choices made in the algorithm.The use of the magnitude Sobel filter has multiple benefits, similar to using the gradient cross-correlation: Contrast inversions between areas with different spectroscopic properties nonetheless result in similar images (c.f.Fig. 5(c,d)).In addition, the constant zero background reduces errors due to wrap-around effects due to performing the calculation in the Fourier domain.

40The exponent 4 for the weighing matrix W ij in the least squares minimization step 8 was empirically found to give the best results for real datasets.

As already noted by Schaffer et al., the use of crosscorrelation between multiple image pairs and combining the returned integer shift values enables sub-pixel accuracy. The maximum theoretical accuracy is 1

41N pixels, but is reduced for pixels where false positive matches are thresholded out.

42Alternative methods of obtaining sub-pixel accuracy in determining shifts include a combination of upscaling and matrix-multiplication discrete cosine transforms [34] and a rather elegant interpolation of the phase cross-correlation method proposed by Foroosh et al. [30].However our current method is less complex and combines robustness against global drift with handling of changing contrasts, which is crucial for spectroscopic LEEM data.Although the sub-pixel precise phase correlation method seems a straightforward extension of regular cross correlation, it is less suitable for datasets with changing noise levels and not suitable for false positive detection by normalization, both properties we found essential to handle spectroscopic LEEM data.

43Contrary to Schaffer et al., we found smaller values of Gaussian smoothing width σ yield the best results, with larger values yielding artificial shifts around contrast inversions for real datasets and generally performing worse for the synthetic dataset, as visible in Fig. 8.

44Schaffer et al. found their approach at the time ( 2004) not computationally feasible for large amounts of images but, as shown in the previous section, the current implementation is able to drift correct a stack of several hundreds of images comfortably on a single desktop computer.We want to emphasize that the use of Python gives flexibility and makes it easy to adapt the code.For instance, increasing performance even more lies within reach by performing the FFT cross-correlations and maximum search on one or more graphical processing units using one of several libraries or by using a cluster running a dask scheduler.Further speedup would be possible by pruning which pairs of images are to be cross-correlated.An avenue not explored here, is the use of pyramid methods to create a multi-step routine where firstly a fast estimate of the shift is computed on a smoothened and reduced-size image before using consecutively larger images to refine the estimate [38,39].

45Beyond drift correction, the same method presented here can also be applied to create precisely stitched overview images of areas much larger than the electron beam spot size.Although, as no contrast inversions or large feature differences are expected for the matching areas, the added value of using a gradient filter is nullified.Additionally the number of images that can be matched to the same template is limited, forcing a low upper bound on the subpixel accuracy of the optimization part of the algorithm.Instead, we found that an algorithm based on more regular phase-shift cross-correlation is sufficient for sub-pixel accurate stitching.

Dimension reduction

46The sub-pixel accuracy drift correction now makes it possible to reinterpret a LEEM-I(V) dataset as a truly per-pixel set of spectroscopic curves, opening up possibilities for further data analysis.For a dataset of N images, each such curve (c.f.Fig. 1) can be seen as a vector in a N -dimensional vector space of the mathematically possible spectra.Even for moderate datasets of a few hundred images this is a huge vector space.In almost all cases however, the physical behavior of the data can be described with a model with far fewer degrees of freedom, i.e. the vector space of physically possible spectra has a much lower number of dimensions.Therefore, it should be possible to summarize all significant behavior in a much smaller dataset, which can be analyzed (and visualized) much more easily.

47Here, we use Principal Component Analysis (PCA), a linear technique based on singular value decomposition (SVD), often used for dimension reduction in data science fields [40,41,42].The randomized iterative variant of PCA allows for efficient computation of the largest variance components without performing the full SVD decomposition [43].This technique therefore projects the spectroscopic data to a lower dimensional subspace, in such a way that maximal data variance is retained.It does so in a computationally efficient way, making it well suited for, and popular in, data science.Before applying PCA, we crop the dataset to remove any areas that lie outside of the detector for any image inside the used range of E 0 .Additionally, each image is scaled to zero mean and unit variance, to not let brighter images contribute stronger to the analysis as they have larger variance.A lot of other choices for standardization of the data are possible, most of them with useful results, but for the scope of this paper we adhere to this standard choice.

48After performing PCA, the lower dimensional subspace or PCA-space, is now spanned by orthogonal 'eigen-spectra', referred to as PCA components.Since the projection map onto this subspace retains most of the variance in the dataset, it is possible to build an approximate reconstruction of the full physical spectra from the reduced PCA spectra.

49For spectroscopic LEEM datasets, we find that reducing down to 6 dimensions is often enough to capture more than 90% of all variance.This is shown in a so-called scree plot in Fig. 10(a) for the sample dataset of dark-field images of N = 300 energies.The dataset can be projected onto a single PCA component by taking the per-pixel inner product with the corresponding 'eigen-spectrum'.This yields images visualizing the variance retained by the respective components, as shown in the top half of Fig. 10(b) for all 6 PCA components.Below each image, the spectra corresponding to the pixels with the minimum and maximum value of this projection are shown in black and color, respectively.

Visualization

50Reducing a spectrum from hundreds of dimensions to a few opens up new opportunities for data visualization.In particular, it allows for the visualization of nearly all of the variation in spectra of an entire dataset in only two images, as shown in Fig. 11.Here, the values of the six principal components (c.f.Fig. 10), are displayed as the RGB color channels of two pictures per dataset.To lift the degener-acy in the possibilities of the sign of the PCA components (a PCA eigen-spectrum with the opposite signs retains as much variance), we change the signs such that the a positive projection onto the PCA component corresponds to being brighter in the majority of the images.This way, areas that are bright in the majority of the original images also appear bright in the visualization.To compensate for the human eyes' preference for green, a scaling of colors as proposed by Kovesi is applied [44].It is given by the following matrix: scenario due to its extreme off-axis alignment (see [2] for full details), which causes strong image drift and relative shifts of features.

Clustering and automatic classification

51In addition to the visualization possibilities explored in the previous section, the dimension reduction by PCA lowers the complexity of the data enough to enable the use of other, more quantitative data analysis techniques.In particular, reduction to less than ten dimensions is enough to perform unsupervised classification or clustering on the entire dataset.Here, we show that a relatively simple clustering algorithm, the classical k-means, also known as Lloyd's algorithm [45], applied to the PCA reduced dataset, can already be used to distinguish the relevant, different areas.The structure of the bright field dataset is visualized in terms of the first three PCA components in Fig. 12(a), both as a point cloud with colors corresponding to Fig. 11(a) and as density projections (gray scale) on the three planes.The resulting classification from the application of k-means to the six PCA components is visualized in the same way in Fig. 12(b), where the color of the points now corresponds to the assigned labels.These same label colors are shown in real space in Fig. 12(c).In the real space visualization it is clear that the different layer counts are separated (bilayer, trilayer and four-layer as purple, orange and red, respectively) from a class with the point defects and step edges (blue) and a class containing the domain boundaries in the bilayer (green).The cluster labels can now be used to calculate spectra of each area, e.g.all trilayer pixels without the defects.For this, we take the mean over all pixels belonging to one cluster for each energy.This can be done even for energies outside the range used for the initial clustering as well as for energies where we only have partial data due to drift.The resulting spectra for the clustering in Fig. 12(c) are plotted in Fig. 12(d).

52The same clustering method is applied only to the first 4 PCA components of the dark-field dataset since component 5 and 6 show virtually no distinguishing features and corresponds to very little variance [cf.12(e) and (f), respectively.Here, although not perfect, the clustering algorithm manages to mostly separate the different possible stacking orders (red and orange for the bilayer and purple, brown, pink and blue for the trilayer).The green and gray areas correspond to areas where clear classification as a stacking order is not possible due to phase contrast and non-uniform illumination artifacts due to the tilted illumination.

53Thanks to the proper calibration and mutual registration of the data, this relatively simple algorithm classifies the areas in the dark-field data set with only minor errors (e.g. the incorrect assignment of brown trilayer spectrum in the lower left), without any input of the positions of each spectrum in the image or any input about the expected differences between spectra.We anticipate that this classification using unsupervised machine learning will be useful for identifying unknown spectra in new datasets.

Conclusion

54We have shown that treating (energy-dependent) LEEM measurements as multi-dimensional datasets rather than as collection of images, opens rich opportunities for detailed and quantitative insights into complex material systems that go well beyond morphological and crystallographic characterization.

55Three key steps are necessary to convert a stack of raw LEEM images into spectroscopic dataset with a greatly increased body of quantitative information.First, we compensate for common detector artifacts such as camera dark count and non-uniform detector gain, which is crucial to quantitatively interpret LEEM images.Second, by calibrating the channel plate gain and adjusting it during spectroscopic measurements, we can not only extend the dynamic range of the dataset by two orders of magnitude, but also convert image intensity into absolute reflectivity or electron intensity (provided the beam current is accurately measured).Third, we describe a drift-correction algorithm that is tailored for spectroscopic LEEM datasets where contrast inversions make many other approaches unfeasible.It relies on digital filtering and cross-correlation of every image to all other images and, without requiring large computation times, yields sub-pixel accuracy.It thus produces spectral LEEM data with high spatial resolution, i.e., true pixel-wise spectra.

56This suite of techniques is already in regular use to obtain data from the ESCHER system in Leiden [9,11,10,5,46,2].In addition, the resulting spectral datasets enable more sophisticated data classification and visualization methods that rely on the spectrum (I(V)-curve) in every pixel.We demonstrate how we can use dimension reduction on the spectra to automatically compose images from only the six strongest spectroscopic features (PCA components).This approach produces rich color images that capture most of the features of the dataset and can thus give an intuitive view on complex material systems.Furthermore, we show that a relatively simple cluster analysis on those data sets of reduced dimensionality yields a quantitative representation of this information.Different materials within a field of view are automatically identified and statistical information such as the mean spectra and their spread per material can be extracted.

57Treating LEEM measurements as multidimensional datasets as presented here will further strengthen the role of LEEM as a quantitative spectroscopic tool rather than as a pure imaging instrument, thus deepening its impact in the research and discovery of novel material systems.Furthermore, the presented techniques can be applied to related spectroscopic imaging techniques, such as energy-filtered PEEM [47] or even adapted for use in scanning probe techniques such as scanning tunneling spectroscopy [41,48].To facilitate the use of the approaches discussed here , the test data as well as Python code is available online [? ?].

NFigure 1 :

58Figure 1: (a) A stack of raw LEEM images where images are shifted with respect to each other due to experimental drift.(b) Drift correction aligns features in the images to compensate.(c) Spectra corresponding to pixels indicated in (b).

Figure 2 :

59Figure 2: (a) Dark Count image taken on ESCHER averaged over 19 × 16 images with 250 ms exposure time.(b) Flat field image with visible edges of the round microchannel plate and damaged areas (arrow).(c) Uncorrected bright-field LEEM image from the sample dataset.The field of view corresponds to 3.5 µm.(d) Dark count and flat field corrected version of the image in (c).(e) Line cut through the raw image (c) and the corrected image (d) shown in red and green, respectively.Note that the dip due to MCP damage at y = 140 (arrow) is removed and the profiles for similar areas are flattened.

Figure 3 :

60Figure 3: (a) Calibration curves as measured with 16×250 ms exposure time per image measured on graphene on SiC.(b) Calibration curves corrected for dark count.(c) Calibration curves with matched intensity and normalized by joint curve fit of Eq. (3) and resulting best fit (black line).(d) Residuals of the joint fit in (c).

Figure 4 :

61Figure 4: Regular spectroscopic reflectivity curve (orange) of bilayer graphene on SiC, corrected for dark count and flat field, but with a single setting of VMCP (top panel).The HDR measurement of the same area with active MCP bias tuning (blue) can resolve details down to lower intensity.

Figure 5 :

62Figure 5: (a,b) Two bright-field LEEM images of few-layer graphene obtained at different E0.(c,d) Their Gaussian and Sobel-filtered versions with a Gaussian standard deviation of 3 pixels highlights the edges and erases the contrast inversion.(e) The cross-correlation of the filtered images exhibits a clear maximum.Its position compared to zero (white lines) corresponds to the relative shift of the images.

2 . 7 .

63Apply Gaussian smoothing with standard deviation of σ pixels to reduce Poissonian noise in the images.3. Apply a (magnitude) Sobel filter to highlight edges only, as shown in Fig. 5(c) and (d).As such, images with inverted contrast (c.f.Fig. 5(a) and (b)) become similar to each other.4. Using Eq. (6), compute the cross-correlation, as shown in Fig. 5(e).Do this for all pairs (i, j) of images.5. Compute the location (DX, DY ) ij and value W ij of the maximum of the cross-correlation for all image pairs (i, j).DX ij and DY ij form the anti-symmetric matrices of found relative shifts in either direction, while W ij is a symmetric matrix of weights of the found matches, as shown in Fig. 6. 6. Normalize the maximum values W ij to be used as weights in step 8: W ij = Pick a threshold W min to remove any false positive matches between images.A threshold of W min = 0.15, based on DX, DY and W ij , is shown in Fig. 6 as gray shading.Set W ij = 0 for all W ij < W min .8. To reduce the N 2 relative shifts DX to a length N vector of horizontal shifts dx, minimize the errors (dx i − dx j − DX ij ) W 4 ij (using least squares).Do the same with DY to obtain the vertical shift vector dy.9. Apply these found shifts dx and dy to the original detector corrected images, interpolating (either bilinearly or via Fourier) for non-integer shifts.

Figure 6 :

64Figure 6: Calculated shift matrices DX and DY and weight matrix W ij for the bright-field dataset.Matches of a weight below Wmin = 0.15 (shaded in gray) are mostly false positives.Consequently, they are set to zero weight in the algorithm.

Figure 7 :Figure 8 :

65Figure 7: (a) Image shifts in x and y used for the synthetic dataset.(b) Image 0 of the synthetic dataset with Gaussian noise with standard deviation of A = 1.0.(c) Gaussian-and Sobel-filtered version of (b), with a Gaussian filter width of 5 pixels, highlighting edges.

Figure 10 :

66Figure 10: (a) Scree plot indicating the retained variance per PCA component for the Dark Field dataset.(b) Images of the first six PCA components for the Dark Field sample dataset and the spectra corresponding to the maximum and minimum of the respective components occurring in the dataset.

Figure 11 :

67Figure 11: The first six PCA components can be used to summarize a spectroscopic LEEM measurement in two RGB pictures.(a,b) Visualization of a spectroscopic bright-field LEEM measurement of quasi-freestanding few-layer graphene on SiC.Different layer counts, stacking boundaries of two types and point defects are distinguishable.(c,d) Visualization of a spectroscopic dark-field LEEM measurement of the same area.All six different possible stacking orders for up to trilayer graphene are easily distinguishable.

PFigure 12 :

68Figure 12: (a) Bright-field dataset visualized as point cloud in the space of the first three PCA components.The points are colored according to the mapping in Fig. 11(a) and are projected onto the planes in gray scale.(b) Point cloud as in subfigure (a), but colored according to the computed clustering.(c) Indication of the cluster labels in the real-space image.(d) Mean bright-field spectroscopy curves for each cluster, automatically recovering layer count and domain walls.(e,f ) Same as subfigures (c,d) for the dark-field dataset reveals all stacking orders present as well as two sets of edge-case curves.C.f. Fig. 2(c,d) of Ref. [2].

69Fig. A.14(a,b)].The resulting real space labeling of the clusters and the spec-tra are shown in Fig.

Figure A. 13 :

70Figure A.13: Maximum and mean error in x and y shift as calculated by the N 2 algorithm, with a different random seed compared to Fig. 8.The optimal value of the Gaussian smoothing s as a function of added noise amplitude A is drawn in white.Contour lines are added as a guide to the eye.

Figure A. 14 :

71Figure A.14: (a) Images of the first six PCA components for the Bright Field sample data set and the spectra corresponding to the maximum and minimum of this component occurring in the dataset.

참고문헌 56건

  1. Intensity–voltage low‐energy electron microscopy for functional materials characterization physica status solidi (RRL) - Rapid Research Letters · Wiley · 2014 10.1002/pssr.201409102
  2. &lt;title&gt;Temperature dependence of dark current in a CCD&lt;/title&gt; Proceedings of SPIE, the International Society for Optical Engineering/Proceedings of SPIE · SPIE · 2002 10.1117/12.463446
  3. Energy-filtered XPEEM with NanoESCA using synchrotron and laboratory X-ray sources: Principles and first demonstrated results Surface Science · Elsevier BV · 2007 10.1016/j.susc.2007.05.061
  4. A new aberration-corrected, energy-filtered LEEM/PEEM instrument II. Operation and results Ultramicroscopy · Elsevier BV · 2012 10.1016/j.ultramic.2012.07.016
  5. Sampling and reconstruction of wave-number-limited functions in N-dimensional euclidean spaces Information and Control · Academic Press · 1962 10.1016/s0019-9958(62)90633-2
  6. A Subspace, Interior, and Conjugate Gradient Method for Large-Scale Bound-Constrained Minimization Problems SIAM Journal on Scientific Computing · Society for Industrial and Applied Mathematics · 1999 10.1137/s1064827595289108
  7. Principal component and spatial correlation analysis of spectroscopic-imaging data in scanning probe microscopy Nanotechnology · IOP Publishing · 2009 10.1088/0957-4484/20/8/085714
  8. The quasi-free-standing nature of graphene on H-saturated SiC(0001) Applied Physics Letters · American Institute of Physics · 2011 10.1063/1.3643034
  9. Meyer–Neldel rule for dark current in charge-coupled devices Journal of Applied Physics · American Institute of Physics · 2001 10.1063/1.1372365
  10. scikit-image: image processing in Python PeerJ · PeerJ, Inc. · 2014 10.7717/peerj.453
  11. Estimation of Subpixel Motion Using Bispectrum Journal of Electrical and Computer Engineering · Hindawi Publishing Corporation · 2008 10.1155/2008/417915
  12. A new aberration-corrected, energy-filtered LEEM/PEEM instrument. I. Principles and design Ultramicroscopy · Elsevier BV · 2010 10.1016/j.ultramic.2010.03.005
  13. Microscopic thickness determination of thin graphite films formed on<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:mrow><mml:mi>SiC</mml:mi></mml:mrow></mml:math>from quantized oscillation in reflectivity of low-energy electrons Physical Review B · American Physical Society · 2008 10.1103/physrevb.77.075413
  14. Flat-field correction technique for digital detectors Proceedings of SPIE, the International Society for Optical Engineering/Proceedings of SPIE · SPIE · 1998 10.1117/12.317034
  15. Low-energy electron reflectivity from graphene Physical Review B · American Physical Society · 2013 10.1103/physrevb.87.041406
  16. Automated spatial drift correction for EFTEM image series Ultramicroscopy · Elsevier BV · 2004 10.1016/j.ultramic.2004.08.003
  17. Medipix 2 detector applied to low energy electron microscopy Ultramicroscopy · Elsevier BV · 2009 10.1016/j.ultramic.2009.09.002
  18. Intrinsic Instability of Aberration-Corrected Electron Microscopes Physical Review Letters · American Physical Society · 2012 10.1103/physrevlett.109.163901
  19. Stacking domains of epitaxial few-layer graphene on SiC(0001) Physical Review B · American Physical Society · 2009 10.1103/physrevb.80.085406
  20. IPython: A System for Interactive Scientific Computing Computing in Science & Engineering · AIP Publishing · 2007 10.1109/mcse.2007.53
  21. Corrugation in Exfoliated Graphene: An Electron Microscopy and Diffraction Study ACS Nano · American Chemical Society · 2010 10.1021/nn101116n
  22. Low-energy electron microscopy and spectroscopy with ESCHER: Status and prospects IBM Journal of Research and Development · IBM · 2011 10.1147/jrd.2011.2150691
  23. The chemistry of reaction-diffusion fronts investigated by microscopic LEED I–V fingerprinting Surface Science · Elsevier BV · 1995 10.1016/0039-6028(95)00128-x
  24. Surface studies by low-energy electron microscopy (LEEM) and conventional UV photoemission electron microscopy (PEEM) Ultramicroscopy · Elsevier BV · 1989 10.1016/0304-3991(89)90033-8
  25. Efficient subpixel image registration algorithms Optics Letters · Optica Publishing Group · 2008 10.1364/ol.33.000156
  26. Phase retrieval low energy electron microscopy Micron · Elsevier BV · 2009 10.1016/j.micron.2009.10.010
  27. Principal component analysis Chemometrics and Intelligent Laboratory Systems · Elsevier BV · 1987 10.1016/0169-7439(87)80084-9
  28. Fast parallel image registration on CPU and GPU for diagnostic classification of Alzheimer's disease Frontiers in Neuroinformatics · Frontiers Media · 2013 10.3389/fninf.2013.00050
  29. Scikit-learn: Machine Learning in Python arXiv (Cornell University) · Cornell University · 2012 10.48550/arxiv.1201.0490
  30. Finding Structure with Randomness: Probabilistic Algorithms for Constructing Approximate Matrix Decompositions SIAM Review · Society for Industrial and Applied Mathematics · 2011 10.1137/090771806
  31. Approximate solution of the trust region problem by minimization over two-dimensional subspaces Mathematical Programming · Springer Science+Business Media · 1988 10.1007/bf01580735
  32. Laplacian image contrast in mirror electron microscopy Proceedings of the Royal Society A Mathematical Physical and Engineering Sciences · Royal Society · 2010 10.1098/rspa.2010.0093
  33. Principal component analysis Wiley Interdisciplinary Reviews Computational Statistics · Wiley · 2010 10.1002/wics.101
  34. A pyramid approach to subpixel registration based on intensity IEEE Transactions on Image Processing · Institute of Electrical and Electronics Engineers · 1998 10.1109/83.650848
  35. elastix: A Toolbox for Intensity-Based Medical Image Registration IEEE Transactions on Medical Imaging · Institute of Electrical and Electronics Engineers · 2009 10.1109/tmi.2009.2035616
  36. Least squares quantization in PCM IEEE Transactions on Information Theory · Institute of Electrical and Electronics Engineers · 1982 10.1109/tit.1982.1056489
  37. Exposure Time Dependence of Dark Current in CCD Imagers IEEE Transactions on Electron Devices · Institute of Electrical and Electronics Engineers · 2010 10.1109/ted.2009.2038649
  38. Extension of phase correlation to subpixel registration IEEE Transactions on Image Processing · Institute of Electrical and Electronics Engineers · 2002 10.1109/83.988953
  39. Quasi-Free-Standing Epitaxial Graphene on SiC Obtained by Hydrogen Intercalation Physical Review Letters · American Physical Society · 2009 10.1103/physrevlett.103.246804
  40. Addendum. Laplacian image contrast in mirror electron microscopy Proceedings of the Royal Society A Mathematical Physical and Engineering Sciences · Royal Society · 2011 10.1098/rspa.2011.0204
  41. Subpixel Registration With Gradient Correlation IEEE Transactions on Image Processing · Institute of Electrical and Electronics Engineers · 2010 10.1109/tip.2010.2095867
  42. Towards wafer-size graphene layers by atmospheric pressure graphitization of silicon carbide Nature Materials · Nature Portfolio · 2009 10.1038/nmat2382
  43. Nanoscale measurements of unoccupied band dispersion in few-layer graphene Nature Communications · Nature Portfolio · 2015 10.1038/ncomms9926
  44. Good Colour Maps: How to Design Them arXiv (Cornell University) · Cornell University · 2015
  45. Dask: Parallel Computation with Blocked algorithms and Task Scheduling Proceedings of the Python in Science Conferences · 2015 10.25080/majora-7b98e3ed-013
  46. Quantifying electronic band interactions in van der Waals materials using angle-resolved reflected-electron spectroscopy Nature Communications · Nature Portfolio · 2016 10.1038/ncomms13621
  47. Short-range surface plasmonics: Localized electron emission dynamics from a 60-nm spot on an atomically flat single-crystalline gold surface Science Advances · American Association for the Advancement of Science · 2017 10.1126/sciadv.1700721
  48. Multivariate analysis for scanning tunneling spectroscopy data Applied Surface Science · Elsevier BV · 2017 10.1016/j.apsusc.2017.09.124
  49. Measuring the Local Twist Angle and Layer Arrangement in Van der Waals Heterostructures physica status solidi (b) · Wiley · 2018 10.1002/pssb.201800191
  50. Quantifying work function differences using low-energy electron microscopy: The case of mixed-terminated strontium titanate Ultramicroscopy · Elsevier BV · 2019 10.1016/j.ultramic.2019.02.018
  51. Signal Enhancement as Minimization of Relevant Information Loss arXiv (Cornell University) · Cornell University · 2013
  52. Medical Imaging 1998: Physics of Medical Imaging 1998
  53. Principal Component Analysis Encyclopedia of Statistics in Behavioral Science · 2005 10.1002/0470013192.bsa501
  54. Intrinsic stacking domains in graphene on silicon carbide: A pathway for intercalation Physical Review Materials · American Physical Society · 2018 10.1103/physrevmaterials.2.104005
  55. (제목 없음) UWA Profiles and Research Repository (University of Western Australia) · The University of Western Australia
  56. PYRAMID METHODS IN IMAGE PROCESSING. 1984