BaseDistribution#

class abtem.distributions.BaseDistribution[source]#

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

Base object for defining distributions of simulation parameters.

__init__()#

Methods

__init__()

copy()

Make a copy.

divide(chunks[, lazy])

Divide the distribution into chunks.

Attributes

dimensions

The number of dimensions in the distribution.

ensemble_mean

Calculate the mean of the ensemble.

shape

The shape of the distribution parameters.

values

Scalar values representing the distribution.

weights

Weight of each of distribution value.

copy()#

Make a copy.

abstract property dimensions: int#

The number of dimensions in the distribution.

Return type

int

abstract divide(chunks, lazy=True)[source]#

Divide the distribution into chunks.

abstract property ensemble_mean: bool#

Calculate the mean of the ensemble.

Return type

bool

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

The shape of the distribution parameters.

Return type

tuple[int, ...]

abstract property values: numpy.ndarray#

Scalar values representing the distribution.

Return type

ndarray

abstract property weights: numpy.ndarray#

Weight of each of distribution value.

Return type

ndarray