# CTF Estimation

In cryo-EM imaging, protein samples frozen in ice are imaged using a transmission electron beam. The protein molecules are not substantially more opaque to electrons than the ice, so simply passing the beam through the sample would not result in significant contrast in the image. Instead, the microscope is operated in "phase contrast" mode, where it is not the brightness but actually the interference of the electron beam (with itself) going through the sample that creates contrast, and allows for imaging differences in density rather than opaqueness.

As electrons interact with the sample under study, there is a finite probability that they will scatter (i.e. their path will be changed). This scattering can be elastic (the electron keeps all of its energy) or inelastic (the electron loses some energy to the sample). Only the elastically scattered electrons contribute usefully to the resulting "phase contrast" image, so the following discussion considers elastically scattered electrons only.

In quantum mechanics, electrons are modeled as a "wavefunction" - an oscillatory function of both space and time, the squared magnitude of which corresponds to the probability of finding the electron at a given position/moment, if a measurement were to be made. When an electron is elastically scattered by a cryo-EM sample, this wavefunction is scattered in many directions simultaneously, and the amount of signal scattered at a particular angle is proportional to the spatial frequency spectrum of the sample. For example, if a sample contains a lot of signal at high spatial frequencies, then more of the electron wavefunction will be scattered at high angles. These scattered waves are subsequently focused by various lenses in the microscope to form an image, but because of their different scattering angles, they traverse a different total path length to arrive at the electron detector. These differences in path length manifest as phase shifts in the electron wavefunction, causing the scattered components of the wavefunction to interfere with each other. Depending on spatial frequency, this interference can be constructive, destructive, or inverting, and as a result, some spatial frequencies show up in the resulting image more strongly than others, and some are flipped in sign. This phenomenon is mathematically modelled by the microscope's Contrast Transfer Function (CTF). It is important to estimate and correct for the CTF during cryo-EM image processing, otherwise the achievable reconstruction will be of very limited resolution.

The CTF model used in cryoSPARC is as follows,

$\text{CTF} = - \cos \left(\pi \Delta z \lambda_e f^2 - \frac{\pi}{2} C_s \lambda_e^3 f^4 + \phi \right)$

where $\Delta z$is defocus, $\lambda_e$is the wavelength of the incident electrons, $C_s$is spherical aberration, and $f$is spatial frequency. $\phi$represents a phase shift factor, which is important e.g. when a phase plate is used. Notice that the cosine argument is a function of defocus, so defocus affects the relative strength of different spatial frequencies in the resulting image. In practice, low defocus tends to lead to less contrast at low spatial frequencies. Given the amount of noise present in cryo-EM images, this means that particles at low defocus are harder to see and pick out (both manually and algorithmically) than particles at high defocus. For an example of this phenomenon, see the figure below.

One very important concept to note about the CTF is that the dominant term in the CTF is due to defocus. Defocus can be caused by changing the power of the lenses in the microscope so that the actual sample is no longer in focus. Conversely, physically moving the sample up and down in the microscope column moves it towards/away from the focal plane, causing exactly the same effect as defocus. This is important because it means that if a sample is not flat, the different parts will be at different levels of defocus.

It is well-known that the vast majority of cryo-EM samples are not "flat". Particles tend to concentrate near the air-water interfaces prior to the sample being frozen, and the ice surface itself is often nonplanar. Recalling that defocus affects the CTF, this means that a single image can contain particles with different defoci and therefore different CTFs. CryoSPARC provides a patch-based CTF estimator, which examines many different areas in the micrograph to compute a "defocus landscape", to combat this issue. The patch CTF estimator requires no prior information about particle locations within the micrograph, and can be used immeditely after motion correction. It can even work on tilted samples without knowing about the tilt beforehand.