show_correlation#

de_ebsd.viz.maps.show_correlation(correlation)[source]#

Render the SO(3) cross-correlation volume as a legible 2-D heatmap.

The cross-correlation from de_ebsd.index.spherical.correlation.so3_cross_correlation() is a function on all of SO(3), sampled on the (alpha, beta, gamma) grid (shape (N, N, N)). This reduces it to an (alpha, gamma) heatmap by taking the maximum over the beta axis (so the global peak survives the projection), marks the peak cell, and titles the panel with the peak value and its (alpha, beta, gamma) grid indices.

Parameters:
correlation

The correlation grid, shape (N, N, N) for a single pattern, or a stack (Np, N, N, N) whose first pattern is shown (numpy array or torch tensor). Obtain it from index() with return_surface=True (the third returned element).

Returns:
anyplotlib.Figure

A single heatmap panel with the peak marked. The peak grid indices and value are also attached to the figure as fig.peak_index (an (alpha, beta, gamma) tuple) and fig.peak_value for programmatic access.