Bullseye#
- class abtem.transfer.Bullseye(num_spokes, spoke_width, num_rings, ring_width, semiangle_cutoff, energy=None, extent=None, gpts=None, sampling=None)[source]#
Bases:
BaseAperture
Bullseye aperture.
- Parameters:
num_spokes (int) – Number of spokes.
spoke_width (float) – Width of spokes [deg].
num_rings (int) – Number of rings.
ring_width (float) – Width of rings [mrad].
semiangle_cutoff (float) – The cutoff semiangle of the aperture [mrad].
energy (float, optional) – Electron energy [eV]. If not provided, inferred from the wave functions.
extent (float or two float, optional) – Lateral extent of wave functions [Å] in x and y directions. If a single float is given, both are set equal.
gpts (two ints, optional) – Number of grid points describing the wave functions.
sampling (two float, optional) – Lateral sampling of wave functions [1 / Å]. If ‘gpts’ is also given, will be ignored.
- __init__(num_spokes, spoke_width, num_rings, ring_width, semiangle_cutoff, energy=None, extent=None, gpts=None, sampling=None)[source]#
Methods
__init__
(num_spokes, spoke_width, num_rings, ...)apply
(waves)Apply the transform to the given waves.
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.
select_block
(index, chunks)Select a block from the ensemble.
show
(**kwargs)to_diffraction_patterns
([max_angle, gpts])Converts the transfer function instance to DiffractionPatterns.
Attributes
Accelerator object describing the acceleration energy.
The sampling in scattering angles of the transfer function [mrad].
List of AxisMetadata.
List of AxisMetadata of the base axes.
Shape of the base axes.
distributions
Electron acceleration energy in electron volts.
Axes metadata describing the ensemble axes added to the waves when applying the transform.
The shape of the ensemble axes added to the waves when applying the transform.
Extent of grid for each dimension in Ångstrom.
Number of grid points for each dimension.
Simulation grid.
The array representing the waves may be modified in-place.
Metadata added to the waves when applying the transform.
Number of rings.
Number of spokes.
Nyquist sampling corresponding to the semiangle cutoff of the aperture [Å].
Reciprocal-space sampling in reciprocal Ångstrom.
Width of rings [mrad].
Grid sampling for each dimension in Ångstrom per grid point.
Semiangle cutoff of the aperture [mrad].
Shape of the ensemble.
Width of spokes [deg].
Relativistic wavelength in Ångstrom.
- property accelerator: Accelerator#
Accelerator object describing the acceleration energy.
- property angular_sampling: tuple[float, float]#
The sampling in scattering angles of the transfer function [mrad].
- apply(waves)#
Apply the transform to the given waves.
- Parameters:
array_object (ArrayObject) – The array object to transform.
- Returns:
transformed_array_object
- Return type:
- 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.
- property energy#
Electron acceleration energy in electron volts.
- 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#
The shape of the ensemble axes added to the waves when applying the transform.
- 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.
- property in_place: bool#
The array representing the waves may be modified in-place.
- match_grid(other, check_match=False)#
Match the grid to another object with a Grid.
- property metadata#
Metadata added to the waves when applying the transform.
- property num_rings: int#
Number of rings.
- property num_spokes: int#
Number of spokes.
- property nyquist_sampling: float#
Nyquist sampling corresponding to the semiangle cutoff of the aperture [Å].
- property reciprocal_space_sampling: tuple[float] | tuple[float, float] | tuple[float, ...]#
Reciprocal-space sampling in reciprocal Ångstrom.
- property ring_width: float#
Width of rings [mrad].
- 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 semiangle_cutoff#
Semiangle cutoff of the aperture [mrad].
- property shape#
Shape of the ensemble.
- property spoke_width: float#
Width of spokes [deg].
- to_diffraction_patterns(max_angle=None, gpts=None)#
Converts the transfer function instance to DiffractionPatterns.
- Parameters:
max_angle (float, optional) – The maximum diffraction angle in radians. If not provided, the maximum angle will be determined based on the self._max_semiangle_cutoff attribute of the instance. If neither max_angle nor self._max_semiangle_cutoff is available, a RuntimeError will be raised.
gpts (int | tuple[int, int], optional) – The number of grid points in reciprocal space for performing Fourier Transform. If not provided, a default value of 128 will be used.
- Returns:
The diffraction patterns obtained from the conversion.
- Return type:
- property wavelength#
Relativistic wavelength in Ångstrom.