hough_indexing_optimize_pc#
- EBSD.hough_indexing_optimize_pc(pc0: list | tuple | np.ndarray, indexer: EBSDIndexer, batch: bool = False, method: str = 'Nelder-Mead', **kwargs) EBSDDetector [source]#
Return a detector with one projection center (PC) per pattern optimized using Hough indexing from
pyebsdindex
.See
EBSDIndexer
andpcopt
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. 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).- **kwargs
Keyword arguments passed on to PyEBSDIndex’ optimization method (depending on the chosen
method
).
- Returns:
new_detector
EBSD detector with one PC if
batch=False
or one PC per pattern ifbatch=True
. The detector attributes are extracted fromindexer.sampleTilt
etc.
Notes
Requires
pyebsdindex
to be installed. See Optional dependencies for further details.