exCTF simulator: Simulation tool for phase contrast transfer function for aberration-corrected transmission electron microscopy

The contrast transfer function (CTF) is an important principle in the field of transmission electron microscopy (TEM) imaging. It provides information on how the electron wave that interacted with a sample (in frequency domain) in an objective lens is transferred to the imaging system (in real space domain) depending on the effects of lens aberrations. Based on the CTF calculation, various useful results, such as the TEM instrumental information limit and optimal imaging condition, can be estimated. Recently, aberration-corrected TEM (AC-TEM) has been widely applied in various research fields for imaging at the nanoscale or atomic scale. To use AC-TEM effectively, a deep understanding of the complicated CTF with an electron wave controlled via an aberration corrector is required. Unfortunately, this complicated CTF is difficult to understand for most microscopists without the use of computational tools. In this study, we develop the extended CTF (exCTF) simulator to perform the full as well as simple CTF calculation. We successfully developed the exCTF simulator, which can obtain more information than previously reported software. The exCTF simulator not only calculates the CTF for basic optical information that can be obtained in conventional TEM, but also can calculate the extended CTF with various aberrations (up to fifth order) for more detailed information obtained in advanced high-performance AC-TEM in one-dimensional and two-dimensional formats. The user interface of the simulator includes CTF calculation, saving, and edit functions for five graphs for different conditions, allowing for detailed comparative analysis. We confirmed that the exCTF simulator produced reliable calculation data for various applications. The exCTF simulator made it easy to obtain instrumental performance information and demonstrated the influence of optical aberrations on the actual resolution of AC-TEM. Consequently, the proposed exCTF simulator is expected to be useful to microscopists as a simulation tool for electron microscopy and as a training tool for electron optics.


Introduction
Transmission electron microscopy (TEM) serves as an essential tool for structural and chemical research in nanoscale. Its inherent functions are to obtain image and diffraction information of samples. The electrons emitted from the electron gun are illuminated to the sample, and the electron waves formed by these electrons interact with the sample by objective lens excitation. The transmitted electron waves scattered due to interaction with the sample are focused on the backfocal plane of an objective lens to form a diffraction pattern. Then, the waves that pass through the back focal plane are gathered again in the image plane. The final image on the image plane is generated via the interference of the phase delayed electron waves caused by the sample and the objective lens. Thus, it is clear that the irregular phase delays occurring as a result of lens aberration must be minimized to obtain high-resolution images. The phase delay of an electron wave caused by objective lens comprises a complex combination of several aberration coefficients, which is difficult to understand intuitively. However, this problem can be addressed by understanding the coherent contrast transfer function (CTF).
The CTF describes the modulation relationship between the phase delay caused by electrons passing through the objective lens and the corresponding image contrast (Williams and Carter 2009;De Jong and Van Dyck 1993). Using this relationship, the image resolution and information limit that can be realized by a TEM can also be intuitively obtained. CTF analysis and correction are particularly important to enhance the resolution and contrast of TEM images, which is useful in various biological and structural imaging applications (Jeong et al. 2013). To help microscopists understand the principles of CTF analysis, useful programs and scripts have been developed and distributed in the public domain (Sidorov 2002;Mitchell 2017).
Recently, aberration-corrected TEM (AC-TEM) has been used to obtain detailed information of a sample on an atomic scale; the corresponding CTF has a more complex form than the CTF for conventional TEM because it involves modulation of the phase and amplitude of an electron wave not only by an objective lens, but also by an aberration corrector. An aberration corrector is utilized to minimize aberrations in an objective lens; if aberrations are minimized effectively, atomic-scale images can be obtained. To achieve this, the aberrations must be minimized by controlling the aberration corrector. Generally, although the aberration corrector software supports automatic correction function, it does not always exhibit optimal performance. Therefore, a comprehensive understanding of CTF is indispensable for achieving the maximum performance of AC-TEM using the manual control mode. Apart from TEM users, an indepth understanding of CTF will also be highly beneficial for the people who intend to develop equipment related to electron microscopy, and students who wish to understand TEM thoroughly in depth. Nevertheless, understanding the physical properties of CTF and TEM optics in complex mathematical equations is difficult without the aid of simulation tools.
Though several software packages have been developed and released for analyses of aberration correctors for academic purposes (Barthel 2018), their primary objective is not CTF calculation, but multislice simulation of high-resolution scanning TEM images. In contrast, a few useful software programs for high-resolution TEM imaging exist that focus on the calculation of residual aberration of electron waves (Zemlin and Zemlin 2002;Barthel 2007); however, these also only yield twodimensional (2D)-CTF images.
Thus, for academic purposes, there is a need for the CTF simulator software that yields more detailed information and is easier to use than those that have been previously reported in the literature (Sidorov 2002;Mitchell 2017). Accordingly, in this study, an extended CTF (exCTF) simulator is introduced to help readers better understand the effects of the instrumental properties of TEM and the aberration parameters for TEM image formation through CTF calculation and visualization.

