Interactive BEAD_ALIGN

Overview

BEAD_ALIGN, in either its automatic or interactive versions, is the last step in the alignment process. The interactive mode of BEAD_ALIGN provides a platform to solve "in vivo" any potential problems in bead alignment. There are three dialogs that are used when working with interactive BEAD_ALIGN:

The advantages of the interactive version of BEAD_ALIGN over the automatic one are:

Topics

Overview | Fitting procedure | Bead display | Recipe for use | Interface items

Related Priism Topics

Priism | Alignment | Bead finder | Bead matcher | Bead chaser | Bead align | Bead list editor | Reconstruction


Fitting

There are four steps in each round of fitting:

  1. If this is the first round of fitting (BEAD_ALIGN was just started or the Restart button was pressed), an initial guess for the fit parameters is calculated. This is done by setting the in-plane rotation angles to the linear function set with the rot0 input parameter, setting the magnification to one for all the projections, and estimating the image shifts by looking for beads common to nearby sections. This process can fail if there are insufficient common beads between a section and its neighbors or if there aren't a sufficient number of beads on the reference section. If the initialization fails and the program was just started, it will quit, and you'll need to use the bead list editor to add more bead locations (in some instances you may be able to resolve the problem by increasing the nSkip input parameter. If it fails after the Restart button was used, you'll be left with the result of the previous fit, and should add more bead positions (see Bead display for details).
  2. If the first step wasn't performed (i.e. have the results of a previous round of fitting to use), then the bead list is scanned to find those locations that match the criteria for exclusion from the fit:
  3. The positions available for fitting are then examined to verify that there are a sufficient number of data points to determine the alignment parameters. If there are not (one reason why this would be the case is that there were fewer than four beads that were fit on any one section), the fitting process will terminate and either the initial guess from the first step or the last fit result will be reported. To obtain a successful fit, you'll either have to relax the criteria for excluding bead positions (increasing thPuri is the typical way to do this) or add more bead positions (see Bead display for details).
  4. The final step is to do the least-squares fit of the selected bead positions. On rare occasions this can fail, and the result will be the last estimate of the alignment parameters. One cause of failure is that the maximum number of iterations (set by the cycles input option) was exceeded. A possible solution is to do another round of fitting; it may be that the initial guess was sufficiently far from the best fit that a large number of iterations was needed. In other cases, the combination of the input bead list and the starting values for the alignment parameters is not allowing the algorithm to converge. If it wasn't the first round of fitting, you might try the Restart button to see what happens with a different initial guess for the alignment parameters. Otherwise, you'll want to check the input bead list and correct any inconsistencies.

Topics

Overview | Fitting procedure Bead display | Recipe for use | Interface items


Bead display

Information about the bead positions and the positions resulting from the fit of the alignment parameters is displayed in a bar chart form, and when enabled with the Image toggle the positions are overlayed on the image data from the data stack.

The bar chart displays the difference (in pixels) between the input position for a bead and the result from fitting the alignment parameters. The positions for a single bead are shown on a single row in the chart; the bead locations on one section appear in a single column on the chart.

If a bead is not present in a section, no bar is shown in the corresponding chart entry. A full-height bar in the chart is equivalent to a distance of thDisp pixels; differences larger than the maximum value are just shown as the maximum value. The amount by which any difference exceeds the distance threshold, thPuri, for excluding a bead from the next round of fitting is shown in red. If thPuri is greater than the maximum distance shown, the red portion will not be visible; its good practice to set the maximum distance shown larger than the exclusion threshold.

Along the top of the chart, the tilt angle for each section and the index of each section is shown above the column corresponding to that column. The index of every tenth section is highlighted in a light blue. At the bottom of the chart, the index of the section and the number of bead positions on the section which are below the exclusion threshold are shown. Any section where the number of beads below the threshold is less than the minimum needed for fitting is highlighted in red. Any section where the bead positions have been edited since the last round of fitting is highlighted in purple.

With the mouse, there are three actions you can perform with elements of the bar chart. The toggles on the left hand side of the chart control whether or not a bead is included in the next round of fitting. When the Image toggle is on, clicking the left mouse button while the cursor is over a bar will cause the image window to display the section and circle the bead position for that bar. When the mouse button is over one of the number of bead position for fitting at the bottom of the chart, clicking with the left mouse button will cause the image display window to display that section.

In the image display window, the fitted positions of the beads are shown with green Xs. The fitted positions are labeled by the bead number. The significance of the color of the label is:

red
This bead will be used in the next round of fitting (set by the toggles to the right of the bar chart), and it has a position on this section recorded in the input bead list.
green
This bead will be used in the next round of fitting, but no position for this section is available in the input bead list.
pink
This bead will not be used in the next round of fitting. The input bead list has a position for this bead on this section.
blue
This bead will not be used in the next round of fitting. The input bead list does not have a position for this bead on this section.

When the image window has the bead position overlayed on it, you can edit the positions of the beads with the mouse. To move a position which is present in the input bead list (i.e. shown as a red X), make sure the del BPos toggle (delete position toggle) is off in the interactive BEAD_ALIGN dialog, position the cursor over the bead location to be moved, depress and hold the left mouse button while moving the cursor to the desired location, and then release the left mouse button. The procedure for adding a position which is not present in the input bead list is similar: make sure the delete position toggle is off, position the mouse over the fitted location of the bead (marked with a green X), depress and hold the the left mouse button while moving the cursor to the desired location, and release the mouse button. To remove a position present in the input bead list, make sure the delete position toggle is on, position the cursor over the input position (red X) to be removed, and click the left mouse button.

Topics

Overview | Fitting procedure | BeadDisplay | Recipe for use | Interface items


Recipe for Use

This is the typical procedure used with interactive BEAD_ALIGN:

  1. Set the input parameters in the main alignment dialog. The input parameters are described in BEAD_ALIGN.html.
  2. Select the interactive mode for BEAD_ALIGN in the main alignment dialog (i.e. the interactive toggle is on) and turn on BEAD_ALIGN (the toggle to the left of the BEAD_ALIGN button. Then press the DoIt button to start interactive BEAD_ALIGN.
  3. Examine the results in the bar chart display. Each bar represents the distance between an input position and the fit result. A full-height bar represents a distance of thDisp pixels, and larger distances are just shown as the maximum distance. If a position is not present in the input, no bar will be shown. The bead positions which would be excluded from the next round of fitting based on the distance threshold, thPuri, will have part of their bar displayed in red (if thPuri is greater than or equal to thDisp, this red part will not be visible; you'll want to set thDisp to be more than the exclusion threshold). The number of non-excluded bead positions is on each section is shown at the bottom of the bar chart; for sections where it is less than four (the minimum needed), the number is highlighted in red.
  4. If the errors in the fit are excessive (a rule of thumb is that they should be less than one pixel), adjust bead positions and the exclusion threshold, thPuri for the next round of fitting. Editing of the bead list is described in more detail in Bead display. At a minimum, you'll need to make sufficient adjustments so that no sections have fewer than four bead locations that will be fit.
  5. If you want another round of fitting and the thresholds and positions have been adjusted, press the Fit button to start from the current estimates of the alignment parameters. The Restart button will also start another round of fitting, but it does not use the current estimates for the alignment parameters as its starting point and it does not exclude bead positions based on the distance threshold. It is useful if you can not set a reasonable threshold for thPuri and have enough beads locations on each section of if starting from the current alignment estimates does not cause the fit algorithm to converge appropriately.
  6. Repeat steps three through five until you are satisfied with the errors in the fit. Then exit the program and save the final alignment parameters and the edited bead list using the Exit button. The Quit button causes the program to exit without saving the results.

Topics

Overview | Fitting procedure | Bead display | Recipe for use | Interface items


Interface Items

For a description of the bar chart and how to use the bead positions overlayed on an image window, see Bead display. The links below describe the buttons and fields located on the left edge of the interactive BEAD_ALIGN dialog.

Buttons and Fields

Image | del BPos | Window | Merge | thDisp | thPuri | Fit | Restart | Exit | Quit

Topics

Overview | Fitting procedure | Bead display | Recipe for use | Interface items


Image Toggle

When this toggle is on, the bead positions from the input list and the result of fitting the alignment parameters are displayed in the input window whose number is shown in the Window field. Bead display has a description of the coloring scheme used and how to edit the bead positions with the mouse.

When this toggle is off, the bead positions are not displayed in an image window. When you turn the toggle on, the program will connect to an existing window which displays the data stack (it does this by looking for it by name; the name it uses is specified by the IdatFile); if the data stack has not been loaded into an image window, you'll be presented with a dialog to perform the load.

Return to the list of interface items


del BPos Toggle

When this toggle is off, you can either change or add bead positions in the input bead list. When it is on, you can delete positions from the input bead list. Bead display has more information about how to perform these operations.

Return to the list of interface items


Window Field

When the Image toggle is on, this field shows the number of the image window on which the bead positions are overlayed. When the image toggle is off and is turned on, the number in this field is the window number that will be created by default if the data stack is not already open.

Return to the list of interface items


Merge Field

Sorry, this hasn't been documented yet.

Return to the list of interface items


thDisp Field

This field shows the distance in pixels that corresponds to a full-height bar in the bar chart display. For bead positions where the distance between the input bead position and the fitted position exceeds this value, a full-height bar is used. After each round of fitting, the distance corresponding to a full-height bar is reset to two times the average distance between input and fitted bead positions.

Return to the list of interface items


thPuri Field

The value shown in this field is the distance threshold for using a bead position in the next round of fitting; positions where the input bead position and the previous fit result are separated by more than this number of pixels are not included in the fit. Such bead positions will have the upper part of their bars in the bar chart painted red (the red part will only be visible if thDisp is larger than the distance threshold).

An appropriate value for the distance threshold should be chosen before starting the next round of fitting. If there are not enough beads (fewer than four) on a section which do not exceed the threshold, there will be insufficient data to perform the fit. All sections where this condition holds are flagged with a red entry on the nb line at the bottom of the bar chart. You can either choose a more generous distance threshold or edit bead positions to remedy the problem.

Return to the list of interface items


Fit Button

Use this button to start a new round of fitting using the current estimate of the alignment parameters as the starting point. For details about the fitting process, see Fitting.

Once the fit completes successfully, the bar chart and thDisp level will be updated to reflect the new differences between the input positions and the fit results. A *.out file (the name is set by the OdocFile argument when the program is started) will have a record of the initial and final alignment parameters for the fit, 3D bead locations, sum of the squares of the differences between the fit and the input data, and the input and fitted positions for the beads in each section.

Return to the list of interface items


Restart

This button can be used to do another round of fitting just as the Fit button does, but it is different in two important ways:

Using Restart rather than Fit is useful when the previous round of fitting failed leaving you in a situation where you can not set a reasonable distance threshold, thPuri, or the fit algorithm is unable to progress from the initial conditions left by the last round of fitting.

Return to the list of interface items


Exit Button

Use this button to exit the program, save the calculated alignment parameters (in a *.bprm file) and rewrite the input bead list (*.sl file) with any modifications that were made. The original input bead list is copied to a *.sl_old file.

Return to the list of interface items


Quit Button

Use this button to quit the program without saving the alignment parameters (*.bprm file) or rewriting the input bead list (*.sl file) with any modifications that were made.

Return to the list of interface items