Thinking about CTF

One of the question we will ask when setting up collections is what range of defocuses to target for imaging.

This is an important question and the answer affects the entire rest of data processing, so careful consideration should be taken when deciding.

Most of us know the tl;dr

higher defocus = higher contrast

lower defocus = higher resolution

and the inverses.

Some of us will know this handy rule-of-thumb from Radostin Danev:

And hopefully many of us are using this handy CTF calculator from Takanori Nakane at the MRC-LMB

https://3dem.github.io/relion/ctf.html

or maybe this more complex Excel spreadsheet from Henning Stahlberg:

https://www.c-cina.org/tools/soft/ctf-simulation/


But I wanted to provide some of the resources that I consider when trying to dive deeper in reasonable ranges and targets to select.

Aliasing

This is the main aspect of the post I would like to convince you to consider in your next microscope session. Aliasing is when high-frequency signals mimic or “alias” low-frequency signals due to insufficient sampling. The most common real-life example of aliasing is the “Moire effect” you can see when you use your smartphone to take a picture of another display such as your computer monitor.

In the case of the CTF in Cryo-EM, the frequency is a function of defocus and spectral frequency (1 / resolution), and the sampling is a function of the box-size and the pixel size.

Frequency

We can express the CTF as function of spatial frequency \vec{k} as (from Rohou 2015):

CTF(\lambda, \vec{k}, \Delta z, C_s, \Delta \phi, a_c) = -\sin[\chi(\lambda, |\vec{k}|, \Delta z, C_s, \Delta \phi, a_c)]

with \chi(\dots) denoting the wave aberration function:

\chi(\lambda, |\vec{k}|, \Delta z, C_s, \Delta \phi, a_c) = \pi \lambda |\vec{k}|^2 (\Delta z - \frac{1}{2}\lambda^2|\vec{k}|^2C_s) + \Delta \phi + \tan^{-1}(a_c / \sqrt{1 - a_c^2})

Where \lambda is the electron wavelength, \Delta z is our defocus, C_s is the spherical aberration, \Delta \phi is an additional phase-shift (which we will ignore here), and a_c is the fraction of amplitude contrast.

From our early maths studies we have that the period of \sin(Bx) is \frac{2\pi}{B}, so we have for the period of the CTF as a function of absolute spatial frequency (L(|\vec{k}|)).

L(|\vec{k}|) = \frac{2\pi|\vec{k}|}{\chi(\lambda, |\vec{k}|, \Delta z, C_s, \Delta \phi, a_c)}

Sampling

In Digital Signal Processing the Nyquist-Shannon theorem tells us that to faithfully represent a function with a maximal frequency B hertz we need a sampling rate of at least 2B. The sampling rate of the Fourier Transform of our reconstruction is given by:

f_s = \frac{apix \times boxsize}{2}

Where the denominator comes from the symmetry of the Fourier transform, and our sampling step size is given by:

\Delta f_s = \frac{1}{apix \times boxsize}

Which gives us the range of frequencies we expect of DC to Nyquist.

All together now

Putting what we know about the CTF frequencies and how the FFT is sampled we can now solve for the resolution at which the CTF will begin to alias for a given field of view (the box size in Angstrom units).

\frac{2}{f_s} = L

We can expand the terms and rearrange this into a proper polynomial of |\vec{k}|:

\frac{\lambda^3C_s}{2}|\vec{k}|^4 - \lambda \Delta z |\vec{k}|^2 + f_s |\vec{k}| + \frac{\tan^{-1}(a_c / \sqrt{1 - a_c^2})}{\pi} = 0

Solving this will gives us the resolution for aliasing for a given field of view. I have calculated the threshold for a range of defocuses against fields of view below.

By setting the spatial frequency to Nyquist |\vec{k}| = 1 / (2 \times apix) we can solve the polynomial now for box size and determine for a given magnification the minimum box size we need to ensure there will be no aliasing at a given defocus as well. The formula here being:

box size = \frac{\lambda \Delta z}{apix^2} - \frac{\lambda^3C_s}{8\cdot apix^4} - \frac{4}{\pi}\tan^{-1}(a_c / \sqrt{1 - a_c^2})

I have also calculated some of these values as well below:

Delocalisation

The other point that needs to be considered, once you have taken into account the aliasing effect, is the delocalisation of information by the CTF. This delocalisation is easily seen as the fringes or halos you see in highly defocused micrographs around sharp edges. Some times when the resolution of the micrograph is high you can also see “ghosts”, white colored shadows of usually lattices, far displaced from their related negative contrast density. This delocalisation requires us to even further extend or box size so as to capture all of the delocalised signal. The figure from this paper by Bob Glaeser illustrates how far the signal can extend from the ideal density:

We can characterize the delocalisation mathematically by first taking the derivative of the wave-aberration function we described above.

\frac{\delta (\chi(\dots))}{\delta |\vec{k}|} = 2\pi \lambda |\vec{k}| (\Delta z - \lambda^2 |\vec{k}|^2 C_s)

The amount of delocalisation here is related to the period of a sine-wave of the above derivative in reciprocal space (real-space in this case). So this becomes:

delocalisation = \lambda |\vec{k}|(\Delta z + \lambda^2 |\vec{k}|^2 C_s)

This gives us the additional amount we need to add to our field of view so that we do not throw away any of the displaced information caused by the defocus and CTF, and as plotted below, both higher resolution and higher defocus require us to pad our particles larger and larger to contain the total signal:

Conclusion

I hope this gives you a lot more to think about, and will help you when it comes to deciding pixel size / magnification, and a target defocus range for your next session.

If you have any thoughts, comments, questions, or suggestions. Please let us continue the discussion for those interested below.

Great info! And very well structured!

CTF Explorer

So to make these concepts a little more practical for users I made a small application that will let you fill in your data collection parameters and up to 20 defocuses and it will generate some plots related to the discussion above.

Hopefully you will find it useful and a little cool to play around with.

If you click the button below it will launch an instance so that you don’t have to install anything, but it can take a little bit of time to load up, just be patient.
Binder

The code is here:

2 Likes