uniform

Contents

uniform#

abtem.distributions.uniform(low, high, num_samples, endpoint=True, ensemble_mean=False)[source]#

Return a distribution with uniformly weighted values evenly spaced over a specified interval. As an example, this distribution may be used for simulating a focal series.

Parameters:
  • low (float) – The lowest value of the distribution.

  • high (float) – The highest value of the distribution. If endpoint is set to False, the sequence consists of all but the last of num_samples + 1 evenly spaced samples so that the high value is excluded.

  • num_samples (int) – Number of samples in the distribution.

  • endpoint (bool)

  • ensemble_mean (bool, optional) – If True, the mean of an ensemble of measurements defined by the distribution is calculated, otherwise the full ensemble is kept.

Return type:

DistributionFromValues