Name
align2d - Perform 2-D alignment of two images
Usage
alpha, sxs, sys, mirror, peak = align2d(image, refim, x_range, y_range, ts_step, first_ring, last_ring, ring_step, mode)
Warning: this command will not check the mirror orientation, for consistency, flag mirror is always returned as zero
Typical usage
- find the alignment parameters between an image and a reference image refim:
alpha, sx, sy, mir, peak = align2d(image, refim)
- the same including translation search:
alpha, sx, sy, mir, peak = align2d(image, refim, xrng=5, yrng=3, step=1, first_ring=1, last_ring=26, rstep=1, mode = 'F')
Input
- image
- 2D input image
- refim
- 2D input reference image
Output
- alpha
angle of rotation from the imput image to reference image, alpha > 0
- sxs
- value of the alignment shift on x axis
- sys
- value of the alignment shift on y axis
- mirror
- NOT IMPLEMENTED, return 0
- peak
- peak value of the cross correlation coefficient
Options
- x_range
- range for translation search in x direction (set to 0)
- y_range
- range for translation search in y direction (set to 0)
- ts_step
step between rings in rotational correlation >0 (set to 1)
- first_ring
inner radius for rotational correlation > 0 (set to 1)
- last_ring
outer radius for rotational correlation <int(nx/2)-1 (set to int(nx/2)-2, should be set to the radius of the particle)
- ring_step
step between rings in rotational correlation >0 (set to 1)
- mode
- 'F' for search in the full rings, or 'H' to search in the half rings (set to 'F')
Description
Find alignment parameters between two 2D images.
Author / Maintainer
Pawel A. Penczek
Keywords
- category 1
- UTILITIES
Files
alignment.py
Bugs
None. It is perfect.