Refine Alignment is a front-end for an iterative refinement of the alignment parameters for EM tomography. Unlike EMTIAR, the other application which performs iterative refinement of the alignment, Refine Alignment does not simultaneously improve the reconstruction. Refine Alignment's algorithm is:
The basic recipe for refining your alignment parameters with Refine Alignment is:
Besides a log file, Refine Alignment generates an alignment parameter file for each iteration. The names for these files are the contents of the "OutParamBase" field with an underscore, the iteration number, and the extension of the input alignment parameter file appended.
Overview | Resolution | Apply massnorm | Prefilter | Reconstruction shift | Reconstruction Z size | Number of reconstructions | Number of runs | Temporary directory | Parallel | Starting run number | Resolution scale | Full size | Weighting function | Particle XZ size | Hamming filter | Alignment method | Simplex filter | Offset | Phase weighting | Wiener coefficient | Center peak distance | 2nd peak threshold | Simplex deviations | Command line
Priism | Batch processing interface | EMTAR | BALIGN | EMTIAR | two tilt series alignment
The resolution parameter selects which resolution to process from the input tilt series. 0 is the highest (full) resolution. Normally all that you need to do to process a different resolution is set the resolution parameter. There are other parameters in the special parameters dialog that affect the handling of different resolutions (resolution scale and full size), but in typical cases the user interface chooses correct defaults for those parameters.
The default behavior for Refine Alignment is to generate a mass-normalized (but not aligned) version of the input tilt series prior to starting iterations. The toggle button next to "Apply massnorm" controls whether or not to perform this initialization step. If you have already applied the mass-normalization parameters to the input tilt series, turn the toggle button off; otherwise, make sure it is on.
Two controls affect the application of the mass-normalization parameters during the initialization step. The menu at the end of the "Apply massnorm" line allows you to select the image formation model. You have three choices:
The other control is the pcBase field in the special parameters dialog. For the scaled linear or logarithmic image formation models, the value in that field controls the contribution of an additive term corresponding to a sheet of uniform mass density. The documentation for appl_prm has more information about the pcBase parameter.
For single axis tilt series, it is beneficial to apply a filter to remove the high frequency information in the input tilt series. If the toggle button next to the "Prefilter" field is on, a first order Butterworth filter is applied to the input tilt series. The cutoff frequency for the filter is the value in the "Prefilter". A value of one for the cutoff frequency corresponds to the Nyquist frequency for the data.
These three values (they are in units of pixels) shift the imaginary 3D tilt axis of the projection data from its default location; they are used to center the reconstruction volume on an object of interest. The default orientation of the 3D tilt axis has it pass through the point whose x and y coordinates are the center of the reference projection.
This value sets the size of the z dimension, in pixels, for intermediate reconstructions. If you modify the value, you will also change the value for the z particle size in the "Special Parameters" dialog.
The value in the "# of reconstructions" field controls the number of reconstructions calculated during each iteration. More reconstructions per iteration increases the number or projections used to compute each projection (thus improving the quality of the reprojection) at the cost of increasing the amount of computation time. The absolute minimum number of reconstructions per iteration is two. The practical lower limit is three: for that case the computed reprojection for a projection will include the contributions from both of the adjacent projections. The upper limit is the number of projections in the tilt series: if you specify a larger value it will not affect the result or the computation time.
The value in the "Number of Runs" field is the number of iterations that should be performed to refine the alignment parameters.
Refine Alignment will use the directory specified in the "Temporary directory" field for storage of the temporary results: the mass-normalized tilt series from the initialization step (a floating-point data set which has the same dimensions as the input tilt series), the aligned tilt series (a floating-point data set with the same dimensions as the input tilt series), a reconstruction (a floating-point data set with the same x and y dimensions as the input tilt series and a z dimension set by the z size of the reconstruction), a template tilt series (a tilt series with every nth projection where n is the number of reconstructions), and the reprojection result (a floating-point data set which is the same size as the input tilt series). At any given time, the temporary files present will be the result of the initialization step, if any, and either the aligned tilt series and reconstruction, the reconstruction, template tilt series, and reprojection result, or the reprojection result. If you use the parallel mode, additional space equivalent to another copy of the reconstruction will be used, and, if you use a machine list and one or more of the input files are not visible to some of the nodes, there will be copies of those as well.
By default, the temporary directory is a directory named tmp within your home directory. If you are using the parallel execution mode, the temporary directory should be accessible under the same name to all the computers used. You might change the temporary directory if you were short on space in the default directory or the default directory was on a slow disk and you have a fast disk with enough space for the temporary files.
The iterations of Refine Alignment will be numbered from the value in the "Starting run number" field to the value in the "Starting run number field" plus the number of runs minus one. That numbering only affects the names of the output alignment parameter files. If you had previously done n iterations and wanted to see the effect of performing m more with a record of the alignment parameters for all of the m plus n iterations, you would set Refine Alignment so the input alignment parameter file was the output alignment parameter file from the nth iteration, the number of runs was m, and the starting run number was n plus one.
The resolution scale parameter controls the scale factor applied to the alignment parameters and to the size-related input parameters (reconstruction shift, reconstruction z size, particle xz size, and characteristic lengths for the x and y shifts). In the typical case where you select a resolution level to process from the main dialog, the resolution scale factor will be set appropriately. In the case where you are running the iterative alignment and reconstruction on a downsampled tilt series but the input alignment parameters are from a higher resolution version of the data set, you should set the resolution scale to be the same as the downsampling factor (if the data is scaled down by a factor of four relative to the coordinates used for the alignment parameters, set the resolution scale parameter to four) and also adjust the values for the dimensions of the higher resolution data set.
These two values set the x and y dimensions, in pixels, for the tilt series corresponding to the alignment parameters in the input alignment parameter file. For most cases the user interface can correctly determine these values from the dimensions of the input tilt series. One case where you will have to manually change these values is if you use a downsampled tilt series as the input to the iterative alignment and reconstruction but the input alignment parameters correspond to a higher resolution version of the same tilt series. In that case, you should enter the dimensions, in pixels, of that higher resolution tilt series in the "Full size" field and also adjust the resolution scale.
The "Weighting function" menu controls the type of weighting done in the weighted backprojections. You have two choices:
The two values in the "Particle XZ size" field are, respectively, the x and z dimensions in pixels of the particle assumed when computing the elliptical and elliptical-square weighting functions for the backprojection. By default, the particle's x dimension is the same size as the x dimension of the input tilt series, and the particle's z dimension is the same size as the z dimension for the intermediate reconstructions.
When the "Hamming filter" toggle button is on, a Hamming filter is applied prior to the backprojection. When it is off, a Hamming filter is not applied prior to the backprojection.
Sets the method to use for alignment. You have three choices:
If the "Simplex filter" toggle button is on and you have selected an alignment method that includes the simplex optimization, a high pass filter will be applied to the data sets prior to the simplex optimization. When the "Simplex filter" toggle button is off, a high pass filter is not applied prior to the simplex optimization.
If the "Offset" toggle button is on and you have selected an alignment method that includes Talign, a shift along the tilt axis will be induced with the intent of keeping the peak corresponding to the best shift parameters (that peak would likely be near the origin if the input alignment parameters are sufficiently good) away from the origin which receives special treatment. Before the alignment parameters are written out, the program compensates them for the induced shift. When the "Offset" toggle button is off, no shift along the tilt axis is induced when using one of the methods which include Talign.
If the "Phase weighting" toggle button is on and you have selected an alignment method that includes Talign, phase weighting will be performed to enhance the cross-correlation peak at the expense of less robustness in the face of noise. When the "Phase weighting" toggle button is off, phase weighting is not used to enhance the cross-correlation peak.
When you use phase weighting of the cross-correlations, there is a term like that in a Wiener filter to keep things well behaved when the amplitude of the cross-correlation value in the frequency domain approaches zero. The term is an estimate of the high-frequency power spectral density times the value in the user interface's "Wiener coefficient" field. A higher value for the "Wiener coefficient" increases the suppression of the low amplitude components. The default value is 100.
With the alignment methods that include Talign, the alignment algorithm will try to cancel out the effect of a peak at the origin by subtracting out a radial average over the central 7 x 7 region from that region. The alignment application only performs that subtraction if the largest value in the central 7 x 7 region occurs at the center and the quadratic fit to that point and its four nearest neighbors gives a peak position, (xp, yp), where both the absolute value of xp and yp are less than a threshold value. The threshold value is, by default, 0.05 pixels, You can change the threshold by modifying the value in the "Center peak distance" field.
With the alignment methods that include Talign, the algorithm prefers peaks in the cross-correlation that are away from the origin and only takes the peak at the origin if the next highest peak (after masking out the origin) has a height less than f times the height of the peak at the origin. The default value of f is .001. In the graphical user interface, alter the value in the "2nd peak threshold" field to alter the value of f.
These six parameters set the characteristic length for each of the six alignment parameters that can be refined when aligning a section from the tilt series to a section from the reprojection. A characteristic length scale of zero for a parameter causes the simplex method to not refine that parameter; in the graphical user interface, you turn on or off the refinement of a parameter with the toggle button adjacent to the field which displays the characteristic length. The six alignment parameters are the x shift (in pixels), y shift (in pixels), rotation (in radians), isotropic magnification factor, the orientation angle for the anisotropic stretching axis (in radians), and the anisotropic stretching factor. The first four parameters have a direct effect on the output alignment parameters. The last two (the orientation of the anisotropic stretching direction and the anisotropic stretching factor) do not.
Refine Alignment simply generates a script that runs the command-line application, ra. The command-line syntax for ra is (optional parts are enclosed in brackets):
ra input_tilt_series input_align_param \
output_align_param_base [options]
The options that ra understands are:
-bkgopt=option
-rshcmd= when that command is to be run
in the background. By default, ra uses "-n" as the option.
-cpd=d
-dev=xs:ys:rot:mag:axis:stretch
-filter=type
-fullsize=nx:ny
-hdfilt=i
-imform=code
-imod=m
-machinefile=file
-machinefile= to set the name of the file containing the list
of processors to use. The format of the file is described in the
documentation describing parallel execution.
If you wish to use parallel execution on a machine with multiple
processors, do not use -machinefile= or use it with an empty
file name.
-mult=s
-no_nodecheck
-machinefile=,
disables the checks on whether all of the compute nodes can see the
temporary directory and whether copies of input or output files have to
be kept in the temporary directory for the compute nodes that would
otherwise not be able to see those files. Only use this option if you
know the temporary directory and other files are visible to the compute
nodes and you want to avoid the extra overhead of the additional checks.
-nofilter
-nooffset
-np=n
-machinefile= is used with a non-empty
file name, ra will by default use all the processors listed in that
file; otherwise, ra defaults to using two processors.
-nrecon=n
-parallel
-pcbase=b
-phaseweight
-prefilter=c
-reconz=nz
-res=i
-rscale=i
-rshcmd=cmd
-runs=n
-shxzy=xshift:yshift:zshift
-sizexz=x:z
-skip_init
-spth=t
-start=i
-tmpdir=directory