BeamTilt2D#

class abtem.tilt.BeamTilt2D(tilt_x, tilt_y)[source]#

Bases: BaseBeamTilt

Class describing 2D beam tilt.

Parameters:

tilt (array of BeamTilt) – Tilt along the x and y axes [mrad] with an optional spread of values.

__init__(tilt_x, tilt_y)[source]#

Methods

__init__(tilt_x, tilt_y)

apply(waves[, max_batch])

Apply tilt(s) to (an ensemble of) wave function(s).

copy()

Make a copy.

ensemble_blocks([chunks])

Split the ensemble into an array of smaller ensembles.

generate_blocks([chunks])

Generate chunks of the ensemble.

Attributes

axes_metadata

List of AxisMetadata.

base_axes_metadata

List of AxisMetadata of the base axes.

base_shape

Shape of the base axes.

distributions

ensemble_axes_metadata

Axes metadata describing the ensemble axes added to the waves when applying the transform.

ensemble_shape

The shape of the ensemble axes added to the waves when applying the transform.

metadata

Metadata added to the waves when applying the transform.

shape

Shape of the ensemble.

tilt_x

Beam tilt along the x-axis.

tilt_y

Beam tilt along the y-axis.

apply(waves, max_batch='auto')#

Apply tilt(s) to (an ensemble of) wave function(s).

Parameters:
  • waves (Waves) – The wave function(s) to apply the tilt to.

  • max_batch (int or str, optional) – The maximum batch size used in the calculation. If ‘auto’, the batch size is automatically determined. Default is ‘auto’.

Returns:

waves_with_tilt

Return type:

Waves

property axes_metadata: AxesMetadataList#

List of AxisMetadata.

property base_axes_metadata: list[AxisMetadata]#

List of AxisMetadata of the base axes.

property base_shape: tuple[int, ...]#

Shape of the base axes.

copy()#

Make a copy.

Return type:

Self

property ensemble_axes_metadata: list[AxisMetadata]#

Axes metadata describing the ensemble axes added to the waves when applying the transform.

ensemble_blocks(chunks=None)#

Split the ensemble into an array of smaller ensembles.

Parameters:

chunks (iterable of tuples) – Block sizes along each dimension.

Return type:

Array

property ensemble_shape: tuple[int, int]#

The shape of the ensemble axes added to the waves when applying the transform.

generate_blocks(chunks=1)#

Generate chunks of the ensemble.

Parameters:

chunks (iterable of tuples) – Block sizes along each dimension.

Return type:

Generator[tuple[tuple[int, ...], tuple[slice, ...], ndarray], None, None]

property metadata#

Metadata added to the waves when applying the transform.

property shape: tuple[int, int]#

Shape of the ensemble.

property tilt_x: BaseDistribution | float#

Beam tilt along the x-axis.

property tilt_y: BaseDistribution | float#

Beam tilt along the y-axis.