show_match#

de_ebsd.viz.maps.show_match(experimental, master, detector, orientation, energy_kev=None)[source]#

The indexing sanity check: experimental vs simulated pattern at the fit.

Renders three panels side by side – the experimental pattern, the pattern de_ebsd.sim.MasterPattern.project() produces at the indexed orientation, and their (contrast-standardized) difference – so a viewer can see at a glance whether the orientation is right. The middle panel is titled with the normalized cross-correlation (_ncc()) between the experimental and simulated patterns: a contrast-invariant number in [-1, 1] that quantifies the match (~1 is a good index).

Parameters:
experimental

The measured detector image (H, W) (numpy array or torch tensor; a leading length-1 axis is squeezed).

master

The de_ebsd.sim.MasterPattern used for indexing.

detector

The de_ebsd.sim.detector.EBSDDetector geometry.

orientation

The indexed orientation as a length-1 orix.quaternion.Rotation (e.g. a single element of SphericalIndexer.index()’s output).

energy_kev

Energy bin to project (default: the master’s highest).

Returns:
anyplotlib.Figure

A 1x3 figure (experimental | simulated | difference).