EBSDMasterPattern.get_patterns(rotations: Rotation, detector: EBSDDetector, energy: int | float | None = None, dtype_out: str | dtype | type = 'float32', compute: bool = False, show_progressbar: bool | None = None, **kwargs) EBSD | LazyEBSD[source]#

Return one or more EBSD patterns projected onto a detector from a master pattern in the square Lambert projection for rotation(s) relative to the EDAX TSL sample reference frame (RD, TD, ND) [Callahan and De Graef, 2013].


Crystal rotations to get patterns from. The shape of this instance, a maximum of two dimensions, determines the navigation shape of the output signal.


EBSD detector describing the detector dimensions and the detector-sample geometry with a fixed projection center (PC) or varying PCs, one per rotation. If the detector has multiple PCs, its navigation_shape must be identical to the shape of the rotations, shape.


Acceleration voltage, in kV, used to simulate the desired master pattern to create a dictionary from. If only a single energy is present in the signal, this will be used no matter its energy. If not given, the highest energy will be used.


Data type of the returned patterns, by default "float32".


Whether to return a lazy result, by default False. For more information see compute().


Whether to show a progressbar. If not given, the value of hyperspy.api.preferences.General.show_progressbar is used.


Keyword arguments passed to get_chunking() to control the number of chunks the dictionary creation and the output data array is split into. Only chunk_shape, chunk_bytes and dtype_out (to dtype) are passed on.


Signal with navigation and signal shape equal to the rotation instance and detector shape, respectively.


If the master pattern phase has a non-centrosymmetric point group, both the upper and lower hemispheres must be provided. For more details regarding the reference frame visit the reference frame tutorial.


Get patterns for four identity rotations with varying projection centers (PCs), the upper two with PCx increasing towards the right, the lower two with increased PCz compared to the upper two

>>> import numpy as np
>>> from orix.quaternion import Rotation
>>> import hyperspy.api as hs
>>> import kikuchipy as kp
>>> mp ="lambert")
>>> det = kp.detectors.EBSDDetector(
...     shape=(60, 60),
...     pc=np.array([
...         [[0.4, 0.5, 0.4], [0.6, 0.5, 0.4]],
...         [[0.4, 0.5, 0.6], [0.6, 0.5, 0.6]],
...     ])
... )
>>> rot = Rotation.identity(det.navigation_shape)
>>> s = mp.get_patterns(rot, det, compute=True, show_progressbar=False)
>>> _ = hs.plot.plot_images(
...     s,
...     per_row=2,
...     cmap="inferno",
...     label=np.array_str(det.pc.reshape((-1, 3)))[1:-1].split("\n "),
...     axes_decor=None,
... )

Examples using EBSDMasterPattern.get_patterns#

Adaptive histogram equalization

Adaptive histogram equalization