diffsims.utils.discretise_utils.get_discretisation(loc, Z, x, GPU=False, ZERO=None, dtype=('f8', 'c16'), pointwise=False, FT=False, **kwargs)[source]#
  • loc (numpy.ndarray, (n, 3)) – Atoms to bin

  • Z (str, int, or numpy.ndarray [str or int], (n,)) – atom labels, either string or atomic masses.

  • x (list [numpy.ndarray [float]]) – Dictates mesh over which to discretise. Volume will be discretised at points [x[0][i],x[1][j],…]

  • GPU (bool, optional) – If True (default) then attempts to use the GPU.

  • ZERO (float > 0) – Approximation threshold

  • dtype ((str, str), optional) – Real and complex data precisions to use, default=(‘float64’, ‘complex128’)

  • pointwise (bool, optional) – If True (default) then computes pointwise atomic potentials on mesh points, else averages the potential over cube of same size as the discretisation.

  • FT (bool, optional) – If True then computes the Fourier transform directly on the reciprocal mesh, otherwise (default) computes the volume potential


out – Discretisation of atoms defined by loc/Z on mesh defined by x.

Return type:

numpy.ndarray, (x[0].size, x[1].size, x[2].size)