Check out the Hyperspy Workshop May 13-17, 2024 Online

convert_affine_to_transform#

pyxem.utils.diffraction.convert_affine_to_transform(D, shape)[source]#

Converts an affine transform on a diffraction pattern to a suitable form for skimage.transform.warp()

Parameters:
  • D (numpy.ndarray) – Affine transform to be applied

  • shape (tuple) – Shape tuple in form (y,x) for the diffraction pattern

Returns:

transformation – 3x3 numpy array of the transformation to be applied.

Return type:

numpy.ndarray