hough_indexing_optimize_pc#

EBSD.hough_indexing_optimize_pc(pc0: list | tuple | np.ndarray, indexer: EBSDIndexer, batch: bool = False, method: str = 'Nelder-Mead') EBSDDetector[source]#

Return a detector with one projection center (PC) per pattern optimized using Hough indexing from pyebsdindex.

See EBSDIndexer and optimize for details.

Parameters:
pc0

A single initial guess of PC for all patterns in Bruker’s convention, (PCx, PCy, PCz).

indexer

PyEBSDIndex EBSD indexer instance to pass on to the optimization function. Its phaselist must be compatible with phase_list, if given, and the indexer.vendor must be "KIKUCHIPY". An indexer can be obtained with get_indexer().

batch

Whether the fit for the patterns should be optimized using the cumulative fit for all patterns (False, default), or if an optimization is run for each pattern individually.

method

Which optimization method to use, either "Nelder-Mead" from SciPy (default) or "PSO" (particle swarm). The latter method does not support batch=True.

Returns:
new_detector

EBSD detector with one PC if batch=False or one PC per pattern if batch=True. The detector attributes are extracted from indexer.sampleTilt etc.

Notes

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