# Contrast transfer function

The contrast transfer function (CTF) mathematically describes how aberrations in a transmission electron microscope (TEM) modify the image of a sample. This contrast transfer function (CTF) sets the resolution of high-resolution transmission electron microscopy (HRTEM), also known as phase contrast TEM.
By considering the recorded image as a CTF-degraded true object, describing the CTF allows the true object to be reverse-engineered. This is typically denoted CTF-correction, and is vital to obtain high resolution structures in three-dimensional electron microscopy, especially electron cryo-microscopy. Its equivalent in light-based optics is the optical transfer function.

## Phase contrast in HRTEM

The contrast in HRTEM comes from interference in the image plane between the phases of scattered electron waves with the phase of the transmitted electron wave. Complex interactions occur when an electron wave passes through a sample in the TEM. Above the sample, the electron wave can be approximated as a plane wave. As the electron wave, or wavefunction, passes through the sample, both the phase and the amplitude of the electron beam is altered. The resultant scattered and transmitted electron beam is then focused by an objective lens, and imaged by a detector in the image plane.
Detectors are only able to measure the amplitude, not the phase directly. However, with the correct microscope parameters, the phase interference can be indirectly measured via the intensity in the image plane. Electrons interact very strongly with crystalline solids. As a result, the phase changes due to very small features, down to the atomic scale, can be recorded via HRTEM.

## Contrast transfer theory

Contrast transfer theory provides a quantitative method to translate the exit wavefunction to a final image. Part of the analysis is based on Fourier transforms of the electron beam wavefunction. When an electron wavefunction passes through a lens, the wavefunction goes through a Fourier transform. This is a concept from Fourier optics.
Contrast transfer theory consists of four main operations:
* Take the Fourier transform of the exit wave to obtain the wave amplitude in back focal plane of objective lens
* Modify the wavefunction in reciprocal space by a phase factor, also known as the Phase Contrast Transfer Function, to account for aberrations
* Inverse Fourier transform the modified wavefunction to obtain the wavefunction in the image plane
* Find the square modulus of the wavefunction in the image plane to find the image intensity (this is the signal that is recorded on a detector, and creates an image)

## Mathematical form

If we incorporate some assumptions about our sample, then an analytical expression can be found for both phase contrast and the phase contrast transfer function. As discussed earlier, when the electron wave passes through a sample, the electron beam interacts with the sample via scattering, and experiences a phase shift. This is represented by the electron wavefunction exiting from the bottom of the sample. This expression assumes that the scattering causes a phase shift (and no amplitude shift). This is called the Phase Object Approximation.

### The exit wavefunction

Following Wade's notation, the exit wavefunction expression is represented by:
    $\tau (r,z)=\tau _{o}\exp[-i\pi \lambda \int dz'U(r,z')]$
    $\tau _{o}=\tau (r,0)$
    $U(r,z)=2mV(r,z)/h^{2}$
Where the exit wavefunction τ is a function of both $r$ in the plane of the sample, and $z$ perpendicular to the plane of the sample. $\tau _{o}$ represents the wavefunction incident on the top of the sample. $\lambda$ is the wavelength of the electron beam, which is set by the accelerating voltage. $U$ is the effective potential of the sample, which depends on the atomic potentials within the crystal, represented by $V$.
Within the exit wavefunction, the phase shift is represented by:
    $\phi (r)=\pi \lambda \int dz'U(r,z')$
This expression can be further simplified taken into account some more assumptions about the sample. If the sample is considered very thin, and a weak scatterer, so that the phase shift is << 1, then the wave function can be approximated by a linear Taylor polynomial expansion. This approximation is called the Weak Phase Object Approximation.
The exit wavefunction can then be expressed as:
    $\tau (r,z)=\tau _{o}[1+i\phi (r)]$

### The phase contrast transfer function

Passing through the objective lens incurs a Fourier transform and phase shift. As such, the wavefunction on the back focal plane of the objective lens can be represented by:
    $I(\theta )=\delta (\theta )+\Phi K(\theta )$
$\theta$ = the scattering angle between the transmitted electron wave and the scattered electron wave
$\delta$ = a delta function representing the non-scattered, transmitted, electron wave
$\Phi$ = the Fourier transform of the wavefunction's phase
$K(\theta )$ = the phase shift incurred by the microscope's aberrations, also known as the Contrast Transfer Function:
    $K(\theta )=\sin[(2\pi /\lambda )W(\theta )]$ $W(\theta )=-z\theta ^{2}/2+C_{s}\theta ^{4}/4$
