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:
  • structure (Structure) – The structure for upon which to perform the calculation

  • probe (instance of probeFunction) – Function representing 3D shape of beam

  • slice_thickness (float) – Discretisation thickness in the z-axis

  • probe_centre (ndarray (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]

  • zrange (float) – z-thickness to discretise. Only required if sample is not thick enough to fully resolve the Ewald-sphere. Default value is 200.

  • precessed (bool, 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.

  • dtype (str or numpy.dtype) – Defines the precision to use whilst computing diffraction image.

  • ZERO (float > 0) – Rounding error permitted in computation of atomic density. This value is the smallest value rounded to 0. Default is 1e-14.

  • mode (str) – Only <mode>=’kinematic’ is currently supported.

  • kwargs (dictionary) – 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:

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

Return type:

ndarray