Finding Defocus with Ctfplotter
for Three Example Tilt Series
(IMOD 4.10)
University of Colorado,
Boulder
This document will guide you through running Ctfplotter to find defocus for three
different tilt series, one where the signal of the CTF is very strong, one
where it is weak, and one where it is sometimes strong and sometimes weaker.
It will explain some of the most important aspects of
the process. For more details, consult the
Guide to Ctfplotter, which fully
explains each aspect of the interface and also has screen shots based on these
three data sets. Labels in the Etomo or 3dmod interface are shown in Bold, and entries in fields are shown in italics.
Determining Defocus in a Tilt Series from a K2 Camera:
This tilt series,
from Cindi Schwartz, is of a flagellum of a Giardia cell, taken with a K2 camera on
a Krios microscope at Janelia Farm. The total dose was 26 electrons/square
Angstrom. Images were taken in superresolution mode with an exposure time
of 0.5 sec to avoid having to save and align subframes, and reduced by a factor
of 4 with antialiasing. With this protocol, they may have somewhat better
high-frequency information than a typical tilt series taken in counting mode
without binning, so the power spectra may be particularly good here.
-
Download the sample data set from our web site.
-
Move the data set file "K2-CTF-Data.tar.bz2" to the directory where you want to
work on it. Its contents will unpack into a subdirectory named "K2-ctf".
-
cd to the directory with the file
- Enter the command:
imoduntar K2-CTF-Data.tar.bz2
or, anywhere except on Windows without Cygwin, you can use
tar -xjf K2-CTF-Data.tar.bz2
- Enter the data set directory with:
cd K2-ctf
- Start Etomo with the command
etomo WTI042413_1series4.edf
- Open the Final Aligned Stack page and switch to the Correct CTF tab.
Notice that a spherical aberration of 0 is allowed, and is
appropriate if data were collected on an aberration-corrected microscope,
as these were.
- The Expected defocus has already been set to 6.0 in this data set.
- The Config file has already been selected to access a configuration
file listing noise files in the "Janelia" subdirectory of the data set directory.
- Press Run Ctf Plotter. Note that the CTF is analyzed in the raw
stack, so the aligned stack does not need to exist before running
Ctfplottter.
- Three windows open: the plotter window, a dialog for setting
parameters controlling which views are analyzed and various aspects of
the power spectrum computation, and a dialog for setting parameters for
fitting to the power spectra.
- The magenta curve in the plotter window shows the rotationally
averaged power spectrum plotted versus spatial frequency. The
green curve is a fitted curve, which in general may
not fit well until fitting parameters have been adjusted.
- The units of spatial frequency along the X axis are reciprocal pixels and range
from 0 to 0.5/pixel. Below the frequency labels are the corresponding
values for periodicity (resolution) in Angstroms.
- Power is always very high at low frequencies, so the first operation is to zoom
up the part of the curve that shows the CTF effect.
Click the mouse just under the hump in the curve after 0.1/pixel and drag the
zoom area out to the right edge, just under the curve, so that the Y axis range
is about -0.1 to 0.5.
- Since the fitting looks good already, switch to use the Current
defocus estimate in the Angle Range and Tile Selection dialog.
- The frequency of the first zero
determined from the fit is shown at the top of the plotter window after Z:,
and the corresponding defocus is shown after D:.
It is ~4.6 microns instead of the nominal 6 microns. The fitting
range in the Fitting Parameters dialog starts at a low frequency
appropriate for the higher nominal defocus but too early for this lower
actual defocus. It is best if the fitting is done to a
linearly falling part of the curve and excludes the portion before that curving
away from a line. Press Start to change X1 Starts to
0.17.
- It is not helpful to see the curves much beyond where the fitting
starts, so the graph can be zoomed again. Click a bit above and to the
left of where the fitting starts (which is at 0.17/pixel and 0.3 in Y) and
drag out to just below the right end of the curves to give a Y axis range
of about -0.05 to 0.35.
- This average over many views appears to have good signal out to the
fourth zero, but the useful range for fitting may be less when fewer views
are averaged. For now, change X2 Ends to
0.4, just past the frequency of the third zero. Press the
Enter key or Apply (in either dialog) to fit with a changed
value.
- Notice the entry for Error: on the output line in the plotter window,
which shows the mean deviation between the power spectrum and the fitted curve
over the fitting range, in the log units of the Y axis.
- Turn on Vary exponent of CTF function; the fit looks slightly
better and the error drops by more than 10% (e.g., from 0.0039 to 0.0033),
so that is an appropriate parameter to include when fitting these
data.
- To assess whether fitting to a single image is possible, go back to the
Angle Range and Tile Selection dialog and change the Number of
views to fit: to a smaller value, like 9. Notice the line
below this spin box, summarizing the angular range and view numbers
being fit. Click the down arrow of the spinner to reduce the number of
views progressively down to 1. The curve does become noisier, but the
fitting still appears good out to ~0.43/pixel.
- To see whether this is still the case throughout the tilt range, leave
the number of views at 1 and
press Step Up to go to the positive end of the tilt range
then Step Down to go back down to the negative end of the range.
The power spectrum looks good and the fitting appears reliable at each
tilt angle.
- If the first zero appears elevated when first stepping to an angle
(such as 61 degrees), press Apply one or more times to see if the
fitting to the baseline improves. In general, repeatedly computing the
spectrum and fit in this
way with each new defocus is a good way to assess the stability of fitting.
- This assessment only took a few steps because the Step view
range spin box was left at its initial value of 11. You can make this
value smaller to see more angles, or 1 to step through every angle.
- Most of the single view spectra show signal out close to the fourth
zero, so change the entry for X2 Ends in the Fitting Params
dialog to 0.44.
- Turn on Fit each view separately and press Autofit All
Views. The fitting goes in two directions from the current
angle, unless that angle is at one end of the range. The table is filled
in as the fitting proceeds.
- Press Graph values. A graph of defocus versus tilt angle pops
up, showing variations of over 1 micron above 40 degrees. You can
left-click at a point in this window and a popup will appear with its
coordinates (you have to left-click again to dismiss the popup).
- Scroll the table in the Angle Range dialog to get to these
angles with the big Double-click a series of
lines in the table to check the curve-fitting in this region, or set the
Step view range to 1 and use Step Up and Step
Down to look at successive views. The curve-fitting is
clearly correct; the defocus changes from image to image have been measured
accurately.
- Now that you have gone through the basics of determining defocus, the
next step is to assess whether astigmatism can be determined as well.
When there is astigmatism, the defocus varies with direction. In a 2-D
power spectrum, the Thon rings (which correspond to the dips at CTF zeros
in the rotationally averaged 1-D power spectra here) are approximately
elliptical instead of circular. Astigmatism thus has two parameters, the
difference between the maximum and minimum defocus and the angle of the
axis of maximum defocus. Ctfplotter finds astigmatism by measuring
the defocus in 1-D power spectra rotationally averaged over a restricted
angular ranges of the 2-D power spectrum, referred to as wedges.
- Return to low tilt by entering 0 in the Middle tilt
angle text box. (The program will adjust the entry to the nearest
actual angle.)
- Press the + button to the left of Find astigmatism
in the Fitting Params dialog
to open the controls for finding astigmatism.
- Notice that Min views for astigmatism has the default value
of 5. This means that wedge spectra will be combined from 5 views
when defocus is being found for single views. It is generally advisable to
find astigmatism from more views than those used for finding defocus,
because the wedge spectra have less data in them than full 1-D
spectra, and combining more views will keep the signal-to-noise ratio
up and make the CTF fitting comparably reliable. See the
Guide to Ctfplotter for more
details on this point.
- Turn on Find astigmatism and watch the wedge spectra as the
angle of the wedge changes. It is important to see these wedge
spectra initially to make sure that the fitting looks good and that
the spectrum does not take on a strange shape in some part of the
angular range. The whole process is iterated because the astigmatism is
rather high for this data set.
- After the analysis, the program computes a spectrum for the single
selected view that is fully adjusted for the astigmatism and measures
defocus from that. Note that the CTF signal now appears clearly all
the way out to 0.5/pixel.
- Check the fitting to the wedges at a few other angles by typing
them into the Middle tilt
angle text box, for example 30, 60, -30,
and -60
- Return to zero tilt by entering 0 for the Middle tilt
angle. It is generally advisable to start autofitting at zero tilt
because fitting is likely to be more challenging at high tilt.
.
- Press Autofit All Views to fit to all views. The
programs asks if you want to remove all existing entries from the
table. Press Yes.
- You can turn off Show wedge fits in the Fitting
Params dialog to save time if you are confident that the wedge
fitting is reliable. It can be turned on and off during autofitting,
so one approach is to turn it off for lower angles and turn it back on
as it approaches high tilt.
- Press Graph values; this time there are graphs for the
astigmatism amount and axis angle as well as the defocus. It is not
clear how much of the view-to-view variablity in the latter two
parameters is real. There would be considerably more variability
with Min views for astigmatism set to only 1.
- Press Save to File and exit Ctfplotter and Etomo.
Determining Defocus in a Tilt Series from a CCD camera:
This tilt series is of a preparation of bovine papilloma
virus (BPV), taken by Mary Morphew on
an F20 with a US4000 CCD camera at a nominal defocus of -3 microns. It is
the series used in the Ctfplotter Guide to illustrate program operations.
Here, it illustrates some of the challenges in doing CTF correction on
relatively low-defocus tilt series take with a CCD, which provides poorer
information at high frequencies than a direct detector.
-
If you already unpacked the data set for the SIRT tutorial, skip to "Enter the
data set directory".
-
Download the sample data set from our web site.
-
Move the data set file "CTF-SIRT-Data.tar.bz2" to the directory where you
want to work on it. Its contents will unpack into a subdirectory named
"ctf-sirt".
-
cd to the directory with the downloaded file
- Enter the command:
imoduntar CTF-SIRT-Data.tar.bz2
or, anywhere except on Windows without Cygwin, you can use
tar -xjf CTF-SIRT-Data.tar.bz2
- Enter the data set directory with:
cd ctf-sirt
- Start Etomo with the command
etomo bpv_-3_3a.edf
- Open the Final Aligned Stack page and switch to the Correct CTF tab.
- As for the K2 data set, the Config file has already been selected to
access a configuration file listing noise files in the "F20"
subdirectory of the data set directory.
- Set the Expected defocus to 3.0.
- Press Run Ctf Plotter.
- If you press the help icon in the upper right of the Ctfplotter window, it will
bring up the Ctfplotter Guide; the Examples section there shows screen shots
from this data set.
- The power spectrum has two dips in the falling part of the curve, neither of
which correspond to zeros. The dip at the first zero is not evident until
the curve is zoomed. Zoom it up by selecting the top of the second hump in
the magenta curve and dragging the selection region to a point before a frequency of
0.4/pixel and just below the baseline.
- Double-click the left mouse button at the first zero (frequency 0.25/pixel).
The defocus readout on the top line changes to show the defocus corresponding to
this point, 3.6 microns.
- The fitting range
set from the nominal defocus is particularly inappropriate in this case.
Set X1 Starts to 0.185 to fit the falling phase of the power
spectrum back to where its slope changes. Set X2 Ends to 0.29 because the signal falls off there, well before the location of the
second zero. Press the Enter key or Apply to fit with the changes.
- You can now zoom up another step to make it easier to see the CTF signal.
Select a point just above where the two curves diverge on the left and drag the
selection box out to the right edge under the baseline.
- Select Current defocus estimate in the Angle Range dialog now that the
fitting is being done to an appropriate range.
- Press Step Up twice to reach the positive end of the tilt
range, and then Step Down four times to get to the negative end of
the range. The spectra look adequate, although at the positive end of the
range, the dip is less well-defined.
- The dip at the positive end can be made deeper by skipping the last
few tilts. One way to do this is to enter 1-3 in
the Views to skip text box, which makes the tilt range being
analyzed be the same as on the negative side. This is more convenient
than adjusting the Middle tilt angle entry, and when you use
the Step buttons or autofitting, the program will continue to
leave these views out of the fit.
- You can now press Autofit All
Steps to fit to 40-degree ranges at 20-degree intervals.
- Double-click each line in the table to check the result.
In general, if you think that the zero is not correctly found by a fit,
you can double-click where you think the bottom of the dip is located,
and
press Store Defocus in Table to replace the value from the
fit.
- It is possible to find astigmatism in this data set.
Set Min views for astigmatism to 40 first, then turn
on Find astigmatism and step through the
tilt ranges. However, you may find that the fitting is unstable if you
press Apply repeatedly at one high tilt end of the range. It is
easy for the fitting to become unreliable with this data set; for
example, a Baseline fitting order of 0 or 2 does not work
throughout the tilt range.
- Press Save to File and exit Ctfplotter and Etomo.
- If you are going to do the practice SIRT reconstruction with this dataset,
or if you want a corrected stack for any other reason, then select up to 12 CPUs
in the parallel processing table, and press Correct CTF then
Use CTF Correction when it is done.
Determining Defocus in a Tilt Series from a DE-12 Camera:
This tilt series,
from Cindi Schwartz, is of a preparation of microtubules decorated
with the motor protein Eg5,
taken with a DE-12 camera during a demo on the F20 microscope in Boulder. The
tilt series had a 2 degree increment and the total dose was
79 electrons/square
Angstrom. Parts of the series have good signal for determining CTF, but
not all of it.
-
Download the sample data set from our web site.
-
Move the data set file "DE-CTF-Data.tar.bz2" to the directory where you want to
work on it. Its contents will unpack into a subdirectory named "DE-ctf".
-
cd to the directory with the file
- Enter the command:
imoduntar DE-CTF-Data.tar.bz2
or, anywhere except on Windows without Cygwin, you can use
tar -xjf DE-CTF-Data.tar.bz2
- Enter the data set directory with:
cd DE-ctf
- Start Etomo with the command
etomo MTEg5series5D.edf
- Open the Final Aligned Stack page and switch to the Correct CTF tab.
- The Expected defocus has already been set to 6.0 in this data set.
- The Config file has already been selected to access a configuration
file listing noise files in the "DE12-Div2" subdirectory of the data set directory.
- Press Run Ctf Plotter.
- Zoom the power spectrum by clicking on the magenta curve to the left of
0.1/pixel and dragging the selection region to a point before a frequency of
0.4/pixel and just below the baseline.
- The power spectrum shows a clear signal out to the third zero and the green
fitted curve matches the location of the zeros fairly well, so the defocus
estimate is good. Select Current defocus estimate.
- In the Fitting Params dialog, set X1 Starts
to 0.11, since it is not helpful to fit any farther to the left
of the first zero. Set
X2 Ends
to 0.25 to fit out to the third zero, and press the Enter key or Apply.
- Turn on Vary exponent of CTF function; the fit does not look
significantly better
so there is no reason to leave this option on. When
the signal is weak, adding this fifth parameter to the fit can
reduce the reliability and stability of the fits. Turn it off.
- To see if single images can be fit, set the Number of views to fit to 1
. This curve is noisier but the
fitting still seems reasonable.
- To see if fitting is good at other tilt angles, sample some angles by
pressing Step Up and Step Down. You can lower the Step view
range by entry to sample more finely. Most of the negative angles
give plausible fits, but many positive angles have much less signal and
cannot be fit reliably, particularly around 20-30 degrees.
Since inaccurate defocus values can do more harm than good, we need to fit to
multiple views instead, with the reduced goal of estimating the trend in defocus
through the series.
- Now switch Number of views to fit to 4 to fit to 8
degree ranges, and set Step view range by to 2. Step
through some angles in the troublesome range. The signal is still quite
weak in some spectra but the fit appears to work.
- Now assess whether and how to find astigmatism by pressing
the + button next to Find astigmatism. Set Min views
for astigmatism to 8 to start with, to maintain the same
signal-to-noise ratio in the wedge spectra as in the full spectra.
Set Middle tilt angle to 0 and turn
on Find astigmatism. The wedge spectra all look good and the
astigmatism is about 0.6 microns.
- Set Middle tilt angle to 21; notice that the spectrum
changes shape dramatically and that the signal after the first zero
essentially vanishes in some parts of the angular range. The
astigmatism estimate is over 1.0, which is too big a change from zero
degrees to be plausible. These data must be averaged over many more
views to give reliable estimates of astigmatism.
- Set Min views for astigmatism to 20. The fits may
appear better, but then set Middle tilt angle to 45.
The spectrum still flattens out for some wedges, and you will probably
see jumps up and down and failures of the baseline fitting.
- Given this result, we need to fall back to finding one astigmatism
estimate for the whole tilt series. Set Min views for
astigmatism to 100 (or any value as big as the number of
views). The wedge spectra all look good.
- Set the Middle tilt angle of 0
and press Autofit All Steps. Notice that it does not repeat
the wedge fitting at each angle.
- Press Graph Values to see the graph of defocus versus tilt
angle. There are still some sizable variations at positive tilt angles.
Double-click the lines in the table at some of these angles to see how
reliable these
fits look. The signal gets rather low at some tilts, but the noise is
low enough to allow you to see that the defocus is being found
adequately.