get_grid_around_beam_direction#

diffsims.generators.rotation_list_generators.get_grid_around_beam_direction(beam_rotation, resolution, angular_range=(0, 360))[source]#

Creates a rotation list of rotations for which the rotation is about given beam direction.

Parameters:
beam_rotationtuple

A desired beam direction as a rotation (rzxz eulers), usually found via get_rotation_from_z_to_direction.

resolutionfloat

The resolution of the grid (degrees).

angular_rangetuple

The minimum (included) and maximum (excluded) rotation around the beam direction to be included.

Returns:
rotation_listlist of tuples

Examples

>>> from diffsims.generators.zap_map_generator import get_rotation_from_z_to_direction
>>> beam_rotation = get_rotation_from_z_to_direction(structure, [1, 1, 1])
>>> grid = get_grid_around_beam_direction(beam_rotation, 1)