calculate_ed_data#

AtomicDiffractionGenerator.calculate_ed_data(structure, probe, slice_thickness, probe_centre=None, z_range=200, precessed=False, dtype='float64', ZERO=1e-14, mode='kinematic', **kwargs)[source]#

Calculates single electron diffraction image for particular atomic structure and probe.

Parameters:
structureStructure

The structure for upon which to perform the calculation

probeinstance of probeFunction

Function representing 3D shape of beam

slice_thicknessfloat

Discretisation thickness in the z-axis

probe_centrendarray (or iterable), shape [3] or [2]

Translation vector for the probe. Either of the same dimension of the space or the dimension of the detector. default=None focusses the probe at [0,0,0]

zrangefloat

z-thickness to discretise. Only required if sample is not thick enough to fully resolve the Ewald-sphere. Default value is 200.

precessedbool, float, or (float, int)

Dictates whether beam precession is simulated. If False or the float is 0 then no precession is computed. If <precessed> = (alpha, n) then the precession arc of tilt alpha (in degrees) is discretised into n projections. If n is not provided then default of 30 is used.

dtypestr or numpy.dtype

Defines the precision to use whilst computing diffraction image.

ZEROfloat > 0

Rounding error permitted in computation of atomic density. This value is the smallest value rounded to 0. Default is 1e-14.

modestr

Only <mode>=’kinematic’ is currently supported.

kwargsdictionary

Extra key-word arguments to pass to child simulator. For kinematic: GPU (bool): Flag to use GPU if available, default is True. pointwise (bool): Flag to evaluate charge pointwise on voxels rather than average, default is False.

Returns:
ndarray

Diffraction data to be interpreted as a discretisation on the original detector mesh.