Experimental
The proposed exCTF simulator was developed using the C++ programming language with Microsoft Foundation Classes; in particular, the simulator allows a user to calculate and visualize CTF graphs and images for various TEM specifications with user-editable instrumental parameters. Additionally, it is possible to specify optical parameters close to experimental conditions for a specific TEM.
The exCTF simulator provides users with an instant and intuitive simulation result along with slide bars and editable textboxes for different instrumental and optical parameters; one-dimensional (1D) and 2D-CTF are immediately calculated according to these editable parameter values. All the parameters and simulation results are displayed using a graphical user interface (GUI). The calculation methods used in the proposed tool to obtain the CTF and image information are described below.

CTF calculation
In this section, the main equations used in the proposed exCTF simulator for CTF calculation are briefly described. For more detailed information, the authors recommend that readers refer to reference (Erni 2015).
The contrast images are represented by the following equation: where I(r) is the coherent imaging model, r = (x, y) is a 2D vector in the object plane, ψ ep (r) is the electron wave in the back focal plane, t(r) is the 2D complex transfer function describing the imaging characteristics of the microscope, ϕ(r) is the induced phase shift, and the operators ℑ(⋅) and ⊗ denote the imaginary part and convolution, respectively. The coherent imaging model described by (1) indicates the manner in which structural information of the exit-plane wave and characteristics of the microscope are represented in phase-contrast images. To better understand the effects of the instrumental properties of the TEM and lens aberrations on the final images, we focus on the transfer function t(r) in our study. In this paper, the Fourier transform of is referred to as the phase CTF. Furthermore, the microscope characteristic transfer function is given by: where the complex scattering angle ω = θ x + θ y and θ ≈ qλ; here,q is the vector of the spatial frequency, and λ is the relativistic wavelength of the electron. The function t(ω) consists of the production form of four functions, namely, the objective aperture function t a (ω), coherent phase CTF t c (ω), partial spatial coherence function E s (ω), and partial temporal coherence function E t (ω). The description of each function is as follows: First, to calculate the CTF, the aperture function is assumed as t a (ω) = 1 for ∀|ω| ∈ ℝ + . Second, t c (ω) is described as follows: where χ(ω) is the aberration function, which is defined as: The proposed CTF simulator considers aberration coefficients up to the fifth order except for S 5 (fifth-order star aberration) and R 5 (fifth-order Rosette aberration); for a given complex scattering angle, the phase contrast relationship based on the aberration coefficients can be determined using (3) and (4). Third, to consider the damping effect from illumination situation on a sample that is not a plane wave wherein the wave vector is parallel to the optical axis of the microscope, the partial spatial coherence function E s (ω) is represented as follows: where θ s is the beam convergence semi-angle that is subtended by the illumination source at the object plane. Finally, to consider the damping effect of the focus blur caused by chromatic aberration of the objective lens, the partial temporal coherence function E t (ω) is defined as follows: where the chromatic focus spread function is defined as: In (7), C C is the chromatic aberration, ΔU/U is the instability of the high tension U, ΔI/I is the instability of the lens current I, E 0 is the primary electron energy, and ΔE rms is the root-mean-square energy spread of the electron beam.
In summary, obtaining the TEM contrast image using the CTF is equivalent to solving (2) for the following given values: (i) complex scattering angle ω = θ x + θ y , (ii) relativistic wavelength of the electron λ, (iii) energy spread ΔE rms , (iv) chromatic aberration C C , (v) beam convergence semi-angle θ s , (vi) instability of the high tension ΔU/U, (vii) instability of the lens current ΔI/I, and (vii) aberration coefficients. Figure 1 shows the interface of the proposed exCTF simulator. The simulator dashboard consists of three major parts for microscope setup, optical parameters, and visualization results; each part is described below.

