EnsembleFromDistributions#

class abtem.distributions.EnsembleFromDistributions(distributions=(), **kwargs)[source]#

Bases: abtem.core.ensemble.Ensemble, abtem.core.utils.EqualityMixin, abtem.core.utils.CopyMixin

Base object for ensembles based on distributions.

Parameters

distributions (tuple of str, optional) – Names of properties that may be described by a distribution.

__init__(distributions=(), **kwargs)[source]#

Methods

__init__([distributions])

copy()

Make a copy.

ensemble_blocks([chunks])

Split the ensemble into an array of smaller ensembles.

generate_blocks([chunks])

Generate chunks of the ensemble.

select_block(index, chunks)

Select a block from 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.

ensemble_axes_metadata

List of AxisMetadata of the ensemble axes.

ensemble_shape

Shape of the ensemble axes.

shape

Shape of the ensemble.

property axes_metadata: abtem.core.axes.AxesMetadataList#

List of AxisMetadata.

Return type

AxesMetadataList

property base_axes_metadata: list[abtem.core.axes.AxisMetadata]#

List of AxisMetadata of the base axes.

Return type

list[AxisMetadata]

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

Shape of the base axes.

Return type

tuple[int, ...]

copy()#

Make a copy.

property ensemble_axes_metadata: list[abtem.core.axes.AxisMetadata]#

List of AxisMetadata of the ensemble axes.

Return type

list[AxisMetadata]

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.

generate_blocks(chunks=1)#

Generate chunks of the ensemble.

Parameters

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

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.