# What STEMsalabim calculates¶

## Background¶

STEMsalabim simulates the image of a transmission electron microscope (TEM) in scanning mode, i.e., with a convergent electron beam scanning over the sample. (TEM can also be operated using plane wave illumination, but this is (currently) not supported by STEMsalabim.

In scanning TEM (STEM) a narrowly focused beam of high energy electrons is focused onto a very thin layer of some material. Passing through the sample, the incident electrons are scattered by the sample’s coulomb potential, which is composed of the atomic cores and the sample’s electrons. After leaving the sample the amount and direction of scattering is detected to gain insight into the sample’s atomic structure, chemical composition, electric fields, thickness, etc.

Instead of repeating the details of STEM here, we refer the reader to some good literature on the topic:

- Transmission Electron Microscopy by David B. Williams and Barry C. Carter
- Advanced computing in electron microscopy by Earl J. Kirkland

For the details on STEMsalabim’s algorithm and implementation, the following paper is instructive:

## Probe wave function¶

The electron probe in the STEM must be modelled as a coherent electronic wave, since diffraction plays an essential role in STEM. In STEM simulations, the focused probe wave function \(\Psi_0(x,y)\) is modelled as a complex 2D object, and its propagation in beam direction (here, \(z\)) is simulated.

The probe wave function encapsulates all characteristics of the microscope, such as aberrations, aperture, etc. It is calculated via

with a normalization constant \(B\), the aperture function \(A(k_x, k_y)\), and the aberration phase error \(\chi(k_x, k_y)\):

The aberration coefficients \(C_a, C_s, C_5, \Delta f, \phi_a\) and the aperture radius entering \(A(k_x, k_y)\) are parameters of the microscope and can be freely defined in STEMsalabim. (See Parameter files)

## Multislice Simulation¶

While passing through the thin sample, the wave function is scattered by the sample’s coulomb potential. In STEMsalabim, the multi-slice algorithm is implemented to model the interaction of the incoming probe wave function with the sample’s coulomb potential.

In the multi-slice approximation, the sample is divided into thin slices perpendicular to the beam direction. When the electrons of the probe have much higher energy than those of the specimen, and the slices are thin enough, the interaction between an incoming wave function and one of these slices can be described via

where \(\Psi_i(x,y)\) is the incoming and \(\Psi_f(x,y)\) the outgoing WF. The 2D *transmission function* of the
slice is \(t(x,y)\) depends on the *projected coulomb potential* \(v(x,y)\) of the slice:

with \(\sigma\) being some relativistic interaction parameter. Clearly, the transmission function \(t(x,y)\)
merely modifies the phase of the wave function and is therefore sometimes called a *weak phase object*.

To model the interaction of the probe WF \(\Psi_0(x,y)\) with every slice, it is subsequently multiplied with the transmission function of each single slice. In between the slices, the WF is propagated to the next slice by multiplication

with a Fresnel propagator

with wavelength \(\lambda\) and slice thickness \(dz\). Since the propagator is defined in \(k\)-space, an iteration of the multi-slice approximation is calculated as

where \(\mathscr{F}\) and \(\mathscr{F}^{-1}\) are forward and backward 2D Fourier transformations.

## Detector¶

After the multi-slice simulation, the absolute intensity of the diffracted WF (in \(k\)-space) \(|\Psi(k_x, k_y)|^2\) is detected. STEMsalabim supports writing the 2D diffractogram directly to the output file, but it can also calculate and write the angular dependency \(|\Psi(|k|)|^2\). (See Parameter files and Output file format for more information.)