AnnularDetector#
- class abtem.detectors.AnnularDetector(inner, outer, offset=(0.0, 0.0), to_cpu=True, url=None)[source]#
Bases:
BaseDetector
The annular detector integrates the intensity of the detected wave functions between an inner and outer radial integration limits, i.e. over an annulus.
- Parameters:
inner (float) – Inner integration limit [mrad].
outer (float) – Outer integration limit [mrad].
offset (two float, optional) – Center offset of the annular integration region [mrad].
to_cpu (bool, optional) – If True, copy the measurement data from the calculation device to CPU memory after applying the detector, otherwise the data stays on the respective devices. Default is True.
url (str, optional) – If this parameter is set the measurement data is saved at the specified location, typically a path to a local file. A URL can also include a protocol specifier like s3:// for remote data. If not set (default) the data stays in memory.
Methods
__init__
(inner, outer[, offset, to_cpu, url])angular_limits
(waves)The outer limits of the detected scattering angles in x and y [mrad] for the given waves.
apply
(array_object)Apply the transform to the given waves.
copy
()Make a copy.
detect
(waves)Detect the given waves producing images.
ensemble_blocks
([chunks])Split the ensemble into an array of smaller ensembles.
generate_blocks
([chunks])Generate chunks of the ensemble.
get_detector_region
(waves[, fftshift])Get the annular detector region as a diffraction pattern.
select_block
(index, chunks)Select a block from the ensemble.
Attributes
List of AxisMetadata.
List of AxisMetadata of the base axes.
Shape of the base axes.
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.
Inner integration limit in mrad.
Metadata added to the waves when applying the transform.
Center offset of the annular integration region [mrad].
Outer integration limit in mrad.
Shape of the ensemble.
The measurements are copied to host memory.
The storage location of the measurement data.
- angular_limits(waves)[source]#
The outer limits of the detected scattering angles in x and y [mrad] for the given waves.
- Parameters:
waves (BaseWaves) – The waves to derive the detector limits from.
- Returns:
limits
- Return type:
tuple of float
- apply(array_object)#
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 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, ...]#
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.
- get_detector_region(waves, fftshift=True)[source]#
Get the annular detector region as a diffraction pattern.
- Parameters:
waves (BaseWaves) – The waves to derive the annular detector region from.
fftshift (bool, optional) – If True, the zero-frequency of the detector region if shifted to the center of the array, otherwise the center is at (0, 0).
- Returns:
detector_region
- Return type:
- property inner: float#
Inner integration limit in mrad.
- property metadata: dict#
Metadata added to the waves when applying the transform.
- property offset: tuple[float, float]#
Center offset of the annular integration region [mrad].
- property outer: float#
Outer integration limit in mrad.
- 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.
- property to_cpu#
The measurements are copied to host memory.
- property url#
The storage location of the measurement data.