BasePotential#
- class abtem.potentials.iam.BasePotential[source]#
Bases:
BaseField
Base class of all potentials. Documented in the subclasses.
- __init__()#
Methods
__init__
()build
([first_slice, last_slice, chunks, lazy])copy
()Make a copy.
ensemble_blocks
([chunks])Split the ensemble into an array of smaller ensembles.
generate_blocks
([chunks])Generate chunks of the ensemble.
generate_slices
([first_slice, last_slice])match_grid
(other[, check_match])Match the grid to another object with a Grid.
project
()Sum of the potential slices as an image.
select_block
(index, chunks)Select a block from the ensemble.
show
([project])Show the potential projection.
Converts the potential to an ensemble of images.
Attributes
List of AxisMetadata.
List of AxisMetadata for the base axes.
Shape of the base axes of the potential.
List of AxisMetadata of the ensemble axes.
Shape of the ensemble axes.
The "exit planes" of the potential.
The "exit thicknesses" of the potential.
Extent of grid for each dimension in Ångstrom.
Number of grid points for each dimension.
Simulation grid.
Number of frozen phonons in the ensemble of potentials.
Number of exit planes.
Number of projected potential slices.
Reciprocal-space sampling in reciprocal Ångstrom.
Grid sampling for each dimension in Ångstrom per grid point.
Shape of the ensemble.
The entrance and exit thicknesses of each slice [Å].
Slice thicknesses for each slice.
Thickness of the potential [Å].
- property axes_metadata: AxesMetadataList#
List of AxisMetadata.
- property base_axes_metadata#
List of AxisMetadata for the base axes.
- property base_shape#
Shape of the base axes of the potential.
- copy()#
Make a copy.
- 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: tuple[int, ...]#
Shape of the ensemble axes.
- abstract property exit_planes: tuple[int]#
The “exit planes” of the potential. The indices of slices where a measurement is returned.
- property exit_thicknesses: tuple[float]#
The “exit thicknesses” of the potential. The thicknesses in the potential where a measurement is returned.
- property extent: tuple[float] | tuple[float, float] | tuple[float, ...]#
Extent of grid for each dimension in Ångstrom.
- generate_blocks(chunks=1)#
Generate chunks of the ensemble.
- Parameters:
chunks (iterable of tuples) – Block sizes along each dimension.
- property gpts: tuple[int] | tuple[int, int] | tuple[int, ...]#
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 num_configurations#
Number of frozen phonons in the ensemble of potentials.
- property num_exit_planes: int#
Number of exit planes.
- property num_slices: int#
Number of projected potential slices.
- project()#
Sum of the potential slices as an image.
- Returns:
projected – The projected potential.
- Return type:
- property reciprocal_space_sampling: tuple[float] | tuple[float, float] | tuple[float, ...]#
Reciprocal-space sampling in reciprocal Ångstrom.
- property sampling: tuple[float] | tuple[float, float] | tuple[float, ...]#
Grid sampling for each dimension in Ångstrom per grid point.
- select_block(index, chunks)#
Select a block from the ensemble.
- Parameters:
index (tuple of ints) – Index of selected block.
chunks (iterable of tuples) – Block sizes along each dimension.
- property shape#
Shape of the ensemble.
- show(project=True, **kwargs)#
Show the potential projection. This requires building all potential slices.
- Parameters:
project (bool, optional) – Show the projected potential (True, default) or show all potential slices. It is recommended to index a subset of the potential slices when this keyword set to False.
kwargs – Additional keyword arguments for the show method of
Images
.
- property slice_limits: list[tuple[float, float]]#
The entrance and exit thicknesses of each slice [Å].
- abstract property slice_thickness: ndarray#
Slice thicknesses for each slice.
- property thickness: float#
Thickness of the potential [Å].