Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
e68d321
live demo github
gvarnavi Jul 29, 2024
7bcdadf
Merge remote-tracking branch 'origin/main' into dev
cophus Dec 23, 2024
ad8e9fb
typo
cophus Dec 23, 2024
9ea5742
Adding more content
cophus Dec 24, 2024
a850e6e
more content
cophus Dec 25, 2024
0434849
finish FT pair table
cophus Dec 26, 2024
8bb6834
More content
cophus Dec 27, 2024
ae26428
Finishing bloch wave section
cophus Dec 27, 2024
07f4c63
Corrections
cophus Dec 28, 2024
c959e9b
typos
smribet Dec 28, 2024
49ae64c
a few more typos
smribet Dec 28, 2024
28c0222
small changes
smribet Dec 28, 2024
8a80784
fixes for old TEM figures
smribet Dec 28, 2024
0ff0099
TEM fixes
smribet Dec 28, 2024
8be6d4e
STEM and post processing updates
smribet Dec 28, 2024
49437be
Reordered aberrations chapter, added sampling to inputs chapter.
TomaSusi Dec 29, 2024
e634507
Transposed H molecule simulation.
TomaSusi Dec 30, 2024
db8f60c
moving noise to TEM
smribet Dec 30, 2024
1ad09fd
Merge remote-tracking branch 'origin/dev' into dev
smribet Dec 30, 2024
e392084
Transposed H molecule simulation.
TomaSusi Dec 30, 2024
247e527
Merge branch 'dev' of github.com:msa-em/guide-tem-simulation into dev
TomaSusi Dec 30, 2024
8568096
Moved STEM post-processing to STEM chapter, deleted post.
TomaSusi Dec 30, 2024
b04bea6
Minor copyedits.
TomaSusi Dec 30, 2024
9314821
Minor copyedits.
TomaSusi Dec 30, 2024
9b064b4
Funding info added.
TomaSusi Dec 30, 2024
ffc1e08
fixes for TEM figures
smribet Dec 30, 2024
12215c1
Merge remote-tracking branch 'origin/dev' into dev
smribet Dec 30, 2024
b1130e5
Fixed typo.
TomaSusi Dec 30, 2024
0971500
Merge branch 'dev' of github.com:msa-em/guide-tem-simulation into dev
TomaSusi Dec 30, 2024
54bc97a
Minor fixes to intro.
TomaSusi Dec 30, 2024
65d8c04
Typo fix
TomaSusi Dec 30, 2024
2125100
still need to fix right colorbar during interact and weird white space
smribet Dec 30, 2024
d9392aa
Merge remote-tracking branch 'origin/dev' into dev
smribet Dec 30, 2024
bba2826
typo
smribet Dec 30, 2024
80eae65
some more TEM figure changes
smribet Dec 30, 2024
78a3b85
Tweaked simple TEM widgets.
TomaSusi Dec 30, 2024
23d2110
intro typos
gvarnavi Dec 30, 2024
ffd617c
Copyedits to the early chapters.
TomaSusi Dec 30, 2024
1591ed7
code edits
gvarnavi Dec 30, 2024
6d74cce
handle merge conflicts
gvarnavi Dec 30, 2024
912e31b
TEM tweaks
smribet Dec 30, 2024
acb86ce
additions to TEM text
smribet Dec 30, 2024
3232cdf
Final minor tweaks to unify presentation.
TomaSusi Dec 31, 2024
03e92ee
First stab at the abstract.
TomaSusi Dec 31, 2024
9b5d1d2
Fixed typos in abstract, commented out Alex and Hamish as authors.
TomaSusi Dec 31, 2024
28c5f9b
Typo fix
TomaSusi Jan 1, 2025
6ec7889
abstract cleanup
gvarnavi Jan 2, 2025
849a104
standardizing links, abbreviations
gvarnavi Jan 2, 2025
3b54c64
physics edits
gvarnavi Jan 2, 2025
90e23ed
Update Colin ID
cophus Jan 27, 2025
bcc5d8c
Adding conclusion
cophus Jan 27, 2025
56c9ff6
fixing up some typos
gvarnavi Mar 22, 2025
6945928
fix STO supercell widget
gvarnavi Mar 22, 2025
cc6cc08
pushing last weeks local edits to edit on gpaw-enabled workstation
gvarnavi Mar 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 26 additions & 16 deletions STEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The incident probe wavefunction is easiest to define in Fourier space
\Psi_0(\bm{k}) = A(\bm{k}) \mathrm{e}^{-i\chi(\bm{k})},
```

where the amplitude, {math}`A(\bm{k})`, is the aperture function and the phase, {math}`\chi(\bm{k})`, is the aberration function introduced in section [%s](). The aperture is usually a disk with a radius given by the cutoff semiangle
where the amplitude, {math}`A(\bm{k})`, is the aperture function and the phase, {math}`\chi(\bm{k})`, is the aberration function introduced in section [](#CTF_page). The aperture is usually a disk with a radius given by the cutoff semiangle

```{math}
\begin{aligned}
Expand All @@ -32,7 +32,7 @@ where the amplitude, {math}`A(\bm{k})`, is the aperture function and the phase,
\end{aligned}
```

While the above definition is typical for most STEM experiments, the initial wavefunction can be defined using any other complex function and other initial conditions may be required for simulating more exotic experiments such phase plate STEM.
While the above definition is typical for most STEM experiments, the initial wavefunction can be defined using any other complex function, and other initial conditions may be required for simulating more exotic experiments such phase plate STEM.

The probe is transferred to the specimen using an inverse Fourier transform and, in the same step, we can shift the by the Fourier shift theorem

Expand Down Expand Up @@ -78,12 +78,9 @@ where
\end{aligned}
```




