WavesBuilder#

class abtem.waves.WavesBuilder(ensemble_names, device, tilt=(0.0, 0.0))[source]#

Bases: BaseWaves, Ensemble, CopyMixin, EqualityMixin

__init__(ensemble_names, device, tilt=(0.0, 0.0))[source]#

Methods

__init__(ensemble_names, device[, tilt])

apply_transform(transform[, max_batch, lazy])

build(*args, **kwargs)

check_can_build()

Check whether the wave functions can be built.

copy()

Make a copy.

ensemble_blocks([chunks])

Split the ensemble into an array of smaller ensembles.

generate_blocks([chunks])

Generate chunks of the ensemble.

match_grid(other[, check_match])

Match the grid to another object with a Grid.

Attributes

accelerator

Accelerator object describing the acceleration energy.

angular_sampling

Reciprocal-space sampling in units of scattering angles [mrad].

antialias_cutoff_gpts

The number of grid points along the x and y direction in the simulation grid at the antialiasing cutoff scattering angle.

antialias_valid_gpts

The number of grid points along the x and y direction in the simulation grid for the largest rectangle that fits within antialiasing cutoff scattering angle.

axes_metadata

List of AxisMetadata.

base_axes_metadata

List of AxisMetadata for the base axes in real space.

base_shape

Shape of the base axes of the waves.

cutoff_angles

Scattering angles at the antialias cutoff [mrad].

cutoff_frequencies

Spatial frequencies at the antialias cutoff [1/Å].

device

The device where the waves are created.

dtype

The datatype of waves.

energy

Electron acceleration energy in electron volts.

ensemble_axes_metadata

List of AxisMetadata of the ensemble axes.

ensemble_shape

Shape of the ensemble axes of the waves.

extent

Extent of grid for each dimension in Ångstrom.

full_cutoff_angles

Scattering angles corresponding to the full wave function size [mrad].

gpts

Number of grid points for each dimension.

grid

Simulation grid.

metadata

Metadata stored as a dictionary.

reciprocal_space_axes_metadata

List of AxisMetadata for base axes in reciprocal space.

reciprocal_space_sampling

Reciprocal-space sampling in reciprocal Ångstrom.

rectangle_cutoff_angles

Scattering angles corresponding to the sides of the largest rectangle within the antialias cutoff [mrad].

sampling

Grid sampling for each dimension in Ångstrom per grid point.

shape

Shape of the waves.

tilt

The small-angle tilt of applied to the Fresnel propagator [mrad].

wavelength

Relativistic wavelength in Ångstrom.

property accelerator: Accelerator#

Accelerator object describing the acceleration energy.

property angular_sampling: tuple[float, float]#

Reciprocal-space sampling in units of scattering angles [mrad].

property antialias_cutoff_gpts: tuple[int, int]#

The number of grid points along the x and y direction in the simulation grid at the antialiasing cutoff scattering angle.

property antialias_valid_gpts: tuple[int, int]#

The number of grid points along the x and y direction in the simulation grid for the largest rectangle that fits within antialiasing cutoff scattering angle.

property axes_metadata: AxesMetadataList#

List of AxisMetadata.

property base_axes_metadata: list[AxisMetadata]#

List of AxisMetadata for the base axes in real space.

property base_shape: tuple[int, int]#

Shape of the base axes of the waves.

check_can_build()[source]#

Check whether the wave functions can be built.

copy()#

Make a copy.

Return type:

Self

property cutoff_angles: tuple[float, float]#

Scattering angles at the antialias cutoff [mrad].

property cutoff_frequencies: tuple[float, float]#

Spatial frequencies at the antialias cutoff [1/Å].

property device: str#

The device where the waves are created.

property dtype: dtype#

The datatype of waves.

property energy: float | None#

Electron acceleration energy in electron volts.

property ensemble_axes_metadata: list[AxisMetadata]#

List of AxisMetadata of the ensemble axes.

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#

Shape of the ensemble axes of the waves.

property extent: tuple[float, float] | None#

Extent of grid for each dimension in Ångstrom.

property full_cutoff_angles: tuple[float, float]#

Scattering angles corresponding to the full wave function size [mrad].

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 gpts: tuple[int, int] | None#

Number of grid points for each dimension.

property grid: Grid#

Simulation grid.

match_grid(other, check_match=False)#

Match the grid to another object with a Grid.

abstract property metadata: dict#

Metadata stored as a dictionary.

property reciprocal_space_axes_metadata: list[AxisMetadata]#

List of AxisMetadata for base axes in reciprocal space.

property reciprocal_space_sampling: tuple[float, float]#

Reciprocal-space sampling in reciprocal Ångstrom.

property rectangle_cutoff_angles: tuple[float, float]#

Scattering angles corresponding to the sides of the largest rectangle within the antialias cutoff [mrad].

property sampling: tuple[float, float] | None#

Grid sampling for each dimension in Ångstrom per grid point.

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

Shape of the waves.

property tilt#

The small-angle tilt of applied to the Fresnel propagator [mrad].

property wavelength: float#

Relativistic wavelength in Ångstrom.