The alignment parameter files written by BEAD_ALIGN or MASSNORM are tied to the pixel spacing and tilt angles of a tilt series. If you generate a new tilt series by resampling or binning (i.e. with ReduceRes) or by taking a subset of the tilts, you'll need a modified alignment parameter file to reconstruct the new tilt series. The Alignment File Manipulator can generate the modified alignment parameter file. There is an interactive version with a graphical interface that allows simple manipulations (correcting the shifts for resampling or taking a subset of the tilts); a command-line application, tfalignment, can do more (merge alignment results calculated relative to the same reference, generate alignment parameter files from scratch).
As an example, assume that a.stk is a 2048 x 2048 tilt series with alignment parameters that have been calculated and stored in a.bprmMn. To compute the alignment parameters for a_half.stk, a version of a.stk resampled to 1024 x 1024, run the Aligment File Manipulator with the input file as a.bprmMn, the output file as a_half.bprmMn, the sampling ratio as 0.5, while leaving the other parameters (projection range and step size) at their default values.
Overview | Input file | Output file | Sampling ratio | Projection range | Step size | Command line
Priism | Bead align | Bead align (interactive) | Massnorm | Reconstruction | ReduceRes
For the interactive Alignment File Manipulator, use the "Input file" field to enter the name of the .bprm file (from BEAD_ALIGN) or .bprmMn file (from MASSNORM) that you want to convert. You can use the button adjacent to the field to bring up a file browser for selection of the file.
For the interactive Alignment File Manipulator, use the "Output file" field to enter the name for the output parameter file. You can use the button adjacent to the field to bring up a file browser for selection of the file.
Let x1 be the x pixel spacing of the tilt series used to generate the input alignment parameter file and x2 be the x pixel spacing of the tilt series for which you want to generate a new set of alignment parameters. Then enter the ratio of x1 to x2 in the "Sampling ratio" field.
Like the other alignment and reconstruction applications, the Alignment File Manipulator assumes the pixels in the tilt series are square: i.e. the ratio calculated above will hold true for the y pixel spacing as well.
If the tilt series for which you are calculating the new alignment parameters has a subset of the projections from the tilt series used to generate the input alignment parameter file, use the "Projection range" field to limit the projections included in the output alignment parameter field. The first value in the field is the index of the first tilt to include and the second value in the field is the index of the last tilt to include. Indices start from zero: an index of zero refers to the first projection in the tilt series used to generate the input alignment parameter file.
If the tilt series for which you are calculating the new alignment parameters takes every 2nd (or 3rd, etc...) projection from the tilt series used to generate the input alignment parameter file, the set the value in the "Step size" field to be the increment between the projections extracted. If you use every other projection, then use a step size of 2; if you reversed the order of the projections, use a step size of -1.
A command-line application, tfalignment, provides the same operations as the interactive Aligment File Manipulator and some additional capabilities as well. To reproduce the example from the overview (calculate alignment parameters from a.bprmMn for a tilt series at half the x and y resolution), use
tfalignment a.bprmMn -ratio=0.5 -out=a_half.bprmMn
The full command-line syntax is (optional parts are shown in braces; parts to be replaced with a value appropriate for your case are shown in italics; options which are mutually exclusive are show separated by vertical bars):
tfalignment [input_param_file [-ratio=r] \
[-istart=is] [-iend=ie] [-istep=ii] \
[-ostart=os] [-ostep=oi]] ... \
[-out=out_name] [-nv=count] [-align|-massnorm] \
[-title=label] \
[-stk=stk_name [-istart=is] \
[-iend=ie] [-istep=ii] [-ostart=-os] \
[-ostep=oi]] ... \
[-rot0=[angle][:delta]] \
[-tilt=[angle][:delta[:index]]]
Essentially, there can be zero or more input parameter files. For each
input parameter file you can set the x pixel spacing relative to the output
(via -ratio), which projections are extracted (via
-istart, -iend, and -istep), and how
those projections are numbered in the output parameter file (via
-ostart and -ostep). Set the name of the
output parameter file with -out. If you want the output parameter
file to have parameters for exactly count projections, use
-nv to set count. -align forces
the output to be in the .bprm (BEAD_ALIGN) format; -massnorm
forces the output to be in the .bprmMn (MASSNORM) format. Use
-title to control what tfalignment writes to the first line
in the output. The remaining options only come into play if the output
projections include projections that can not be drawn from one of the input
parameter files (that is only possible if you use -nv,
-ostart, or -ostep). For additional information
about a specific option or argument, consult the list below.
-ratio=r-istart=is-stk). If you do not
specify the first projection to use for a file, tfalignment will start
from the first projection.
-iend=ie-istep=ii-ostart=os-istart)
from the previous input parameter file or tilt series. os is
the zero-based index of the destination projection. If you do not set the
destination projection for the first projection taken from a file,
tfalignment assumes that the destination is the first projection in the
output.
-ostep=oi-out=name-nv=count-align-align and -massnorm as an error. If
you do not set the output format with -align or
-massnorm, tfalignment writes the output in .bprm format if
there are one or more input parameter files and all those input parameter
files are in the .bprm format; otherwise, tfalignment writes the output
in .bprmMn format.
-massnorm-align for more details.
-title=label-stk=stk_name-stk option, you may specify -istart,
-iend, and -istep to control which projections
are used from a tilt series and -ostart and
-ostep to control how the selected projections are mapped
to the output parameter file. tfalignment only looks at the tilt series
for a tilt angle value if it can not determine the tilt angle value from
one of the input parameter files. You may specify multiple -stk options.
tfalignment searches the tilt series for tilt angle values in the
order they appear on the command line; tfalignment stops the search as
soon as it locates a match.
-rot0=angle[:delta]-tilt=[angle][:[delta][:index]]-tilt=:...)
tfalignment assumes a value of zero. If you do not supply a value for
index, tfalignment assumes a value of zero. delta
is the difference, in degrees, between the tilt angles of projection i+1
and projection i for any non-negative value of i. If you do not
set delta, tfalignment assumes a value of 0.