Features of CTF simulator
First, the microscope setup part allows a user to set the instrumental parameters for a specific microscope, which can be either a commercial type or a new custom type. Further, a maximum of five instrumental parameters can be defined in advance, and the "save and recall" functionality for these parameter values is included in the simulator. Through the configurable values, namely, Max K and Number of Points, the spatial frequency range required to calculate the CTF can be adjusted and displayed in a more sophisticated manner.
Second, the part for optical parameters shows the optical aberration coefficients up to the fifth order except S 5 and R 5 . Each aberration coefficient except the real coefficients C 1 and C 5 can be controlled via two factors, namely, the magnitude and azimuth angle of aberration. Users can easily obtain the CTF results at the Scherzer focus by clicking on the Scherzer defocus button, and the full CTF results can be obtained through controlling all the aberration coefficients. Moreover, the results based on the combinations of the aberration parameters of different orders are separately shown as graphs 1-5, which allows users to easily compare the different results.
Third, the visualization results part is a composite screen of display options (i.e., damping envelope functions and 1D-CTF graph selection), calculation results, and save and load functions for the results. The CTF is calculated using an envelope function such as a temporal, spatial, and combined coherence function. The 1D-CTF graph can provide the calculated results of different aberration effects for the same instrumental parameters by clicking and selecting the graphs that are included in the calculation result window. The graph for the 1D-CTF shown in Fig. 1c represents the calculation results of five different sets of defocus and illumination convergence values for a high-voltage electron microscope (HVEM, ARM1300S, JEOL). The 2D-CTF graph is displayed only for the calculation result of the lowest numbered graph parameter selected using the select graph option of the simulator. The calculated 1D-CTF and 2D-CTF results can be saved as images and as usereditable spreadsheet files in the Microsoft Excel format. Furthermore, users can open and compare previously saved files, such as those for 2D-CTF of other calculated results, using the open picture function in the simulator.

Results and discussion
Simulation results for two different TEM cases were obtained using our exCTF simulator to demonstrate its efficacy. Figure 2 shows the CTF calculation results for an HVEM operating at 1250 kV. The instrumental parameters are identical to the input data shown in Fig. 1. In addition, a Scherzer focus of − 53 nm and convergence angle of 0.3 mrad for the illuminating beam are applied. Figure 2a shows the 1D-CTF obtained using data in an editable result spreadsheet that was previously saved from the proposed software. The Scherzer cutoff frequency, i.e., the point resolution of the simulated TEM, is 8.60 nm− 1 (0.116 nm) in the current example (indicated by the red arrow in Fig. 2a, and the information limit has a value of 13.16 nm− 1 (0.076 nm) here (indicated by the blue arrow in Fig. 2a). It was confirmed that those values are equal to the experimental point resolution and information limit of the HVEM, respectively. Figure 2b displays the saved 2D-CTF image that was obtained using the CTF simulator; its scale was adjusted to be the same as the frequency range of the 1D-CTF. The inset red line is the horizontal intensity profile of the 2D-CTF image; it can be observed that this profile is identical to the 1D-CTF result. Based on the obtained CTF calculation result at the Scherzer resolution condition, it was confirmed that the high-resolution images of the sample have a negative phase contrast, and the image contrast does not change in the first passband. Figure 3 shows the CTF calculation results with optical aberration parameters required to achieve a resolution  Figure 3a shows the calculation results of 1D-CTF and 2D-CTF with specific instrumental parameters and the corresponding optical aberration parameters. The instrumental parameters were those of a 200-kV AC-TEM equipped with a Corrected Electron Optical Systems GmbH (CEOS) TEM corrector (LIBRA200MC, Carl Zeiss). Furthermore, the chromatic aberration value is set to 2.6 mm; this value is relatively higher than that of other AC-TEM devices owing to its wide pole-piece gap. Figure 3b shows the detailed 2D-CTF images for the same AC-TEM parameters. In the figure, the first 2D-CTF image is the complete 2D-CTF image obtained using the CTF simulator, where the inset red circle indicates a resolution limit of 0.1 nm. Although chromatic aberration has a significant influence on the damping envelope function of CTF calculation, it can be proved that the phase contrast condition to realize near-atomic scale imaging was satisfied. Moreover, the 2D-CTF images with the elemental optical aberrations were successfully extracted and displayed; from these images, the extent of the influence of optical aberrations on phase contrast imaging could be identified.
Finally, Fig. 4 shows the CTF results calculated using our proposed tool based on experimental data obtained from an AC-TEM device. The CTF calculation was performed up to the third optical aberration coefficients considering their azimuth angles. The image shown in the Open Picture tile in Fig. 4 is the calculated CTF image obtained via the commercial GUI program (CET-COR, CEOS). When comparing two CTF images, the chromatic aberration effect is not included. In addition, the convergence angle and frequency k range could also be adjusted in the simulator. From comparison of two 2D-CTF images, it is confirmed that our exCTF simulator can provide accurate calculation and visualization results for various TEM devices.

Conclusions
In this work, we introduced the exCTF simulator, which can calculate the CTFs of TEMs considering up to fifthorder aberration coefficients; furthermore, two case studies have also been discussed that confirm the efficacy and accuracy of our simulator. By applying several useful functions, the elemental 2D-CTF images obtained using our proposed simulator facilitate an easy understanding of the influence of optical aberrations on the TEM resolution. The complete 2D-CTF calculation result, which was congruous with the experimental result, clearly demonstrates that the proposed simulator can effectively extract the instrumental performance information regarding the actual resolution of AC-TEM. Consequently, our exCTF simulator is expected to be useful as a simulation tool for electron microscopy and as an electron optics training tool for microscopists.