hough_indexing#

EBSD.hough_indexing(phase_list: PhaseList, indexer: EBSDIndexer, chunksize: int = 528, verbose: int = 1, return_index_data: bool = False, return_band_data: bool = False) CrystalMap | Tuple[CrystalMap, np.ndarray] | Tuple[CrystalMap, np.ndarray, np.ndarray][source]#

Index patterns by Hough indexing using pyebsdindex.

See EBSDIndexer and index_pats() for details.

Currently, PyEBSDIndex only supports indexing with a single mean projection center (PC).

Parameters:
phase_list

List of phases. The list must correspond to the phase list in the passed.

indexer

PyEBSDIndex EBSD indexer instance of which the index_pats() method is called. Its phaselist must be compatible with the given phase_list, and the indexer.vendor must be "KIKUCHIPY". An indexer can be obtained with get_indexer().

chunksize

Number of patterns to index at a time. Default is the minimum of 528 or the number of patterns in the signal. Increasing the chunksize may give faster indexing but increases memory use.

verbose

Which information to print from PyEBSDIndex. Options are 0 - no output, 1 - timings (default), 2 - timings and the Hough transform of the first pattern with detected bands highlighted.

return_index_data

Whether to return the index data array returned from EBSDIndexer.index_pats() in addition to the resulting crystal map. Default is False.

return_band_data

Whether to return the band data array returned from EBSDIndexer.index_pats(). Default is False.

Returns:
xmap

Crystal map with indexing results.

index_data

Array returned from EBSDIndexer.index_pats(), returned if return_index_data=True.

band_data

Array returned from EBSDIndexer.index_pats(), returned if return_band_data=True.

Notes

Requires pyebsdindex to be installed. See Optional dependencies for further details.

This wrapper of PyEBSDIndex is meant for convenience more than speed. It uses the GPU if pyopencl is installed, but only uses a single thread. If you need the fastest indexing, refer to the PyEBSDIndex documentation for multi-threading and more.