EBSD.dictionary_indexing(dictionary: EBSD, metric: SimilarityMetric | str = 'ncc', keep_n: int = 20, n_per_iteration: int | None = None, navigation_mask: ndarray | None = None, signal_mask: ndarray | None = None, rechunk: bool = False, dtype: str | dtype | type | None = None) CrystalMap[source]#

Index patterns by matching each pattern to a dictionary of simulated patterns of known orientations [Chen et al., 2015, Jackson et al., 2019].


One EBSD signal with dictionary patterns. The signal must have a 1D navigation axis, an xmap property with crystal orientations set, and equal detector shape.


Similarity metric, by default "ncc" (normalized cross-correlation). "ndp" (normalized dot product) is also available. A valid user-defined similarity metric may be used instead. The metric must be a class implementing the SimilarityMetric abstract class methods. See NormalizedCrossCorrelationMetric and NormalizedDotProductMetric for examples.


Number of best matches to keep, by default 20 or the number of dictionary patterns if fewer than 20 are available.


Number of dictionary patterns to compare to all experimental patterns in each indexing iteration. If not given, and the dictionary is a LazyEBSD signal, it is equal to the chunk size of the first pattern array axis, while if if is an EBSD signal, it is set equal to the number of dictionary patterns, yielding only one iteration. This parameter can be increased to use less memory during indexing, but this will increase the computation time.


A boolean mask equal to the signal’s navigation (map) shape, where only patterns equal to False are indexed. This can be used by metric in prepare_experimental(). If not given, all patterns are indexed.


A boolean mask equal to the experimental patterns’ detector shape, where only pixels equal to False are matched. This can be used by metric in prepare_experimental(). If not given, all pixels are used.


Whether metric is allowed to rechunk experimental and dictionary patterns before matching. Default is False. Rechunking usually makes indexing faster, but uses more memory. If a custom metric is passed, whatever rechunk is set to will be used.


Which data type metric shall cast the patterns to before matching. If not given, "float32" will be used unless a custom metric is passed and it has set the dtype, which will then be used instead. "float32" and "float64" are allowed for the available "ncc" and "ndp" metrics.


A crystal map with keep_n rotations per point with the sorted best matching orientations in the dictionary. The corresponding best scores and indices into the dictionary are stored in the xmap.prop dictionary as "scores" and "simulation_indices".