skued.potential_map

skued.potential_map(q, I, crystal, mesh)

Compute the electrostatic potential from powder diffraction data.

Parameters:
  • q (ndarray, shape (N,)) – Scattering vector norm (\(Å^{-1}\)).

  • I (ndarray, shape (N,)) – Experimental diffracted intensity.

  • crystal (crystals.Crystal) – Crystal that gave rise to diffraction pattern I.

  • mesh (3-tuple ndarrays, ndim 2 or ndim 3) – Real-space mesh over which to calculate the scattering map. Format should be similar to the output of numpy.meshgrid.

Returns:

out – Electrostatic potential computed over the mesh.

Return type:

ndarray, ndim 2 or ndim 3

Raises:

ValueError – if intensity data is not strictly positive.:

Notes

To compute the scattering map from a difference of intensities, note that scattering maps are linear in structure factor norm. Thus, to get the map of difference data I1 - I2:

\[I = (\sqrt{I_1} - \sqrt{I_2})^2\]

References