Handlers
This module contains some tools which simplify working with IMOD alignment metadata from Python.
yet_another_imod_wrapper.utils.etomo.EtomoOutput
Convenient retrieval of outputs from an Etomo alignment project.
For details see the source code.
Source code in src/yet_another_imod_wrapper/utils/etomo.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
yet_another_imod_wrapper.utils.xf.XF
Convenient retrieval of properties from IMOD xf data.
An xf file contains one line with six numbers per image in the tilt-series, each specifying a linear transformation:
A11 A12 A21 A22 DX DY
where the coordinate (X, Y)
is transformed to (X', Y')
by:
X' = A11 * X + A12 * Y + DX
Y' = A21 * X + A22 * Y + DY
The rotation center in IMOD is at (N-1) / 2
where N
is the
number of elements in each dimension. This calculates a 0-indexed
coordinate.
Source code in src/yet_another_imod_wrapper/utils/xf.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
shifts: np.ndarray
property
(n, 2)
array of (DX, DY)
from xf data.
These shifts are applied after rotation/skew.
transformation_matrices: np.ndarray
property
(n, 2, 2)
array containing A11, A12, A21, A22
from xf data.
in_plane_rotations: np.ndarray
property
(n, )
array of in plane rotation angles from xf data.
Angles are in degrees and counter-clockwise angles are positive.
image_shifts: np.ndarray
property
(n, 2)
array of xy shifts aligning tilt-images with the projected specimen.
Rotation center is in IMOD convention (N-1) / 2
.
specimen_shifts: np.ndarray
property
(n, 2)
array of xy shifts aligning the projected specimen with tilt-images.
Rotation center is in IMOD convention (N-1) / 2
.