get_orientation#

PolarDiffraction2D.get_orientation(simulation, n_keep=None, frac_keep=0.1, n_best=1, gamma=0.5, normalize_templates=True, **kwargs)[source]#

Match the orientation with some simulated diffraction patterns using an accelerated orientation mapping algorithm. The details of the algorithm are described in the paper: “Free, flexible and fast: Orientation mapping using the multi-core and

GPU-accelerated template matching capabilities in the python-based open source 4D-STEM analysis toolbox Pyxem”

Parameters:
  • simulation (DiffractionSimulation) – The diffraction simulation object to use for indexing.

  • n_keep (int) – The number of orientations to keep for each diffraction pattern.

  • frac_keep (float) – The fraction of the best matching orientations to keep.

  • n_best (int) – The number of best matching orientations to keep.

  • normalize_templates (bool) – Normalize the templates to the same intensity.

  • gamma (float) – The gamma correction applied to the diffraction patterns. The default value is 0.5 which takes the square root of the diffraction patterns to increase the intensity of the low intensity reflections and decrease the intensity of the high intensity reflections. In most cases gamma<1 is a good starting point. See [CCAAnes+22] for more information.

  • kwargs (dict) – Any additional options for the map() function.

Returns:

orientation – A signal with the orientation at each navigation position.

Return type:

BaseSignal

References

[CCAAnes+22]

Niels Cautaerts, Phillip Crout, Håkon Wiik Ånes, Eric Prestat, Jiwon Jeong, Gerhard Dehm, and Christian H Liebscher. Free, flexible and fast: orientation mapping using the multi-core and gpu-accelerated template matching capabilities in the python-based open source 4d-stem analysis toolbox pyxem. Ultramicroscopy, pages 113517, 2022. doi:10.1016/j.ultramic.2022.113517.