pc_emsoft#

EBSDDetector.pc_emsoft(version: int = 5) ndarray[source]#

Return PC in the EMsoft convention.

Parameters:
version

Which EMsoft PC convention to use. The direction of the x PC coordinate, \(x_{pc}\), flipped in version 5.

Returns:
new_pc

PC in the EMsoft convention.

Notes

The PC coordinate conventions of Bruker, EDAX TSL, Oxford Instruments and EMsoft are given in the class description. The PC is stored in the Bruker convention internally, so the conversion is

\[\begin{split}x_{pc} &= N_x b \left(\frac{1}{2} - x_B^*\right),\\ y_{pc} &= N_y b \left(\frac{1}{2} - y_B^*\right),\\ L &= N_y b \delta z_B^*,\end{split}\]

where \(N_x\) and \(N_y\) are number of detector columns and rows, \(b\) is binning, \(\delta\) is the unbinned pixel size, \((x_B^*, y_B^*, z_B^*)\) are the Bruker PC coordinates, and \((x_{pc}, y_{pc}, L)\) are the returned EMsoft PC coordinates.

Examples

>>> import kikuchipy as kp
>>> det = kp.detectors.EBSDDetector(
...     shape=(60, 80),
...     pc=(0.4, 0.2, 0.6),
...     convention="bruker",
...     px_size=59.2,
...     binning=8,
... )
>>> det.pc_emsoft()
array([[   64. ,   144. , 17049.6]])
>>> det.pc_emsoft(4)
array([[  -64. ,   144. , 17049.6]])