get_diffraction_image#

diffsims.utils.atomic_diffraction_generator_utils.get_diffraction_image(coordinates, species, probe, x, wavelength, precession, GPU=True, pointwise=False, **kwargs)[source]#

Return kinematically simulated diffraction pattern

Parameters:
  • coordinates (numpy.ndarray [float], (n_atoms, 3)) – List of atomic coordinates

  • species (numpy.ndarray [int], (n_atoms,)) – List of atomic numbers

  • probe (diffsims.ProbeFunction) – Function representing 3D shape of beam

  • x (list [numpy.ndarray [float] ], of shapes [(nx,), (ny,), (nz,)]) – Mesh on which to compute the volume density

  • wavelength (float) – Wavelength of electron beam

  • precession (a pair (float, int)) – The float dictates the angle of precession and the int how many points are used to discretise the integration.

  • dtype ((str, str)) – tuple of floating/complex datatypes to cast outputs to

  • ZERO (float > 0, optional) – Rounding error permitted in computation of atomic density. This value is the smallest value rounded to 0.

  • GPU (bool, optional) – Flag whether to use GPU or CPU discretisation. Default (if available) is True

  • pointwise (bool, optional) – Optional parameter whether atomic intensities are computed point-wise at the centre of a voxel or an integral over the voxel. default=False

Returns:

DP – The two-dimensional diffraction pattern evaluated on the reciprocal grid corresponding to the first two vectors of x.

Return type:

numpy.ndarray [dtype[0]], (nx, ny, nz)