- EBSD.refine_orientation_projection_center(xmap: CrystalMap, detector: EBSDDetector, master_pattern: EBSDMasterPattern, energy: Union[int, float], signal_mask: Optional[np.ndarray] = None, method: Optional[str] = 'minimize', method_kwargs: Optional[dict] = None, trust_region: Optional[list] = None, compute: bool = True, rechunk: bool = True, chunk_kwargs: Optional[dict] = None) Union[Tuple[CrystalMap, EBSDDetector], da.Array] #
Refine orientations and projection centers simultaneously by searching the orientation and PC parameter space.
Refinement attempts to maximize the similarity between patterns in this signal and simulated patterns projected from a master pattern. The only supported similarity metric is the normalized cross-correlation (NCC). The orientation, represented by a Rodrigues-Frank vector (\(R_x\), \(R_y\), \(R_z\)), and the sample-detector geometry, represented by the three projection center (PC) parameters (PCx, PCy, PCz), are updated during refinement.
- A subset of the optimization methods in SciPy are available:
Single phase crystal map with at least one orientation per point. The orientations are assumed to be relative to the EDAX TSL sample reference frame RD-TD-ND.
Detector describing the detector-sample geometry with either one PC to be used for all map points or one for each point.
Master pattern in the square Lambert projection of the same phase as the one in the crystal map.
Accelerating voltage of the electron beam in kV specifying which master pattern energy to use during projection of simulated patterns.
A boolean mask equal to the experimental patterns’ detector shape
(n rows, n columns), where only pixels equal to
Falseare matched. If not given, all pixels are used.
Name of the
scipy.optimizeoptimization method, among
"shgo". Default is
"minimize", which by default performs local optimization with the Nelder-Mead method unless another
"minimize"method is passed to
Keyword arguments passed to the
method. For example, to perform refinement with the modified Powell algorithm, pass
List of +/- angular deviations in degrees as bound constraints on the three Rodrigues-Frank vector components and +/- percentage deviations as bound constraints on the PC parameters in the Bruker convention. The latter parameter range is [0, 1]. If not given and
methodrequires bounds, they are set to
[1, 1, 1, 0.05, 0.05, 0.05]. If given,
methodis assumed to support bounds and they are passed to
Whether to refine now (
True) or later (
False). Default is
compute()for more details.
True(default), rechunk the dask array with patterns used in refinement (not the signal data inplace) if it is returned from
get_dask_array()in a single chunk. This ensures small data sets are rechunked so as to utilize multiple CPUs.
Crystal map with refined orientations and a new EBSD detector instance with the refined PCs, if
compute=False, a dask array of navigation shape + (7,) is returned, to be computed later. See
compute_refine_orientation_projection_center_results(). Each navigation point has the optimized score, the three Rodriues-Frank vector components in radians, and the three PC parameters in the Bruker convention in element 0, 1, 2, 3, 4, 5, and 6, respectively.
The method attempts to refine the orientations and projection center at the same time for each map point. The optimization landscape is sloppy [Pang et al., 2020], where the orientation and PC can make up for each other. Thus, it is possible that the parameters that yield the highest similarity are incorrect. As always, it is left to the user to ensure that the output is reasonable.