extrapolate_pc#
- EBSDDetector.extrapolate_pc(pc_indices: tuple | list | ndarray, navigation_shape: tuple, step_sizes: tuple, shape: tuple | None = None, px_size: float | None = None, binning: int | None = None, is_outlier: tuple | list | ndarray | None = None) EBSDDetector [source]#
Return a new detector with projection centers (PCs) in a 2D map extrapolated from an average PC.
The average PC \(\bar{PC}\) is calculated from
pc
, possibly excluding some PCs based on theis_outlier
mask. The sample position having this PC, \((\bar{x}, \bar{y})\), is assumed to be the one obtained by averagingpc_indices
. All other PCs \((PC_x, PC_y, PC_z)\) in positions \((x, y)\) are then extrapolated based on the following equations given in appendix A in [Singh et al., 2017]:\[\begin{split}PC_x &= \bar{PC_x} + (\bar{x} - x) \cdot \Delta x / (\delta \cdot N_x \cdot b),\\ PC_y &= \bar{PC_y} + (\bar{y} - y) \cdot \Delta y \cdot \cos{\alpha} / (\delta \cdot N_y \cdot b),\\ PC_z &= \bar{PC_z} - (\bar{y} - y) \cdot \Delta y \cdot \sin{\alpha} / (\delta \cdot N_y \cdot b),\\\end{split}\]where \((\Delta y, \Delta x)\) are the vertical and horizontal step sizes, respectively, \((N_y, N_x)\) are the number of binned detector rows and columns, respectively, the angle \(\alpha = 90^{\circ} - \sigma + \theta\), where \(\sigma\) is the sample tilt and \(\theta\) is the detector tilt, \(\delta\) is the unbinned detector pixel size and \(b\) is the binning factor.
- Parameters:
- pc_indices
2D map pixel coordinates (row, column) of each
pc
, possibly outsidenavigation_shape
. Must be a flattened array of shape (2,) +navigation_size
.- navigation_shape
Shape of the output PC array (n rows, n columns).
- step_sizes
Vertical and horizontal step sizes (dy, dx).
- shape
Detector (signal) shape (n rows, n columns). If not given, (
nrows
,ncols
) is used.- px_size
Unbinned detector pixel size. If not given,
px_size
is used.- binning
Detector binning factor. If not given,
binning
is used.- is_outlier
Boolean array with
True
for PCs to not include in the fit. If not given, all PCs are used. Must be ofnavigation_shape
.
- Returns:
new_detector
Detector with
navigation_shape
given by inputnavigation_shape
.