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:
coordinatesnumpy.ndarray [float], (n_atoms, 3)

List of atomic coordinates

speciesnumpy.ndarray [int], (n_atoms,)

List of atomic numbers

probediffsims.ProbeFunction

Function representing 3D shape of beam

xlist [numpy.ndarray [float] ], of shapes [(nx,), (ny,), (nz,)]

Mesh on which to compute the volume density

wavelengthfloat

Wavelength of electron beam

precessiona 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

ZEROfloat > 0, optional

Rounding error permitted in computation of atomic density. This value is the smallest value rounded to 0.

GPUbool, optional

Flag whether to use GPU or CPU discretisation. Default (if available) is True

pointwisebool, 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:
DPnumpy.ndarray [dtype[0]], (nx, ny, nz)

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