em_map_utils.demos.demo_map_covariance¶
demo_map_covariance.py
- Author:
Ardan Patwardhan
- Affiliation:
EMBL-EBI, Wellcome Genome Campus, CB10 1SD, UK
- Date:
04/08/2025
- Description:
Demonstrate the use of estimating map principal axes. A cuboid is first rotated by a known angle. The principal axes of the rotated map are used to estimate the back rotation of the map which is then applied to the map. Orthogonal surface views of the initial cuboid and the back-rotated cuboid are plotted and can be compared. They should be the same unless something has gone wrong with either the map rotation or the principal axes determination.
Attributes¶
Functions¶
|
A cuboid (or an optionally specified input map) is first rotated |
Module Contents¶
- em_map_utils.demos.demo_map_covariance.logger¶
- em_map_utils.demos.demo_map_covariance.plot_back_rotated_cuboid(in_file, lengths, box_size, rotation, cubify, out_file)¶
A cuboid (or an optionally specified input map) is first rotated by a known angle. The principal axes of the rotated map are used to estimate the back rotation of the map which is then applied to the map. Orthogonal surface views of the initial map and the back-rotated map are plotted and can be compared.
- Parameters:
in_file – Path to the optional input map or None.
lengths – Lengths of the cuboid.
box_size – Size of the 3D volume box.
rotation – Euler angle of rotation in an intrinsic frame following Z-Y’-Z” convention.
cubify – If the map is not cubic, pad it to the largest dimension before rotation operations.
out_file – Optional file to save the figure to.
- Returns:
No return value.
- em_map_utils.demos.demo_map_covariance.parser¶