## Bsoft program

# bmgalign

### Usage: bmgalign [options] input.star [input2.star...]

Aligns micrographs within sets such as focal series specified in parameter files.

### Actions:

-align mic | Alignment type: par = particle coordinates, mic = micrograph images, fea = micrograph features.
-add | Add micrograph coordinates and particle origins (default not).
-filterextremes | Filter micrograph extremes before aligning.

### Parameters:

-verbose 7 | Verbosity of output.
-number 3 | Number of micrographs per field-of-view (default 1).
-fieldID dbgd | Set the field ID (multiple micrographs will get numbered ID's).
-reference 2 | Reference micrograph in a series (default 1=first micrograph).
-datatype u | Force writing of a new data type.
-sampling 1.5,1.5,1.5 | Sampling (A/pixel; a single value can be given).
-correlate 1024,1024,5 | Size of subimages for correlation (default 512,512,1, use with -align mic).
-resolution 900,300 | High and low resolution limits for bandpass (default 0.1,1000 angstrom).
-maxshift 55 | Maximum allowed shift (default 1/4 of tile).
-threshold -3.0 | Threshold used to pick features (in std dev units; default -3, use with -align fea).
-features 1,55 | Features type (1=mass, 2=area, 3=darkest pixel) and maximum number (default 1,unlimited).

### Output:

-output file.star | Output parameter file.
-image file.pif | Output multi-image file with aligned images.

### Examples:

| The set of input files reference a series of micrographs arranged in
| fields-of-view where each field contains a focal pair or set. The program then
| calculates for each set the alignment of all other micrographs with respect
| to the reference micrograph (typically the further-from-focus micrograph),
| and outputs a new STAR format file with the alignment parameters and particle
| coordinates corresponding to the alignment. The alignment can be done in
| three different ways:
| 1. Alignment by cross-correlation (recommended):
| bmgalign -v 7 -reference 2 -align mic -correlate 300,300,1 -out out.star input.star
| 2. Alignment by feature extraction:
| bmgalign -v 7 -ref 2 -resol 300,1000 -align fea -thresh -2.8 -out out.star input.star
| 3. Alignment using picked particle coordinates:
| bmgalign -v 7 -ref 2 -align part -output out.star input.star
| All input is derived from a STAR format parameter file.
| A series (such as a focal pair) is assumed to be consecutive data blocks in the STAR file.
| Orientational parameters are calculated so that applying them to the first
| data set or image produces the others in the focal series.
| Angles are given with positive counter-clockwise.

Bsoft version 2.0.3-20180917 (64 bit)