0. WHAT'S NEW IN IMOD 3.11
This section lists significant changes or additions to this guide from the
3.9 version.
1. BACKGROUND
This is a guide to building single and dual axis tomograms with IMOD using
the eTomo interface. It contains sufficient detail to serve as a reference
guide, which makes it less suitable when starting out. The recommended
approach is to work through our tutorial
with a sample data set before trying
to use this guide to process your own data. If for some reason you
are unable to use Etomo with your data, you will need to use the
older version of this guide.
1.1. Program Names
In this document, program names are capitalized. However, their true
names are all lower case, and they must be run by entering these names in
lower case because UNIX is case-sensitive.
1.2. Command Files
eTomo works with the same set of command files that used to be edited and
run on the command line in earlier versions of IMOD. These files have
the extension .com, and when a command file is run,
program output is
recorded in a log file with the extension .log. When you
open the panel for a particular step, eTomo
reads the existing contents of a command file to set the parameters
and settings that appear in the panel.
When you run an operation,
it writes the current parameters into the command file. eTomo also
makes sure that the command file matches your entries when you leave a
panel by pressing Done or Postpone or simply by selecting
another panel with a button on the left.
You can run a command file at the command line with the "subm" alias, which is defined in the IMOD startup files. For example, if you enter "subm track", a file named track.com will be executed in the background, a log file will be created called track.log, and a message will appear when the command file is completed. For more information on the format of command files and how to run them, see Command Files in the Extra Topics section. If you want to make or edit command files, or if you want to run programs at the command line, see also the section on Entries to Programs.
1.3. Numbering System
Sections or views in the image files are consistently numbered from 1
within
the graphical interface programs,
eTomo,
3dmod, and Midas.
However, many other programs in the IMOD package number coordinates
from 0, which was the original convention for MRC files.
If you work exclusively within eTomo, you need not be concerned
about this; but if you run other programs in the package you need to
be aware of this problem.
When a program refers to "view numbers", these are always numbered from
1; but when a program refers to "section numbers" or "Z values", there
is a good chance that they are numbered from 0. The most important
example is the program Newstack, which is
often used for rearranging or extracting sections from a stack.
1.4. Backup Files
Nearly every program that you run will create a backup file if an output
file already exists, rather than simply deleting the old version of the output
file. The existing file is renamed by adding a "~" at the end.
This can lead to some large
unneeded files if commands are run more than once. It is helpful to have an
alias for purging backup files in your .cshrc: alias purge '\rm *~'
With this alias, "purge" will delete all backup files without asking for
confirmation.
1.5. Using Temporary or Insecure Storage
It is possible to have your small working files automatically saved to
another directory every time that you run a command file. This will provide
backup protection if you build tomograms in a disk area that is not regularly
backed up. To use this feature, first be sure that the directory where you
will do your work and the directory where files should be saved both exist.
If you choose to copy your raw stacks to the working directory, which
you might want to do
if this gives significantly
faster access, then you can proceed as described below. If you want
to leave the raw stacks in the backed up location, then eTomo can
create links to them for you, but this will work best if you
start eTomo from the directory where you will build the tomogram.
After every command file is run, the script "savework" will be run automatically, copying files over to the source directory. You can also run "savework" yourself at any time (for example, after working on a fiducial model for a while).
1.6. Problems with Intensities in 3dmod
X-rays and other artifacts from the CCD camera can produce extreme intensity
values in the raw tilt series. These effects can result in the images
looking terrible when loaded into
3dmod, because the data are stored
internally as bytes and the image features of interest occupy a very small
fraction of the whole dynamic range of the data. Successful removal of
these artifacts will solve this problem (see PRE-PROCESSING: REMOVING X-RAYS), but there are
also several remedies until that point is reached.
Once the data are opened in 3dmod, adjust the Black and White sliders until the image features are visible in an appropriate contrast range. Then use the menu entry Edit-Image-Reload to open a dialog for rescaling the data. Press Apply and the data will be reloaded with the scaling indicated in the Lower limit and Upper limit text boxes, and the Black and White sliders will be set to values that allow the contrast to be decreased as well as increased. Now that you can see the images better, you can repeat this process if necessary - adjust the contrast again, then press Calc then Apply. Make a note of the final values for the lower and upper limits.
Next time you need to load the data, press the relevant 3dmod-opening button with the right instead of the left mouse button and select Open with Startup Window. In the Startup window, enter the lower and upper limits from the rescaling dialog in the Scale intensities text boxes.
If you cannot visualize the data at all in 3dmod, then you need to look at the intensities in the
individual images with
clip stat -2d setname.st
Look at the minimum and maximum values for the sections. You should see that
some of them have extreme minima or maxima, while others have more
reasonable values. Use the typical or reasonable minimum and maximum values
as the lower and upper scaling limits when loading the data into
3dmod. If all sections show extreme minima
and maxima, possibly due to a bad column or row near the edge, use
clip stat -2d -ix nx -iy ny setname.st
where "nx" and "ny" are smaller than the full X and Y dimensions of the
data. This will provide statistics over a subarea of the images.
Finally, if you can not get good dynamic range even after removing X-rays, you should prevent the coarse aligned stack from being converted to bytes. Go to Advanced mode in the Newstack section of the Coarse Alignment panel in eTomo and uncheck Convert to bytes.
2. NOTES FOR NON-BOULDER USERS
2.1. File Naming Conventions
In order for the processing sequence to work, the names of your starting files
must follow several conventions.
The raw image stacks must have the extension ".st"; so for a single axis
tilt series the name should be dataSetName.st. For a dual axis data set,
the two files must end in "a.st" and "b.st", i.e. dataSetNamea.st and
dataSetNameb.st. The data set name can contain ".", "-", and "_" as
separators but must not contain spaces or other characters that could
confuse a Unix shell.
If you are supplying your own file of raw tilt angles, they must be named with the data set name followed by ".rawtlt" (or "a.rawtlt" and "b.rawtlt" for a dual axis tilt series.
2.2. Film versus CCD Images
Some of the programs make a distinction between images from film and ones
acquired on a CCD camera. This is based on an obsolete method of
digitizing from film, in which tilt images were already in good translational
and rotational alignment after being digitized. eTomo does not
currently handle the command files tailored to
data from film.
If your data
are already in very good alignment, the only disadvantage to
processing it in eTomo is that you will have to run the prealignment
step. This is worth it to avoid editing and running command files by hand.
2.3. Image Scaling and Contrast Polarity
The default parameters for reconstruction assume that the numbers in your
images are linearly related to the number of transmitted electrons caught
by the detector. This is the case if images are recorded directly by CCD
camera or if film is digitized in optical density units. The logarithm of
such values should then be proportional to projected mass density for imaging
dominated by amplitude (aperture) contrast. Because of this, the
backprojection program, Tilt,
has an option to take the log
of the numbers after adding a base value (which might correspond to the
fog level of film). The default is to take logs with a zero base
value.
If your images are already mass-normalized, you should
remove the zero entry in the Log offset box in the Tomogram
Generation Panel; if your images are in arbitrarily scaled
units, you may need to remove that entry or at least adjust the offset value
that is added so that all values will be positive before taking the log.
If you remove the log entry, you also need to change the Output density
scaling factor to 1; the default value is a large number that is needed to
scale the logs up again after backprojection.
If your data were derived from unsigned 16-bit integers and have had 32768 subtracted from them for storage as signed integers in the MRC file, the programs will try to detect this and set the base to 32768.
If electron density appears as white in your images, Beadtrack will fail to track your fiducials properly with the default settings. Simply change the 0 to a 1 in the Fiducial marker size & polarity box in the Fiducial Model Generation Panel.
2.4. Tilt Series Taken in Two Directions from Zero Tilt
A tilt series taken by tilting in two directions from zero tilt often shows a
discontinuity in the aligned stack at the transition between the two halves of
the series. Usually this reflects either an irregular tilt increment due to
backlash in the goniometer, or changes in the specimen during the first half
of the series. Because of these effects, you should always identify one half
of such a tilt series as a separate group in the
Separate view groups fields on the
Fiducial Model Generation and Fine Alignment panels. These
entries will prevent the programs from assigning the same or similar values
for alignment variables to views that are not in the same half of the tilt
series.
For
example, if the discontinuity occurs between views 71 and 72, enter "1-71" in
the Separate view groups fields.
In some cases there appears to be a change in the X-axis tilt of the specimen between the two directions of tilting. It is possible to correct for this effect by solving for a single change in X-axis tilt in Tiltalign; see Correcting for X-axis Tilt in Bidirectional Tilt Series in the Extra Topics section.
3. SETUP
To work on a new data set, start eTomo and fill in the entries in the
Setup Panel that appears.
You need not start eTomo from the directory where the files are located.
Each ".com" file generates a corresponding ".log" file when it is run. In eTomo, you can examine a log file by clicking the right mouse button over free space within a panel; the menu that pops up will show the relevant log files for that panel.
If you have a two-axis tilt series, you will get one copy for each series, with names "...a.com" and "...b.com". For convenience, most command files will be referred to below by a name without an "a" or "b" (e.g., track.com), but in practice you will always be running an "a" or "b" version when you have a dual tilt series.
The man pages for the programs run by these command files give full details on their operation and on the meaning of the entries to each. Consult them for any questions on the options available in these programs.
If you find that you need to run Copytomocoms by hand, see Getting Command Files in the Extra Topics section for more details.
3.1. Command Files when Montaging
For a montaged data set, some command files and programs are
different, as follows:
4. PRE-PROCESSING: REMOVING X-RAYS
As mentioned above, X-rays and other flaws in CCD camera images can produce extreme low or high values that ruin the contrast when you view the images in 3dmod, and they can also give undesirable artifacts in the reconstruction. These defects can be wiped out with Ccderaser, which finds X-rays in two ways. It looks for "peaks", or pixels whose intensity deviate from the surrounding pixels by a certain number of standard deviations, which is specified in the Peak criterion text box. It also looks for pixel-to-pixel differences that exceed background by a certain number of SDs, specified in the Difference criterion text box.
When Ccderaser runs, it produces an IMOD model marking the pixels that were found. Press the View X-ray Model button to see this model. Points are sorted into different objects based on how much they exceeded a criterion (less than 1 SD for object 1, 1-2 SDs for object 2, etc.). You will probably be surprised at how many points are marked, possibly on the order of 100 points per image for a 2K by 2K camera. In our experience, the default criteria are conservative for unbinned images and all of these points are indeed X-rays. However, in binned images, the difference criterion may pick up some pixels on the edge of gold particles used as fiducials. If you see this happen, you can prevent it by raising the difference criterion to 10 or more.
If you want see the effects of changing criteria, you can save time by running in trial mode, using the Find X-rays button. The program will analyze images and produce a model without writing an output image stack.
When you press the Create Fixed Stack button, Ccderaser writes the corrected images into a file named "setname_fixed.st". If you are satisfied with the result, press the Use Fixed Stack button to rename the original file to "setname_orig.st" and replace it with the fixed stack.
If you find that some X-rays are too large to be removed with the default parameters, increase the Maximum radius to encompass these large X-rays and try again. If the larger radius causes inappropriate points to be corrected, then do the removal in two stages. First create a fixed stack with the smaller radius, and press Use Fixed Stack. Then increase both the radius and the criterion so that only the large X-rays are removed, and rerun the removal. Press Use Fixed Stack again if you are satisfied with the result.
If your images have other features that do not get corrected by the automatic X-ray removal, you can specify the pixels to erase in a model file. Press the Advanced button to reveal the controls for this option, and see the man page for Ccderaser for details on how to construct the model file.
With a montaged data set, when you view the X-ray model, the images will be loaded into 3dmod as single frames instead of as a montage, so that all parts every frame can be viewed. However, this feature does make it difficult to page through the images.
5. COARSE ALIGNMENT BY CROSS-CORRELATION
The main purpose of this step is to get the images aligned well enough for
the automatic tracking of fiducials to work. There are generally no
parameters to adjust, so you proceed by pushing the top three buttons
in sequence.
Press Fix Alignment with Midas only if you need to adjust some of the alignments. This will start Midas on the raw image stack, with the alignment transformations determined on the first step. Go to the pairs of views that showed problems, and use the left mouse button to translate each pair of images into alignment. When you toggle between a pair of images, you should see the section appear to tilt around an axis in the middle. The tilt axis should appear to be vertical because Midas applies a global rotation to the images, starting with the value in the Tilt axis rotation text box on the Coarse Alignment panel. If you have a big magnification change, you could also correct for this using the right mouse button while holding the Shift key down.
After fixing and saving transformations, you must generate a new coarse aligned stack.
The coarse aligned stack will be used for tracking the fiducial model, and there might be cases where you want to work with binned images for this procedure. You can set a binning for this stack by pressing the Advanced button then adjusting the entry for Coarse aligned image stack binning before generating the stack. If you change your mind after starting to work on a fiducial model, you can go back to this panel, change the binning, and generate a new prealigned stack. The existing model will load correctly onto the stack with the new binning; just be sure to save the model after doing this and eventually run the fine alignment, which will synchronize all information about the pixel size.
5.1 Making a Quick Tomogram with Correlation Alignment
It is possible to generate a tomogram using only the coarse alignment from
cross-correlation. This could be used to get a tomogram quickly to see
whether it is worth doing the fiducial alignment, or if the tilt series was
just for scanning purposes, or if there are no fiducials. This section
describes a
simple procedure for getting a tomogram quickly; for more detail on how to get
as good a tomogram as possible from this procedure, see
Making a Tomogram with
Correlation Alignment in the Extra Topics section.
If you need to set the position of a tomogram built with fiducialless alignment, see the Extra Topics section. It is recommended that you NOT do this if you plan to go back and do the fiducial alignment procedure.
5.2. Fixing Montage Edges
For a montaged data set, the Coarse Alignment panel also
provides controls for fixing errors in the displacements between
frames. Blendmont analyzes the overlap
regions between adjacent pieces and determines how to shift the pieces into
registration. Sometimes this analysis fails and a few of the shifts are
wrong. It is important to fix these errors before going on to build the
fiducial model, because when the displacements are
changed, image positions in the blended image change as well.
There are two ways to tell if there are shifts that need fixing.
To fix displacements, press Fix Edges With Midas. If you are correcting for magnification gradients or image distortion fields, you will first have to press Make Distortion Corrected Stack. This step is necessary because you need to visualize overlaps in the same images that Blendmont is analyzing, namely distortion-corrected images.
When Midas starts, enter the view number of a section with a large error in the Current Section text box. The control panel has push-buttons for the four edges with the worst errors; use these to select the edge with the worst error. Toggle between the two pieces to visualize the registration in the overlap zone. If it looks bad, shift the Current piece into alignment (the Apply Leave-out Error button can be a useful shortcut if this is the only piece with an error -- see the Midas man page for explanation.) If the overlap looks fine, simply go on to another edge; you will probably find the error there. This potentially confusing situation may be quite frequent, because whenever a bad edge involves a corner piece of the montage, its error is spread equally between the two edges of that piece. It will thus look like there are two equally bad edges when only one is bad.
After you correct the displacement at an edge, the push-buttons will rearrange and show new maximum errors. Once the maximum error is down to 0.3, you can go on to another section. When you are done, save the edge correlation displacement file and exit. Your corrected displacements will automatically be used when Blendmont is run again, and Blendmont will build new edge functions on its next run, because the edge functions depend partly on the displacements that you just modified.
6. FIDUCIAL MODEL GENERATION
The first step is to set up a seed model. Press
Seed Fiducial Model Using 3dmod to open the prealigned stack and
an empty model in 3dmod.
The Bead Fixer module will also open
in a mode that has features to help with
the seeding process. These features are:
Pick a view near zero tilt that has good images of the beads. Put one point in the center of each desired bead. Beads too close to the edges are not trackable by Beadtrack but could be tracked by hand if necessary. Try to have at least 8 beads well distributed over the area, and well distributed between the two sides if they are on two surfaces. The more beads you have, the better the alignment will be, up to a point, but the more work it may take for you to complete the model. If the beads are all on one surface, there is not much point in having more than 12 or so; if they are on both surfaces, 20 or more may be useful. However, for areas larger than 1000x1000 pixels, you will probably need to use local alignments, in which case you should have at least 8-12 fiducials per 1000 by 1000 pixel area acquired with a CCD camera, or 6-8 fiducials per 500 by 500 pixel area digitized from film. (See Using Local Alignments.) Save the seed model when you are done.
Beadtrack proceeds from one view to the next, tracking as many beads as possible on the new view. Once it has bead positions on enough views, it runs a simplified tilt alignment to get improved predictions of where beads should be and to reject erroneous positions. This procedure usually works well on small data sets, but may perform poorly when the data included in the tilt alignment do not give a good fit. The data can fit poorly when they are from a large area or when the tilt series includes very high angles. To address this problem, Beadtrack provides two ways to restrict the data so it fits the alignment better: 1) the tracking can be done over a series of overlapping subareas, so that the fit to the data is similar to that available when using local alignments; and 2) the number of views included in the tilt alignment can be restricted, so that high angle data from both ends of the tilt series are not included in the same fits. For particularly difficult data, both methods can be used.
Most standard entries to Beadtrack should work well, so in Basic mode eTomo shows only a few of the many parameters.
Press Track Seed Model. Open the track.log file and skip to the end to see a summary of which beads could not be tracked completely. If several beads fail to track past a particular view, you might want to add that view to the list of views to be skipped and rerun the tracking.
Next press Fix Fiducial Model to read the new fiducial model into 3dmod. The Bead Fixer dialog box will appear in the gap-filling mode. It will allow you to jump from one gap in the data to the next and fill in missing points if appropriate. It is acceptable for some of the points to be missing on some of the views. If too few of the points can be extended all the way to the first or last views, you can add some fiducials that are present only in higher tilt views. Just be sure to add them on a substantial number of views, not just on a few, so that their 3-D positions can be solved for accurately. If you do need to add several fiducials, you could put some "seeds" into your edited fiducial model and allow Beadtrack to track those beads as far as possible.
6.1. Using Beadtrack to Extend a Model
Sometimes you will want to have Beadtrack
start with an existing
fiducial model instead of a seed model. This is especially helpful when there
are a large number of beads that failed to track. For example, you might
extend some fiducials past a view where they failed to track then try to get
Beadtrack to track them the rest
of the way,
or you might want to add fiducials when you realize that you
need to use local alignments. To use the existing fiducial model as a seed for
another run, press Track with Fiducial Model as Seed.
Your original seed model will be renamed to setname_orig.seed the first time
that you do this. Then press Fix Fiducial Model to read the retracked
model into 3dmod. You can repeat this
operation as many times as needed. This procedure will tend to fill in gaps in
the model, which is usually
appropriate. However, if you have already left some gaps in the model
because of ambiguities, you should uncheck Fill seed model gaps.
6.2. Getting Fiducials for a Second Axis
If you are doing a double-tilt series, at least some (8-10) of the beads
that you track must be the same in the two series. The shell script
Transferfid will help ensure this
by making a seed model for the second axis based on the fiducial model
for the first axis. To use this tool, complete your fiducial model
for the
first axis.
Proceed through the coarse
alignment steps for the second axis until you reach the
Fiducial Model Generation panel.
If your
tilt angles are not in ".rawtlt" files, you also must fill in the view
numbers of the zero-tilt views in the Center view text boxes
(visible in Advanced mode).
Press Transfer Fiducials from Other Axis to begin the operation.
Transferfid
will search for the pair of views in the two series
that correspond the best, then transfer the fiducials from the first
series to make the seed model for the second series. At the end, the
program indicates the number of fiducials that failed to transfer and how
the contour numbers correspond between the first fiducial model and the new
seed model. This information is saved in a
transferfid.log file.
Transferfid also creates a file called
"transferfid.coord" with the information needed for the first stage of the
tomogram combining procedure to determine how fiducials correspond between the
two tilt series. As long as this information is available, you can add and
delete fiducials from either tilt series after doing the transfer, and
the combining procedure will still be able to tell which fiducials correspond.
If Transferfid fails to work on the first attempt (as indicated by an unusually large number of fiducials that failed to transfer or a seed model that contains incorrect model points), you may need to set the translational and rotational alignment between the two series manually with Midas. To do this, just check Run midas and run the transfer again. Midas will start up with the center views from the two tilt series. Adjust the alignment with translation and rotation (left and middle mouse buttons). Do not be alarmed if you have to rotate the image by 180 degrees, just select Interpolate to get a good rotated image. You will find that the images cannot be aligned if the sample was turned upside-down between the two tilt series; if so, select "Mirror around X-axis" from the Edit menu and then align the images. Save the transformation and exit. The search for the best corresponding pair of views will proceed using this starting alignment.
The Advanced mode allows you to indicate that mirroring is needed, so if you know that the sample was inverted, you can select just this option and run the operation without having to run Midas. In Advanced, you can also specify the views to search around and limit or expand the number of views in the search. As a last resort, you could set the Number of views in the search to 1 and set the alignment as well as possible in Midas, including a magnification change and stretch.
If the transfer operation still fails, you can run 3dmod on both stacks at once and add some initial points to the second seed model in the same order that they occur in the first fiducial model. It is helpful to open one of the images in the Slicer window and rotate it by 90 degrees with the Z slider. You only need to make the first 5 beads correspond, or however many are needed to sample beads on both surfaces, if beads are on two surfaces. After that, you can add the rest in any order. If you do this, then when you prepare to combine the two tomograms, you would specify that only the first 5 beads correspond.
7. FINE ALIGNMENT
The goal of the final alignment is to transform the images so that they
represent projections of a solid body tilted around the Y axis, as well as to
refine the projection angles. In order to transform the images, one needs to
determine the rotation, translation, and scaling (magnification) to be applied
to each image. It is also possible to solve for variables which will correct
for linear distortions of the specimen.
7.1. Running Tiltalign
Whether you have fiducials on one surface or two determines what
variables can be solved for. If there are beads on only one surface, you can
solve for either tilt angles or stretch in the X direction but not both. If
there are beads distributed through the
depth of the sample (typically but not necessarily on two surfaces),
you can solve both for tilt angles and for
distortion, or for tilt angles and compression, but not for all three kinds of
variables.
Before computing an alignment for the first time, check the following settings in the General parameter page:
Press Compute Alignment and examine the results in the log file after the process is done. The lengthy log file has been split into useful sections under different tabs. The first page that you see, Errors, shows two useful summary values. One is the ratio of measured values to unknowns, which provides an indication of how robust the solution is against random errors and of whether there might be too many independent variables being solved for. The other is the residual error mean, a global measure of the quality of the fit. A residual error is the distance in pixels between the measured position of a fiducial on a view and the position predicted by the alignment solution. You can view a model of the residuals at every point, exaggerated by a factor of 10, by pressing the View Residual Vectors button (see Residual Model Output). This feature is particularly useful for assessing whether you need to use local alignments.
The Solution page shows the value of some of the alignment variables for each view. Examine the tilt angles, looking for places where they change by unusual amounts. The column labeled "deltilt" shows the difference between the solved tilt angle and the original, nominal tilt angle. This column should change gradually when tilt angles are grouped. Tilt angles are grouped by default because low tilt angles cannot be solved for accurately without grouping (see below). The "mag" column shows the effect of overall shrinkage and slight magnification changes due to changes in focus. If the "mag" column shows a sudden change that is much larger than surrounding changes, consider making all of the views after this change be a separate view group, as described above. For the variables that are grouped, this will keep views on the two sides of the transition from being constrained to having the same or similar values.
The last column on the Solution page, "mean resid", shows the mean error (residual) in pixels for all of the points on each particular view. This information will reveal whether some views give a poorer fit than others.
The Surface Angles page shows the results of an analysis of the solved bead positions in 3D and recommends a change in tilt angles that would make the beads lie in a horizontal plane. Make the recommended change at least after the first run of Tiltalign by taking the value shown for "Total tilt angle change" on the last line and using it in the Total tilt angle offset text box. It is not necessary to do this repeatedly because the final tilt angle offset will be determined in a later processing step.
You can open the Large Residual page to see the list of fiducials with the largest errors, but it is easier to deal with this information from the Bead Fixer dialog in 3dmod, which is opened in big residual mode when you press View/Edit Fiducial Model. The Bead Fixer is told what log file to read, so you can proceed without pressing Open Tiltalign Log File. Examine the points in turn by pressing the Go to Next Big Residual button (or the apostrophe hot key), paying particular attention to ones with errors greater than 2 pixels. Adjust point positions in the model, if appropriate. When you want to recompute the alignment after fixing some points, you can press Save & Run Tiltalign, which will save the model, rerun Tiltalign, and read in the new log file. There is one trap to this convenience button: Bead Fixer has no way of knowing if you have changed parameters in eTomo, so when you do change alignment parameters, you must compute the alignment through the button in eTomo instead. The Bead Fixer will be told to reread the log file after the alignment is done.
You could also open the Fiducial Coordinates page to see the 3D coordinates that have been solved for the fiducials, but it is easier to visualize these points in 3dmodv by pressing the View 3D Model button on the Fine Alignment panel. If you indicated that points are on two surfaces, then the points will be sorted into two objects based on which surface Tiltalign thought they were on. This is a good way to assess whether the points are well enough distributed on both surfaces to support solving for distortion, particularly when local alignments are to be used.
7.2. Background on Grouping Variables and Solving for Linear Distortion
Before you get into trying to solve for linear distortion and grouping
variables, you should be aware of several points. First, variables are
grouped in order to reduce the number of variables being solved for.
Instead of solving for a different tilt angle for each view, with grouping
by 5 the program will solve for a tilt angle for every fifth view and determine
the angle for the rest of the views from the ones that it is solving for.
This reduces the number of tilt variables being solved for by a factor of 5,
and also averages over a larger number of measurements when solving for
each individual value. Because of this averaging out of random errors,
grouping will actually give a more reliable solution for variables that are
hard to solve for, such as tilt angle near zero degrees. It is for this
reason that you should always use grouping of tilt angles even when
you are not solving for distortion. The reduction in number of variables by
grouping becomes particularly important when you have a large number of
fiducials (e.g., more than 150) or a large number of views (e.g., more than
140). In these cases, the program may have trouble finding a solution
unless you also group some variables that are not grouped by default, namely
rotation angle and magnification.
The grouping of variables can be done in two different ways. In one way, the particular parameter will change linearly from the first view in one group to the first view in the next group, and will appear to change smoothly over the whole tilt series. This is referred to as linear grouping or linear mapping. This method is used for every variable except stretch along the X-axis. For that variable, all of the views in a group will have exactly the same value.
The next point concerns the nature of the distortion solution, a strange beast. Even if the only thing happening to the section is a stretch along the X-axis, solving for distortion will successfully account for these changes, but the resulting solution will not numerically reproduce the amount of stretch. The problem is that there is an infinity of equivalent solutions, which all account for the distortion equally well, but differ in the geometry of the resulting reconstruction. This geometric difference is a "strain", a shifting in Z proportional to the X value of a column of pixels. Without additional information about the section, there is no way to recover its true structure, and the actual amount of stretching that occurred. The program needs to pick one solution out of the equivalent ones, and it does so by eliminating one variable; thus you will notice a variable listed as "dummy" in the Mappings page of the log file. Typically, this arbitrarily selected solution will change the most at high tilt angles, sometimes dramatically so, even though the actual changes in the section happen at a nearly constant rate through the series.
The distortion solution will also account for thinning when tilt angle is allowed to vary as well. The equations governing this situation dictate that the X-axis stretch change rapidly at the highest tilts, even if thinning occurs at a regular rate through the series. Thus, regardless of whether there is section distortion or thinning, or both, it is almost inevitable that the X-axis stretch will change most rapidly at high tilt.
The last point to be aware of is that some group sizes will vary with tilt angle. Group size for tilt angle will be proportional to the cosine of the angle, and will be set so that the average size equals the value that you specify for grouping. Because of the peculiar behavior of the X-axis stretch, its group size will change even more with tilt angle.
Finally, be aware that including distortion can lead the program into inappropriate solutions, in which the tilt angle and the X-axis stretch covary excessively. This can occur when there are too few fiducials, too great an imbalance between the number of fiducials on the two surfaces, substantial random errors in the locations of the model points, or a ratio of measurements to unknowns that is too low. The potential remedies are to increase group sizes or to give up on solving for distortion.
7.3. Solving for Distortion - Fiducials on Both Surfaces
To solve for distortion, open the Global Variables page of the
Fine Alignment panel and select Full solution in the
Distortion Solution Type section. This will automatically switch
to some good default values
if you have fiducials on both surfaces, namely a grouping of 5 for tilt
angles (if they are not already grouped), 7 for the stretch variable, and 11
for the skew variable.
Grouping is important when solving for distortion because it dramatically
reduces the number of variables to be solved for, averages out random errors
better, and gives a more robust solution. The typical range for group sizes
would be:
You would want to pick the low end of these ranges of group sizes if an alignment run reveals that one of the distortion variables changes especially quickly (but don't be fooled by big changes for pictures taken out of sequence). Conversely, if the ratio of measurements to unknowns is lower than 4-5, you would want to make the default group sizes large. In this case, you could also switch to grouping rotation and magnification variables as well, provided that the solutions for these variables already looks fairly smooth.
The stretch variable ("dmag" in the Solution page of the log file) will typically range from 0.001 to 0.02 but can easily reach 0.05 at high tilts. If you get values larger than 0.05, or if you get changes in tilt angle ("deltilt") more than 2 degrees, you should increase the group size and see if the range of values decreases, particularly if you have only 3-5 fiducials on the surface with fewer fiducials. If the range decreases substantially, stick with the larger group size. You can also increase the grouping for skew and tilt angles to try to get a better-behaved solution. If a solution seems unreasonable, either abandon the attempt to solve for distortion, or solve for skew angle only, as described in a few paragraphs.
The skew is an angle in degrees and will typically range from 0 to 1 degrees. Values greater than about 0.2 degrees are worth correcting for, and a change of more than about 0.3 degrees from one group to the next would be a big change.
If you have discovered that there is some sudden change in alignment such that two views should not be grouped together, then the simplest thing to do is to specify a Separate view group on the General parameters page. For example, if there is sudden change between views 30 and 31, enter 1-30 in this text box; more than one separate group can be entered if they are separated by spaces.
A finer degree of control over grouping of an individual variable can be achieved by making an entry in the Non-default groupings text box that appears in Advanced mode for each variable. To use a non-default grouping, enter the starting and ending view number and the group size, separated by commas. For example, if the default grouping for X-stretch is 10, but you want smaller groups for the first and last 20 views of a 121-view tilt series, then enter "1,20,5 102,121,5". Separate different non-default groupings with spaces, as in the example.
A good alignment has a mean residual error of 0.25 to 0.5 pixels, or more for larger gold particles or images acquired at smaller pixel sizes (less than 1-1.5 nm).
7.4. Solving for Distortion - Fiducials on Only One Surface
If you have fiducials on only one surface, or only a few fiducials on one
surface, you can't properly solve for
both tilt angle and distortion. If the section has thinned but not distorted,
then allowing the tilt angles to vary will correct for the thinning. If the
section has distorted but not thinned, then solving for distortion with fixed
tilt angles is appropriate. In reality, both phenomena occur, and section sag
can also make the tilt angles inaccurate, so that fixing them
completely is likely to be problematic. The simplest and safest thing to do
in this situation is not to solve for distortion, but here is a procedure if
you want to explore including the distortion solution.
7.5. Solving for Projection Stretch
In some cases, distortions may occur because of stretching
along an axis during the projection of the images, instead of from
changes in the specimen. To accommodate this situation,
Tiltalign can solve for a skew between
the axes that occurs in all images. This is much easier than solving
for a specimen distortion that changes through the tilt series, and does not
require fiducials distributed in Z. In Advanced mode, check Solve for
single stretch during projection on the Global Variables page.
If you have fiducials on only one surface or only a few fiducials, disable
the distortion solution since it could be redundant to the projection
stretch solution.
7.6. Solving for Beam Tilt
The ordinary alignment assumes that the tilt axis is perpendicular to the beam
axis. A non-perpendicularity between these axes is referred to as beam tilt.
If beam tilt is more than a few tenths of a degree, it can impair the
alignment. However, including linear distortion in an alignment
solution has been found to adequately correct for the effects of beam tilt on
the alignment and the reconstruction. Thus, if you are able to solve for
distortion, beam tilt is not a concern. Even when distortion is not included,
solving for beam tilt will probably not make a significant difference as long
as you have enough data to solve for rotation for every view, unless the beam
tilt is large. If you have very few fiducials and cannot solve for more than
a single rotation angle, then including beam tilt becomes more important.
To include beam tilt in the solution, open the Beam Tilt box on the Global Variables page by pushing the A button. Select Solve for beam tilt. If the option is grayed out, you need to either solve for only one rotation angle or disable the distortion solution. When you run the alignment, the beam tilt is found by a secondary search, in which the standard minimization procedure is run with a series of fixed beam tilt values in order to find the beam tilt that gives the minimum error. After running the alignment, open the log. The value for beam tilt will appear at the top of both the Errors tab and the Solution tab. In addition, there is a Beam Tilt tab which shows the progress of the search by listing the normalized error measure (F value) for each value of beam tilt. This listing will show you how much the error is reduced by adding the beam tilt variable.
There are indications that the beam tilt angle is characteristic of a particular microscope. An alternate strategy, when there are very fiducials, is thus to insert the characteristic beam tilt angle instead of trying to solve for it. You would need to have obtained the beam tilt angle from alignment of other data sets from that microscope.
7.7. Using Local Alignments
If you are reconstructing a large area, particularly if you are
montaging, then you may need to solve for local tilt alignments to get the
same quality of alignment and resulting resolution as you would with a smaller
area.
Tiltalign
first finds a global solution with all of the fiducials, then it adjusts the
solution to fit the fiducials in each of a series of overlapping subareas,
referred to as local patches. A target size for the patches is specified as
an entry to the program, and
the number of patches in each dimension is determined from this size and from
the amount of overlap required between adjacent patches (50%, by default).
However, patches are
also required to contain a minimum number of fiducials, and each patch will
be automatically expanded from the default size until it contains that
number. In fact,
there are two minimum requirements: one for the total number in an area, and
one for the number on each fiducial surface. The latter requirement is
needed to ensure that there is enough information to
obtain a valid local solution for distortion.
The typical result has been that a global mean residual of 0.75-1 is reduced
to about 0.5 in the local alignments.
To use local alignments, you should have at least 8-12 fiducials per 1000 by 1000 pixel area acquired with a CCD camera, or 6-8 fiducials per 500 by 500 pixel area digitized from film. Proceed as follows:
7.8. Excluding Views
Sometimes there are images in the original data that do not align well or
that have poor image quality, and that you want to exclude
from the alignment and reconstruction. This can be done by inserting a list
(comma-separated ranges) of view numbers into the List of views to
exclude text box on the General page. The alignment solution
will then be based only on the rest of the views. Although the excluded
views will still be included in the
final aligned stack, they will be automatically excluded from the
reconstruction.
7.9. Residual Model Output
Tiltalign produces a text file
with the residuals for each point, and Patch2imod converts this into
a model of the residual vectors in a file named setname.resmod. Press
the View Residual Vectors button to
load this model into 3dmod on top
of the images, in place of the fiducial model, to look for patterns in
the direction of the vectors. The vectors are exaggerated in length
by a factor of 10. The start and end of a vector is marked by a green
and a red cross, respectively.
8. TOMOGRAM POSITIONING
The goal of the next step is to shift and rotate your reconstruction so
that it is as flat as possible and will fit into the smallest volume. This is
done by sampling three regions of the tomogram, ones computed from near the
top, middle, and bottom of the tilt images. There are two rotations which can
be adjusted: the rotation about the tilt axis, to make the section level when
viewed in the X-Z plane; and a rotation about the X axis, to make the section
come out at the same Z height throughout the length of the tomogram. The
latter adjustment is optional for small rotations since it involves slightly
more computation time and
requires more interpolations in the back-projection, which could conceivably
reduce resolution. The steps to follow are:
8.1. Redoing Samples to Refine the Positioning
The Positioning panel makes it easy to refine the positioning with a second
round of samples. You might want to do this
if your initial samples do not contain the entire section, which can easily
happen when fiducials are on only one surface or there is a large X-axis tilt.
In such a case, you can draw a model with estimated lines and press
Compute Pitch Angles & Z Shift. Then use Create Sample
Tomograms to make new samples at the estimated position. Make sure that
the 3dmod with the previous samples is closed,
and press Create Boundary Models. Delete the existing contours
(e.g., press "Shift-D" 6 times) and make new ones. This time, when you
press Compute Pitch Angles & Z Shift, new positioning values will be
added to the previous ones.
8.2. Positioning with a Whole Tomogram
For situations where the 3 samples at fixed positions are unsuitable, there is
an option to draw lines in a whole tomogram instead. A whole tomogram can be
generated quite quickly with binning of 3 or 4. To use this option, check
Use whole tomogram and select the desired binning, then press
Create Whole Tomogram. When it is done and you press Create
Boundary Model, the tomogram will be presented in the top-down, X/Y view.
You now need to create pairs of lines delineating
the top and bottom of the specimen in at least 2 (preferably 3) locations in
Y. The lines do not need to be perfectly horizontal (i.e., confined to one
plane in Y) and the two lines of a pair do not need to be at identical
locations. See the man page for Tomopitch
for more details on acceptable boundary lines.
You have 3 options:
9. TOMOGRAM GENERATION
The tomogram generation process involves several steps at which
filtering can be applied to the data, and the appearance and interpretability
of the resulting tomogram depends on the choice of filtering.
All of this filtering involves the preferential attenuation of high spatial
frequencies, i.e., low pass filtering. This kind of filtering reduces the
noise in the reconstruction because noise becomes increasingly important at
higher spatial frequencies.
Spatial frequencies are expressed in cycles
per pixel, ranging from 0 to 0.5, the highest spatial frequency that can be
represented in a digital image.
9.1. Tomogram Resolution and the Need for Filtering
The noise or graininess in a reconstruction from
well-aligned data arises from two main sources:
noise
in the projection images because they are not taken at very high dose; and
artifacts in the back-projection because the tilt increment was too large
for the thickness of volume being reconstructed. The angular increment is
one of the major factors governing the resolution of a tomogram. The
classic resolution formula of Crowther,
DeRosier, and Klug (1970) can provide a rough guide for how to adjust
the radial filter, even though it is strictly applicable only to the case of a
full 180º range of angles. The formula is:
d = D * Δβ
where d is the resolution in real-space units (nm or pixels),
D is the diameter of volume reconstructed,
and Δβ is the angular increment in radians.
Alternatively, if Δβ is in degrees, the resolution f in
reciprocal-space (frequency) units is
f = 57.3 / (D * Δβ)
Or, the equation can be expressed in terms of n, the number of views, and
the maximum tilt angle βmax:
f = (28.5 * n) / (D * βmax)
which for the case of a tilt range of ±60º, reduces to:
f = 0.48 * n / D
One of the uncertainties in these formulas is the meaning of the diameter D.
In rough terms it corresponds to the thickness of the section; but if
electron-dense material in the section is relatively sparse, it may
correspond more closely to the size of clusters of material within the
section, implying a higher resolution. It has been argued that in extended
slabs of material, D corresponds to the maximum thickness of the section
when tilted, but a formula based on this assumption
gives resolutions much too low to be a guide for filtering the reconstruction.
The last version of the formula implies that the angular increment does not
limit the resolution when the number
of views is comparable to the section thickness in pixels. This makes
intuitive sense if one thinks of the projections as providing information
needed to solve for densities in the volume, since then the number of
measurements will match the number of unknowns.
After the aligned stack is made, it can be filtered explicitly with a two-dimensional Gaussian filter in Fourier space. Spatial frequencies up to a specified cutoff radius are unaffected, and beyond that radius they are attenuated by multiplying with a Gaussian curve that starts at 1.0 at the cutoff radius and falls off with a specified sigma value (standard deviation). The Gaussian falls to 0.61, 0.14, and 0.01 at 1, 2, and 3 sigmas, respectively. The advantage of filtering the aligned stack is that it will reduce noise in both dimensions; the disadvantage is that it requires an extra computational step.
The third stage at which filtering can be applied is during the
backprojection.
In R-weighted backprojection,
each horizontal line of input data is filtered to weight each spatial
frequency proportional to its radius in Fourier space. This is radial
weighting, and the filter is referred to as a radial filter. When graphed,
it is simply a straight line through the origin. In order to
filter out high frequencies in the reconstruction, a cutoff frequency is
defined at which the filter changes from a rising line to a falling Gaussian
curve. The rate of the falloff is again determined by the sigma
of the Gaussian. The advantage of filtering at this stage is that it adds no
extra steps because it is incorporated in the R-weighting. However, it is only
a one-dimensional filter. This makes it well suited for reducing the
artifacts and noise due to the limitations on angular sampling, but less
well-suited for dealing with other noise because it fails to filter noise in
the Y direction. Indeed, experiments with noisy model data indicate that
optimal 2D filtering of the aligned stack gives a more faithful reproduction
of the original structure than does radial filtering in the backprojection
with the same cutoff and sigma values.
9.3. Filtering Guidelines
These various considerations motivate the following guidelines:
These guidelines are just a starting point, and the best approach may be to
experiment with different filter settings to find the best balance between
reduced graininess and sharpness of features in the tomogram.
9.4. Making and Processing the Aligned Stack
The first step when you get to the Tomogram Generation page is to
generate the aligned stack.
First select linear interpolation if desired for this step.
Notice that you can also select a binning of the aligned stack at this stage.
Press Create Full Aligned Stack.
Before the optional 2D filtering, there are two other operations that you might want to perform, and for which there is not yet an interface in eTomo: correction for microscope CTF and erasure of fiducial markers.
cp $IMOD_DIR/com/ctfplotter.param .Edit the file to specify your file name and other parameters. Run the program with:
ctfplotter -param ctfplotter.paramThis program allows you to estimate a single value of defocus for the whole tilt series or several defocus values that apply over different ranges of tilt angles. At the end, you store these defocus estimates in a file "setname.defocus". If you do not run Ctfplotter and have a defocus to use, you need to make a file "setname.defocus" with a single line, "20 20 0. 0. defocus_value", specifying the defocus value.
To correct the aligned stack for the CTF, get a copy of the command file:
cp $IMOD_DIR/com/ctfcorrection.com .Edit the file to specify your file name and other parameters. Run the program with:
subm ctfcorrectionAfter the computation is finished, replace the aligned stack.
mv setnameCorrected.ali setname.ali
xfmodel -xf setname.tltxf setname.fid setname.fidali ccderaser -cir 1 -bet radius -mer -exc -mod setname.fidali setname.ali setname_erase.ali 3dmod setname_erase.aliIn the Ccderaser command, "radius" is the radius around each point to erase, in pixels; this value can be floating point rather than integer. The entry "-cir 1" specifies that object 1 contains the points to be erased as circles; if your points are in more that one object, enter a list of object numbers instead of 1. If the erasure appears acceptable, replace the aligned stack:
mv setname_erase.ali setname.ali
9.5. Building the Tomogram
In the Tilt Parameters section, the values for
Tomogram thickness and X-axis tilt were inserted when you ran
Tomopitch; correct them if necessary.
Adjust the radial filter parameters as appropriate. If you did 2D filtering,
you can set the cutoff higher (e.g., 0.45) to avoid double-filtering the
data.
Press Generate Tomogram.
9.6. Making Trial Tomograms
In Advanced mode, the Tomogram Generation panel has a set of
controls for making and examining trial tomograms. You might want to
do this to see the effects of varying the radial filter, or to see the
results with different alignment parameters. These assessments can
usually be done on a subset of the data. You can make a subset by
reducing the thickness, entering a Tomogram width in X that is
less than that of the
projection images, specifying a First slice in Y and a
Last slice in Y, or some combination of these three changes.
You can even enter an X offset to shift
the subset away from the center in X.
In any case, to make a trial tomogram, enter a name in the Trial tomogram filename drop-down box, then press Generate Trial Tomogram. To make another one, change parameters as desired, edit the trial tomogram name, and press Generate Trial Tomogram again. Once there is more than one trial tomogram, you can select the name that appears in the drop-down box, and press View Trial in 3dmod to see whichever tomogram is currently listed in the filename box. When you are done looking at trial tomograms, be sure to reset the thickness and remove unwanted entries from the width and slice boxes before pressing Generate Tomogram. If you made the full tomogram in one of your trial runs, you can press Use Current Trial Tomogram to rename the trial tomogram to be the final output of the tomogram generation step.
There is also an entry for Tilt angle offset in Advanced mode, which will rotate the reconstruction about the Y axis just as the angle offset will in the Fine Alignment step. In addition, there is an entry for Z shift that has the same effect as the Z shift specified earlier. These entries are useful when doing an alignment without fiducials.
9.7. Using Z Factors in the Backprojection
When a specimen shrinks along an oblique axis during a tilt series, it is
actually not possible to transform the 2D images to correct fully for this
shrinkage. That is, the aligned images will not represent projections of
an unchanging rotated object. The result is that features such as gold
fiducials do not stay at one Y level in the aligned images, producing
characteristic artifacts in the reconstruction. This effect can be
corrected by varying the
location that voxels in the reconstruction backproject from systematically
as a function of their Z-height. Since IMOD 3.4.17,
Tiltalign
can output the factors needed to adjust the backprojection position when
distortion is solved for, and
Tilt can use them when computing the
reconstruction. These factors will be used if present when the
Use Z factors box is checked in the Tilt Parameters section
of the Tomogram Generation panel. The box is checked by default,
under the assumption that the distortion solution in the fine alignment will
usually reflect changes in the specimen rather than stretches during
imaging. However, in situations where imaging is a more likely source of
stretch, the option should be turned off.
10. COMBINING TWO TOMOGRAMS
To combine two tomograms, eTomo uses a series of command
files to perform a sequence of operations. Just as for building the
single-axis tomogram, you first adjust entries on a setup page, then you
create the command files. At that point you can start the
combine operation, and if all goes well it will run to completion. However,
the Tomogram Combination panel provides two other pages with options
to deal with the problems when things do not go well.
The main programs or shell scripts being run, and the essential steps in combining are:
Go through the following steps to set up the combination:
If you have a relatively thin sample, you should be aware that Setupcombine may decide to compute only one layer of patches, in which case the second stage of alignment will not stretch the data in the thickness dimension. This is generally appropriate, because the error from failing to correct for thinning for a very thin specimen would be negligible. For example, the thinning correction determined in the refinement phase is typically less than 1%, so for a 40-pixel thick specimen the error in Z at the surfaces would be 0.2%. However, if you wish to solve for two layers, go to the Final Match page, switch to Advanced mode, and specify two layers of patches in Z. Adjust the size of the patches in Z if necessary so that it is at least 40% smaller than the range allowed for the patches in Z. This will provide sufficient spacing between the layers to give an accurate estimate of the realtionships in Z.
If you have noisy tomograms, you should probably use linear interpolation (instead of the default quadratic) for making the final matching volume with Matchorwarp. To do this, go to Advanced mode on the Final Match page and select Use linear interpolation.
10.2. Using Temporary Storage for Combining
It is possible to use temporary disk space when combining two tomograms;
this is useful if you want to run the combine operation on a machine different
from the one where the two tomograms are located. Combining creates a large
number of temporary files, and considerable time can be saved by placing these
files on a local disk instead of writing and reading them across a network.
To use this feature, make an entry in the Temporary directory text
box (/tmp, /usr/tmp,
or other appropriate scratch directory). If you may need to access this
directory from other machines, do not use /tmp or /usr/tmp, and specify the
scratch directory in a way that will be recognized from another machine.
(In the BL3DEMC, that means using /scratch/machine_name instead of
/localscratch).
Whatever directory you specify must exist already and you must
have permission to write to it. By default,
the command files will build the final
sum.rec into the current directory and remove all temporary files at the end.
Select Manual cleanup if you want the fastest possible access to
sum.rec or if you want to examine the setname.mat file. With this option,
sum.rec is built in the temporary directory and a link is provided to it
from the current directory.
The temporary directory is created when matchvol1.com is run. If the combine operation crashes and has to be restarted, it will use the same directory. However, if you recreate the command files, a new temporary directory will be used.
10.3. Proceeding
Press Create Combine Scripts to generate the command files based on
the parameters in the Setup page. After this, the Initial
Match and Final Match pages will be accessible, and you can go to
them to adjust parameters if
you have special needs based on prior experience. Some parameters can also
be changed from the setup page, but some parameter changes there
will not have any effect unless you recreate the command files.
Check free disk space (df -k). Typically, you need 3 times as much free space as one tomogram occupies. You may need to delete the aligned tilt series, which you can do with the Delete Aligned Image Stack button on the Tomogram Generation panel. (Deleting the pre-aligned stacks will also help, but this currently must be done from the command line.) You may even need to archive and delete raw tilt series before proceeding.
Press Start Combine to start the operation. Once the matchorwarp operation has been running for a minute, check the matchorwarp.log file to see how good the registration between the two volumes is. You will see Refinematch's report on the mean and maximum deviation at the various locations after applying a single linear transformation. Then there will be either a message that Matchvol is being run, or a message that warping is needed. Just above a message that Warpvol is being run next will be a report on the mean and maximum of the mean residuals. If the mean is reasonable but the maximum is quite high (1 or more), you should look at the patch vector model and consider whether to take any of the remedial actions described below.
10.4. Initial Registration Problems in Combining
The first step of the combine operation can fail for two reasons:
the linear fit between corresponding fiducial positions gives a maximum
residual above the specified limit; or there is a
large local shift between the centers of the volumes after
they have been optimally aligned. There are three different situations to be
considered:
There is another problem that can occur in the initial matching step. If there is significant warping between the two volumes and not a good enough distribution of points in Z, then the best fit between the points may occur with a transform that collapses the Z dimension. This can happen if there are very few fidicuals on one surface relative to the other. Solvematch will try to detect this situation and issue a warning if the scaling along the Z axis is more than 10% different from the scaling along the other two axes. (In the log file, the smaller scaling factor will appear for the Y axis, since the tomogram is still oriented with Y as the thickness dimension.) The program will probably also advise that you switch to specifying that fiducials are on only one surface. This is indeed the solution to this problem.
If you have a data set where the alignment was run on an older version of IMOD (before 3.2.21), solvematch.com will run a script, Matchshifts to find the shift between the two tomograms. This operation can fail. If so, the easiest thing to do is to rerun the fine alignment for both axes, so that the fiducial coordinate files will contain the information that Solvematch needs to find the shifts directly.
10.5. Patch Correlation Problems in Combining
If combine.com exits because neither
Refinematch
nor Findwarp could find
a fit to the patch displacements with a sufficiently low mean residual, then
there are several possible reasons. The patches could be too
small or noisy, leading to widespread random errors. There could be local
regions in the volume where a relatively high proportion of patches have large
errors, a
situation that the outlier elimination algorithm in
Findwarp cannot handle.
Finally, there could be inaccurate displacements only along one or more edges
of the volume. To assess this situation, the first step is to
examine the model of the patch displacements by pressing
Examine Patch Vector Model.
This model shows each displacement as a line whose
length is 10
times the actual length of the displacement.
Spin the model slowly and zoom as
needed to see the pattern of displacement vectors.
You will notice that the Model View Object Edit window is also opened to
provide access to some advanced tools for examining and editing the vectors.
One tool is the ability to display the residuals in the fitting procedures and select vectors with high residuals. Select the Values panel to see the controls for this display. You can turn on Show stored values to see the residual value for each vector displayed in false color. Move the Black slider to give all the residuals below a certain value the color at the low end of the scale (red), and turn on Turn off Low to see just the residuals above that value. By looking at the distribution of vectors with high residuals, as well as the degree of consistency in length and direction between adjacent vectors, you can get a sense of where the fits give the worst results.
The second tool is a set of clipping planes that provide a window on a 600x600 pixel area. This could be useful for examining or editing a region of patches when the model is tilted so that adjacent patches interfere. To activate the clipping planes, select the Clip panel in the Object Edit dialog and toggle Clip plane ON. Use Ctrl and the first mouse button to move the window by shifting the planes around in unison.
To deal with a bad patch fit, consider the following steps in sequence:
subm warpvol volcombine
10.6. Linen Patterns in the Combined Tomogram
Some combined tomograms show a pattern of vertically
and horizontally oriented lines that we refer to as "linen". This pattern
can appear when the reconstructions are particularly noisy or when the
registration between them is not very good. In a 2D Fourier transform, it
shows up as greater power near the X and Y axes than between the axes.
In the 3D Fourier transform, the pattern shows up as greater power in
locations where
data were taken from only one tomogram (locations in the missing wedge of the
other tomogram) than in locations where data were averaged from the two
tomograms. Apparently, when data from the
two tomograms do not agree very well, because of either noise or misalignment,
the averaging reduces the Fourier amplitude significantly. The solution to
this problem is to reduce the amplitudes of data taken from only one tomogram
to match the amplitudes of data averaged from both. Since this is a filtering
operation, it does not happen by default.
To reduce amplitudes, go to Advanced mode on the Final Match page and enter 1 in the text box for Reduction factor for matching amplitudes in combined FFT. A value of 1 should improve the linen pattern; smaller or larger values will give less or more reduction. See the man page for Combinefft for more details. Press Restart at Volcombine to recompute the combined volume.
If the text box is disabled, you have an older version of volcombine.com. To use the reduction, return to the Setup page, recreate the combine scripts, then restart at volcombine.com.
10.7. Block Artifacts in the Combined Tomogram
Sometimes tomograms with large empty spaces will show borders between the
separately combined pieces in the light areas. This happens because of a
mismatch between the very low frequency components in the adjacent pieces.
The problem can be solved by averaging very low frequency components from both
tomograms regardless of whether some of them are in the missing wedge of one
tomogram. To enable this averaging, go to Advanced mode on the
Final Match page and enter a value in the text box
for Radius below which to average components from both tomograms.
Values in the range of 0.01 to 0.015 have been effective in limited testing;
try them first then use a higher value if necessary.
11.1. Scaling and Trimming a Tomogram
The Volume Trimming section of the Post-processing panel
uses Trimvol to
trim a volume and convert it to
bytes. This shell script can run
Findcontrast
to find optimal contrast settings for
converting it to bytes, runs Newstack to make the final byte file, and can
also use "clip flipyz" or "clip rotx" to reorient the data, which
will make the final volume easier to work with in 3dmod. All of these
operations are performed with the default settings when you open the panel.
If you want to trim the volume in X and Y, you can use the rubberband feature in the Zap window to draw a box around the region of interest and then have eTomo collect this information. Press 3dmod Full Volume to load the tomogram into 3dmod. In 3dmod, press the dotted rectangle in the Zap toolbar to turn on the rubberband. Press the first mouse button at the upper left corner of the desired area, and hold it down while dragging to the lower right corner. After the rubberband is set, press Get XY Volume Range from 3dmod in the eTomo Post-processing panel to fill in the X min, X max, Y min, and Y max text boxes in the Volume Range section. If you want to trim the volume in Z as well, fill in the Z min and Z max text boxes with the first and last section that you want to keep.
The scaling of the tomogram to bytes requires some attention. If you simply convert a tomogram to bytes without a contrast setting, then the contrast range for features of interest can be quite compressed and it can be difficult to adjust contrast for viewing in 3dmod. You can avoid this problem by saturating the intensities of gold particles (and other irrelevant features like stain precipitate) when converting to bytes. There are two different methods for determining a good contrast scaling.
First, load the tomogram into 3dmod to determine the starting and ending slices of a range that excludes features whose intensity can be saturated. Select the Find scaling from sections radio button and enter these slice numbers into the associated Z min and Z max text boxes in the Scaling section. Findcontrast will ignore areas within 10% of the edges of these slices. Sometimes this is not good enough to exclude all the features that can be saturated. If this is the case, then use the rubberband to enclose an area that excludes all the extra-dense material through the range of selected slices. Then press Get XY Sub-Area From 3dmod to fill in the B>X min, X max, Y min, and Y max text boxes in the Scaling from sub-area section.
Do not be satisfied if the trimmed volume does not have a good dynamic range for specimen features, e.g., if it requires Black and White sliders settings less than 100 units apart to get good contrast in 3dmod. This can happen if there is gold or stain precipitate in the sampled slices. When this happens, first go back and set up a sub-area for scaling, as just described, or check the area and make it smaller if you have already used one. This should work, but if not, there is an alternative approach: select the Scale to match contrast radio button instead and find the appropriate settings in 3dmod. The simplest way to do this is to adjust the Black and White sliders in 3dmod to give the desired brightness and contrast and enter the values in the black and