$\lambda$ = the relativistic wavelength of the electron wave, $C_{s}$ = The spherical aberration of the objective lens
The contrast transfer function can also be given in terms of spatial frequencies, or reciprocal space. With the relationship θ=λk{\textstyle \theta =\lambda k}, the phase contrast transfer function becomes:
    $K(k)=\sin[(2\pi )W(k)]$ $W(k)=-z\lambda k^{2}/2+C_{s}\lambda ^{3}k^{4}/4$
$z$ = the defocus of the objective lens (using the convention that underfocus is positive and overfocus is negative), $\lambda$ = the relativistic wavelength of the electron wave, $C_{s}$ = The spherical aberration of the objective lens, $k$ = the spatial frequency (units of m$^{−1}$)

### Spherical aberration

Spherical aberration is a blurring effect arising when a lens is not able to converge incoming rays at higher angles of incidence to the focus point, but rather focuses them to a point closer to the lens. This will have the effect of spreading an imaged point (which is ideally imaged as a single point in the gaussian image plane) out over a finite size disc in the image plane. Giving the measure of aberration in a plane normal to the optical axis is called a transversal aberration. The size (radius) of the aberration disc in this plane can be shown to be proportional to the cube of the incident angle (θ) under the small-angle approximation, and that the explicit form in this case is
    $r_{s}=C_{s}\cdot \theta ^{3}\cdot M$
where $C_{s}$ is the spherical aberration and $M$ is the magnification, both effectively being constants of the lens settings. One can then go on to note that the difference in refracted angle between an ideal ray and one which suffers from spherical aberration, is
    $\alpha _{s}=\arctan \left({\frac {b}{R}}\right)-\arctan \left({\frac {b}{R+r_{s}}}\right)$
where $b$ is the distance from the lens to the gaussian image plane and $R$ is the radial distance from the optical axis to the point on the lens which the ray passed through. Simplifying this further (without applying any approximations) shows that
    $\alpha _{s}=\arctan \left({\frac {br_{s}}{R^{2}+Rr_{s}+b^{2}}}\right)$
Two approximations can now be applied to proceed further in a straightforward manner. They rely on the assumption that both $r_{s}$ and $R$ are much smaller than $b$, which is equivalent to stating that we are considering relatively small angles of incidence and consequently also very small spherical aberrations. Under such an assumption, the two leading terms in the denominator are insignificant, and can be approximated as not contributing. By way of these assumptions we have also implicitly stated that the fraction itself can be considered small, and this results in the elimination of the $\arctan$ function by way of the small-angle approximation;
    $\alpha _{s}\approx \arctan \left({\frac {br_{s}}{b^{2}}}\right)\approx {\frac {br_{s}}{b^{2}}}={\frac {r_{s}}{b}}={\frac {C_{s}\cdot \theta ^{3}\cdot M}{b}}$
If the image is considered to be approximately in focus, and the angle of incidence $\theta$ is again considered small, then
    ${\frac {R}{f}}\approx \tan \left(\theta \right)\approx \theta ~~{\text{and}}~~M\approx {\frac {b}{f}}$
meaning that an approximate expression for the difference in refracted angle between an ideal ray and one which suffers from spherical aberration, is given by
    $\alpha _{s}\approx {\frac {C_{s}\cdot R^{3}}{f^{4}}}$

### Defocus