If {math}`D(\bm{k})` is a small point on the axis then the measurement is a bright field image. If {math}`D(\bm{k})` is a large annulus covering the high angle scattering then the measurement is an annular dark field image.

In [](#fig_stem_processing), we present a visualization for exploring how the integration region of flexible circular and annular detectors influence the image contrast. More discussion of flexible detectors in STEM experiments is in [4D-STEM](#id-4d-stem). For BF imaging, we often use a collection angle just larger than the convergence angle of the incident probe. In annular dark field (ADF) imaging the contrast is approximately $Z^\alpha$, where Z is the atomic number and $\alpha$ is anywhere between 1.3 and 2 depending on the detector geometry {cite:p}`treacy2011z`. In a high angle annular dark field (HAADF) experiment, the contrast is even more strongly dominated by the heavy atoms. ADF imaging is a linear technqiue and relatively robust to sample thickness, but as can be oserved in [](#fig_stem_processing) is not well suited for visualizing light elements. Annular bright field imaging (ABF) uses a colleciton angle matching the outer ring of the bright field disk, and capture signals from both heavy and light elements {cite:p}`okunishi2009visualization`.
In [](#fig_stem_processing), we present a visualization for exploring how the integration region of flexible circular and annular detectors influence the image contrast. More discussion of flexible detectors in STEM experiments is in [4D-STEM](#id-4d-stem). For BF imaging, we often use a collection angle just larger than the convergence angle of the incident probe. In annular dark field (ADF) imaging the contrast is approximately $Z^\alpha$, where Z is the atomic number and $\alpha$ is anywhere between 1.3 and 2 depending on the detector geometry {cite:p}`treacy2011z`. In a high angle annular dark field (HAADF) experiment, the contrast is even more strongly dominated by the heavy atoms. ADF imaging is a linear technqiue and relatively robust to sample thickness, but as can be observed in [](#fig_stem_processing) is not well suited for visualizing light elements. Annular bright field imaging (ABF) uses a colleciton angle matching the outer ring of the bright field disk, and capture signals from both heavy and light elements {cite:p}`okunishi2009visualization`.

The image, {math}`g(\bm{r}_p)`, is the collection of integrated intensities at all sample positions in a (typically) rectangular region. The scan region may be chosen independently of the supercell and may cover only part of the super cell. In the case of a super cell consisting smaller periodic units, computation can be saved by choosing a scan window covering just one of the periodic units. For non-periodic cells, it is important to pad the region of interest to avoid wrap-around errors in the sample field of view.

Expand All @@ -95,7 +92,7 @@ We can significantly limit the computational cost, by choosing the largest possi

\end{align*}

It is important to remember the difference between the wavefunction sampling and probe step, both in units of Angstrom. The probe step only refers to the spacing of the initial probe, and it is entirely independent from the grid used to sample the wavefunctions and potentials.
It is important to remember the difference between the wavefunction sampling and probe step, both in units of Ångströms. The probe step only refers to the spacing of the initial probe, and it is entirely independent from the grid used to sample the wavefunctions and potentials.


```{figure} #app:stem_detectors
Expand All @@ -105,27 +102,40 @@ Aluminum, iron and gold nanoparticles on a carbon film: **Left** image from a ci
```

(stem-image-simulation)=
#### Image simulation: STO/LTO
### Image Simulation and Post-Processing
Scanning imaging modes such as STEM works by rastering an electron probe across a sample pixel by pixel and recording the scattering signal. The computational cost of the simulation is directly proportional to the number of scan pixels, each requiring a separate multislice simulation. As mentioned above, for periodic speciments, even though the potential needs to be large enough to fit the probe, there is no need to scan over repated unit cells as tiling afterwards can yield the same result.

Scanning imaging modes such as STEM works by rastering an electron probe across a sample pixel by pixel and recording the scattering signal. The computational cost of the simulation is directly proportional to the number of scan pixels, each requiring a separate multislice simulation. For periodic speciments, even though the potential needs to be large enough to fit the probe, there is no need to scan over repated unit cells as tiling afterwards can yield the same result.
STEM simulations are computationally demanding, but it is typically not required to use as many pixels in simulations as there are in experimental images. A sparse sampling can usually be interpolated to save a lot of computational effort, and blurring, tiling and applying noise can be done after the simulation is completed. We apply some of the most common steps post-processing step in this tutorial.

As an example, we simulate the BF (0 to 20 mrad), MAADF (40 to 100 mrad) and HAADF (100 to 180 mrad) images of a STO/LTO interface that we built in the [simulation inputs](./sim_inputs.md) chapter. Note that since the structure repeats in the $x$-direction, we only scan over the unit cell, as shown in [](#fig_stem_specimen) below. The images simulated with a primary beam energy of 150 keV, a defocus of 50 Å, and a probe convergence-semiangle of 20 mrad are shown in [](#fig_stem_image) below. Note that these are quite pixelated since we simulated at Nyqvist sampling to save computational effort; see [post-processing](./post.md) for how these are interpolated to a higher resolution.
#### STEM Image Simulation: STO/LTO
As an example, we simulate the BF (0 to 20 mrad), MAADF (40 to 100 mrad), and HAADF (100 to 180 mrad) images of a STO/LTO interface that we built in the [simulation inputs](./sim_inputs.md) chapter. Note that since the structure repeats in the $x$-direction, we only scan over the unit cell, as shown in [](#fig_stem_specimen) below in red. The images are simulated with a primary beam energy of 150 keV, a defocus of 50 Å, and a probe convergence-semiangle of 20 mrad. Note that these would be quite pixelated since we simulated at Nyqvist sampling to save computational effort; below we show how these are interpolated to a higher resolution.

```{figure} #app:stem_sto-lto_scan
:name: fig_stem_specimen
:placeholder: ./static/stem_specimen.png
A SrTiO<sub>3</sub>/LaTiO<sub>3</sub> (STO/LTO) interface model. The red overlaid rectangle indicates the area of the scan.
```

```{figure} #app:stem_sto-lto_image
:name: fig_stem_image
:placeholder: ./static/stem_images.png
Bright-field (BF), medium-angle annular dark-field (MAADF), and high-angle annular dark-field (HAADF) imges of the SrTiO<sub>3</sub>/LaTiO<sub>3</sub> (STO/LTO) interface.
#### Interpolation
We can save a great deal of computational effort by scanning at the [Nyquist_frequency](wiki:Nyquist_frequency), which is information-theoretically guaranteed to be sufficient — but the result is visually quite pixelated. To address this, we can interpolate the images to a sampling of 0.05 $\mathrm{\AA}$. *ab*TEM’s default interpolation algorithm is Fourier-space padding, but spline interpolation is also available, which is more appropriate if the image in non-periodic.

#### Blurring
Standard multislice simulations are too idealized to describe a realistic experimental image. For example, a finite Gaussian-shaped source will result in a blurring of the image, and vibrations and other instabilities may further contribute to the blur. It is typical and convenient to approximate these by applying a Gaussian blur with a standard deviation of $0.35 \ \mathrm{\AA}$ (corresponding to a source of approximately that size). However, note that correctly including spatial and temporal incoherence is a bit more complicated and may be necessary for quantitative comparisons with experiment.

#### Noise
Analogous to the discussion in [](#id-tem-phase), STEM simulations are initially performed at infinite dose, and we need to add Poisson nose to reach more realistic conditions. In this case we add a dose per area of $10^5 \ \mathrm{e}^- / \mathrm{\AA}^2$ to form a more realistic image.

The different STEM post-processing steps can be explored in [](#fig_stem_processing).

```{figure} #app:stem_processing
:name: fig_stem_processing
:placeholder: ./static/stem_processing.png
Using the slider observe how different post-processing steps affect the scanned bright-field, medium-angle, and high-angle annular dark-field images of an STO/LTO heterostructure.
```

(differential-phase-contrast)=
### Differential Phase Contrast
The phase problem, namely the loss of phase information when taking a measurement, is well known in many fields including electron microscopy. Because detectors collect the square modulus of the exit wave ({math}`|\Psi_t(\bm{k}, \bm{r}_p)|^2`), much of the phase information is lost. Methods that can reconstruct the phase of the sample provide dose-efficient imaging of materials and the ability to simultaneously characterize heavy and light elements. There are a number of approaches to recovering the phase of the sample, some of which will be discussed in the [4D-STEM](#id-4d-stem) section.
The phase problem, namely the loss of phase information when taking a measurement, is well known in many fields including electron microscopy. Because detectors collect the square modulus of the exit wave ({math}`|\Psi_t(\bm{k}, \bm{r}_p)|^2`), much of the phase information is lost. This is analogous to the TEM phase imaging problem described in [](#id-tem-phase). Methods that can reconstruct the phase of the sample provide dose-efficient imaging of materials and the ability to simultaneously characterize heavy and light elements. There are a number of approaches to recovering the phase of the sample, some of which will be discussed in the [4D-STEM](#id-4d-stem) section.

When an electron probe interacts with a sample potential the center of mass (CoM) of the beam changes. Depending on the sample potential and the size of the probe, this will take the form of either a rigid disk shift, for low-frequency features, or a change in the distribution of signal within a disk, for high-frequency features, such as atoms {cite:p}`cao2018theory`.

Expand All @@ -146,4 +156,4 @@ Using the slider observe how the separation of Bragg disks and probe size change

For more complex analysis, there are two most common modes for experimental set-up: small and large convergence angle, which can be explored in [](#fig_stem_convergence). Using a small convergence angle leads to large separation between Bragg disks in reciprocal space, which is ideal for orientation and strain experiments. For orientation mapping, the diffraction pattern at each position is compared to a library of patterns from a reference structure to solve for rotation of the crystal. Strain mapping is accomplished by comparing to a reference diffraction pattern and computing subtle shifts in Bragg disks resulting from structural disorder. The structure of amorphous materials can also be studied with this configuration by computing the radial distribution function. Careful choice of simulation parameters is imporant for this set-up. The small convergence angle creates a large real space probe size, which requires a large cell to hold the probe. At the same time, the maximum scattering angle needs to be large enough to capture enough Bragg disks for structural identification.

A large convergence angle creates a small probe in real space, which is ideal for atomic resolution imaging, and the overlap between diffracted disks transfers information for phase reconstruction experiments. There are a variety of ways to reconstruct the phase of the sample from 4D-STEM experiments, and the ideal approach will depend on the structure, field of view, and simulation parameters. The simpilest approach is a DPC reconstruction. As compared to the experimental set-up in the [DPC](#differential-phase-contrast) section, the segmented detectors are replaced with a pixelated detector for more accurate center of mass and thus phase determination. More complicated reconstruction algorithms include parallax, where virtual images from each pixel in the central disk are aligned to create a high-signal to noise phase reconstruction. Interative electron ptychography referes to a family of algoirthms where the probe and object are reconstructed from the 4D-STEM dataset. In this method the maximum scattering angle is set by the highest spatial frequency recorded in the detector, so it is possible to form an image with higher resolution than real space sampling. More information about phase contrast reconstructions can be found at [].
A large convergence angle creates a small probe in real space, which is ideal for atomic resolution imaging, and the overlap between diffracted disks transfers information for phase reconstruction experiments. There are a variety of ways to reconstruct the phase of the sample from 4D-STEM experiments, and the ideal approach will depend on the structure, field of view, and simulation parameters. The simpilest approach is a DPC reconstruction. As compared to the experimental set-up in the [DPC](#differential-phase-contrast) section, the segmented detectors are replaced with a pixelated detector for more accurate center of mass and thus phase determination. More complicated reconstruction algorithms include tilt-corrected bright field (or parallax), where virtual images from each pixel in the central disk are aligned to create a high-signal to noise phase reconstruction {cite:p}`yu2024dose, varnavides2024tilt`, and ptychograpy {cite:p}`yang2017electron, varnavides2023iterative`. Iterative electron ptychography referes to a family of algoirthms where the probe and object are reconstructed from the 4D-STEM dataset. In this method the maximum scattering angle is set by the highest spatial frequency recorded in the detector, so it is possible to form an image with higher resolution than real space sampling {cite:p}`jiang_electron_2018`.
Loading
Loading