# Contrast transfer function

Typical contrast transfer function observed from an electron micrograph

The contrast transfer function[1][2][3] describes how an object examined in a transmission electron microscope is imaged, essentially providing a description of distortions due to imperfect image formation by the microscope. 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 cryo-electron microscopy. Its equivalent in light-based optics, is the optical transfer function.

## Phase and Amplitude contrast

In transmission electron tomography (TEM), electrons are used in the same capcity as light is used in optical microscopy, but by way of their much smaller deBroglie wavelength, they are able to render much smaller details. As indicated by this notion, electrons carry some wave-characteristics, which manifest themselves upon measurement at the detector. To fully understand the effects caused by these characteristics, one must consider an electron as a wave which is subject to change upon passing through regions of altering properties, much like a light wave is refracted upon transition between regions of varying refractive index. When the electron wave property is changed by the sample, we can imagine both its phase and amplitude to be changed, and the manifestation of these separate changes in the measured intensity is known as phase and amplitude contrast, respectively. To correct for any instrumental distortions, we would therefore like to have a description of how both of these sample-induced changes manifested in the intensity measurement, i.e. how phase and amplitude contrast produced by the sample is converted to the measured intensity.

Compared to using light-based (optical) microscopy, electrons interact much more readily with the examined sample, and as a consequence the sample in transmission electron microscopy must be extremely thin, in some cases as low as ~100 nm. Being so thin, one can apply the approximation that the imaged sample is itself a 2D-projection, in place of the actual 3D-volume examined. In general this is needed to apply the so-called phase-object approximation [4] (POA), which states that the sample alters the electrons wavefunction solely by inducing a position-dependent phase shift, without changing its amplitude. If we further assume that transmitted electron experienced a small (as defined by the small-angle approximation) such phase shift, we applied the weak-phase-object approximation (WPOA). This approximation is essential to arrive[5] at a measured intensity $I$ which can be described in analytical form as

$I(x,y) = A^2\cdot\left[\left(1+\cos\gamma(s)\right)^2 +\left(\phi(x,y)+\sin\gamma(s)\right)^2\right]$

where $\phi(x,y)$ is the phase shift introduced by the sample, and $\gamma(s)$ is the phase-shift introduced by the lenses within the microscope. The latter is in fact a measurement artifact which we would like to estimate and correct for, which is then precisely the CTF function. It can be seen from this that the CTF essentially describes the additional modulation of phase contrast into measured amplitude contrast, which is produced as a consequence of the microscope being non-ideal.

So far we have only described how the measured intensity dependes on the phase-shift of the wavefunction which was produced upon interaction with the sample, known as phase contrast, because this is the type of intensity modulation the contrast transfer function concerns. In fact the phase-object approximation essentially stated that there was only phase contrast to consider, neglecting any amplitude contrast. To make the distinction clear one should note that amplitude contrast also influences the measured intensity to some extent, by affecting the amplitude of the wavefunction through absorption and scattering by the sample.

## Mathematical form

The contrast transfer function is most easily handled in the frequency domain, signifying that we examine it as a modulation of the fourier transformed image. This brings it to the analytical form (not including the envelope function)

\begin{align} \operatorname{CTF}(\vec{s}) &= A\cdot\sin{ \left( \gamma(\vec{s}) + k(x,y)\right)} \Leftrightarrow \\ &= \sqrt{1 - A^2 } \cdot \sin{ \left( \gamma(\vec{s}) \right)} + A \cdot \cos{ \left( \gamma(\vec{s}) \right)} \end{align}

where A is the amplitude contrast,[6] and $k$ is some phase shift (note that this is a phase of the CTF, introduced by the microscope, and $\neq\phi$ from the preceding introduction) related to $A$ via

$k = \arcsin{(A)}$

In order to describe the distorted imaging of the sample by the TEM microscope, we need a theoretical foundation for how the image is projected onto the detector, a concept known as image formation. Most implementations of the CTF as a correction for image aberrations in TEM, considers only two underlying phenomena as significantly contributing to the distorted image formation, namely spherical aberration due to the objective lens being non-ideal and defocus due to misadjusted focal length of the objective lens.

### 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 a as 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 tranversal 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 effecively 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 straight forward 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 longitudal 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<, 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}$

### Complete form

These contributions result in the following functional form[5] of$\gamma(\vec{s})$

$\gamma(\vec{s}) = \; \gamma(s, \theta) = \; -\frac{\pi}{2} \, C_s \, \lambda^3 \, s^4 \; + \; \pi \lambda \, z(\theta) \, s^2$

where $s$ is frequency (as the above form of the CTF is as defined in the frequency domain, and applied to the fourier transform of the recorded image), $C_s$ is the spherical aberration, $\lambda$ is the wavelength of the electron beam (usually calculated from the accelrating potential of the microscope) and $z$ is the amount of defocus (using the convention that underfocus is positive and overfocus is negative)[6][7]

In the presence of astigmatism in the recorded image, this can be incoorpated into the defocus correction by allowing the defocus to depend explicitly on the angle θ, around a principal astigmatic angle θast given by:[8][9]

$z(\theta) \; = \; z_{\mathrm{avg}} + \frac{z_{\mathrm{diff}}}{2} \cos{\left( 2(\theta - \theta_{\mathrm{ast}}) \right)} \; = \; z_1 \!\cdot\! \cos^2{\left( \theta - \theta_{\mathrm{ast}} \right)} \; + \; z_2 \!\cdot\! \sin^2{\left( \theta - \theta_{\mathrm{ast}} \right)}$

where $z_{\mathrm{avg}} = \frac{z_1 + z_2}{2}$ is the average defocus and $z_{\mathrm{diff}} = z_1 - z_2$ is the difference between the maximal and minimal defocus in the CTF. Where the defocal difference is defined such that:

$\left| z_2 \right| > \left| z_1 \right| \;$ or $\; \frac{z_2}{z_1} > 1$

The estimation of the CTF function under assumption of this functional form requires the determination of the spherical aberration and electron wavelength from the experimental setup, and the further estimation of 4 inherent parameters from the collected image; the amplitude contrast, the CTF phase angle, and the two defocii with together determine the degree of astigmatism. The estimation of these parameters is inherently convoluted with the additional estimation of noise and attenuation (envelope) parameters, and in the literature a clear distinction is not always made between the CTF function parameters and these additional parameters.