As opposed to the spherical aberration, we will proceed by estimating the deviation of a defocused ray from the ideal by stating the longitudinal aberration; a measure of how much a ray deviates from the focal point along the optical axis. Denoting this distance $\Delta b$, it is possible to show that the difference $\alpha _{f}$ in refracted angle between rays originating from a focused and defocused object, can be related to the refracted angle as
    ${\sqrt {R^{2}+b^{2}}}\cdot \sin(\alpha _{f})=\Delta b\cdot \sin(\theta '-\alpha _{f})$
where $R$ and $b$ are defined in the same way as they were for spherical aberration. Assuming that $\alpha _{f}<<\theta '$ (or equivalently that $|b\cdot \sin(\alpha _{f})|<<|R|$ ), we can show that
    $\sin(\alpha _{f})\approx {\frac {\Delta b\sin(\theta ')}{\sqrt {R^{2}+b^{2}}}}={\frac {\Delta b\cdot R}{R^{2}+b^{2}}}$
Since we required $\alpha _{f}$ to be small, and since $\theta$ being small implies $R<<b$, we are given an approximation of $\alpha _{f}$ as
    $\alpha _{f}\approx {\frac {\Delta b\cdot R}{b^{2}}}$
From the thin-lens formula it can be shown that $\Delta b/b^{2}\approx \Delta f/f^{2}$, yielding a final estimation of the difference in refracted angle between in-focus and off-focus rays as
    $\alpha _{f}\approx {\frac {\Delta f\cdot R}{f^{2}}}$

## Examples

The contrast transfer function determines how much phase signal gets transmitted to the real space wavefunction in the image plane. As the modulus squared of the real space wavefunction gives the image signal, the contrast transfer function limits how much information can ultimately be translated into an image. The form of the contrast transfer function determines the quality of real space image formation in the TEM.
This is an example contrast transfer function. There are a number of things to note:
* The function exists in the spatial frequency domain, or k-space
* Whenever the function is equal to zero, that means there is no transmittance, or no phase signal is incorporated into the real space image
* The first time the function crosses the x-axis is called the point resolution
* To maximize phase signal, it is generally better to use imaging conditions that push the point resolution to higher spatial frequencies
* When the function is negative, that represents positive phase contrast, leading to a bright background, with dark atomic features
* Every time the CTF crosses the x-axis, there is an inversion in contrast
* Accordingly, past the point resolution of the microscope the phase information is not directly interpretable, and must be modeled via computer simulation

### Scherzer defocus

The defocus value (z{\textstyle z}) can be used to counteract the spherical aberration to allow for greater phase contrast. This analysis was developed by Scherzer, and is called the Scherzer defocus.
$z_{s}=(C_{s}\lambda )^{1/2}$
The variables are the same as from the mathematical treatment section, with $z_{s}$ setting the specific Scherzer defocus, $C_{s}$ as the spherical aberration, and λ as the relativistic wavelength for the electron wave.
The figure in the following section shows the CTF function for a CM300 Microscope at the Scherzer Defocus. Compared to the CTF Function showed above, there is a larger window, also known as a passband, of spatial frequencies with high transmittance. This allows more phase signal to pass through to the image plane.

### Envelope function

The envelope function represents the effect of additional aberrations that damp the contrast transfer function, and in turn the phase. The envelope terms comprising the envelope function tend to suppress high spatial frequencies. The exact form of the envelope functions can differ from source to source. Generally, they are applied by multiplying the Contrast Transfer Function by an envelope term Et representing temporal aberrations, and an envelope term Es representing spatial aberrations. This yields a modified, or effective Contrast Transfer Function:
$K_{eff}(k)=E_{t}E_{s}(\sin[(2\pi /\lambda )W(k)]$
Examples of temporal aberrations include chromatic aberrations, energy spread, focal spread, instabilities in the high voltage source, and instabilities in the objective lens current. An example of a spatial aberration includes the finite incident beam convergence.
As shown in the figure, the most restrictive envelope term will dominate in damping the contrast transfer function. In this particular example, the temporal envelope term is the most restrictive. Because the envelope terms damp more strongly at higher spatial frequencies, there comes a point where no more phase signal can pass through. This is called the Information Limit of the microscope, and is one measure of the resolution.
Modeling the envelope function can give insight into both TEM instrument design, and imaging parameters. By modeling the different aberrations via envelope terms, it is possible to see which aberrations are most limiting the phase signal.
Various software have been developed to model both the Contrast Transfer Function and Envelope Function for particular microscopes, and particular imaging parameters.

## Linear imaging theory vs. non-linear imaging theory

The previous description of the contrast transfer function depends on linear imaging theory. Linear imaging theory assumes that the transmitted beam is dominant, there is only weak phase shift by the sample. In many cases, this precondition is not fulfilled. In order to account for these effects, non-linear imaging theory is required. With strongly scattering samples, diffracted electrons will not only interfere with the transmitted beam, but will also interfere with each other. This will produce second order diffraction intensities. Non-linear imaging theory is required to model these additional interference effects.
Contrary to a widespread assumption, the linear/nonlinear imaging theory has nothing to do with kinematical diffraction or dynamical diffraction, respectively.
Linear imaging theory is still used, however, because it has some computational advantages. In Linear imaging theory, the Fourier coefficients for the image plane wavefunction are separable. This greatly reduces computational complexity, allowing for faster computer simulations of HRTEM images.