This PR adds the following functionality to EBSDDetector:
fit_pc(): Fit a plane to selected projection centers (PCs) using either a projective or affine transformation, following the work of Winkelmann et al. (https://doi.org/10.3390/ma13122816). This functionality is adapted from Winkelmann's xcdskd package (https://github.com/wiai/xcdskd).
extrapolate_pc(): Extrapolate a plane of PCs from a mean or single PC to a map of PCs, following the work of Singh et al. (https://doi.org/10.1107/S1600576717014200). This is used in EMsoft's FitOrientation program (no orientation correction, as they do, is currently implemented). This solves part of #454.
estimate_xtilt(): Estimate tilt about detector X axis which brings the detector normal parallel to the sample normal, assuming no other tilts. Also adapted from xcdskd.
estimate_xtilt_ztilt(): Estimate tilts about detector X and Z axes which bring the detector normal parallel to the sample normal, assuming no other tilts. Also adapted from xcdskd.
plot_pc(): Plot PCs either in three maps or scatter plots (PCx, PCy), (PCx, PCz), (PCz, PCy), or in a 3D scatter plot (PCx, PCz, PCy).
All methods are used in three examples added to the example gallery. They will also be used in tutorial notebooks coming in a follow-up PR.
Other changes/additions:
Adds a kikuchipy.draw.plot_pattern_positions_in_map() convenience function to plot pattern positions (e.g. those we use for PC fitting) on a 2D map. Is used in an example, will be used in coming new tutorials.
Refinement speed patterns/s is now a float (gave 0 patterns/s before because it was an integer).
Description of the change
This PR adds the following functionality to
EBSDDetector
:fit_pc()
: Fit a plane to selected projection centers (PCs) using either a projective or affine transformation, following the work of Winkelmann et al. (https://doi.org/10.3390/ma13122816). This functionality is adapted from Winkelmann's xcdskd package (https://github.com/wiai/xcdskd).extrapolate_pc()
: Extrapolate a plane of PCs from a mean or single PC to a map of PCs, following the work of Singh et al. (https://doi.org/10.1107/S1600576717014200). This is used in EMsoft'sFitOrientation
program (no orientation correction, as they do, is currently implemented). This solves part of #454.estimate_xtilt()
: Estimate tilt about detector X axis which brings the detector normal parallel to the sample normal, assuming no other tilts. Also adapted from xcdskd.estimate_xtilt_ztilt()
: Estimate tilts about detector X and Z axes which bring the detector normal parallel to the sample normal, assuming no other tilts. Also adapted from xcdskd.plot_pc()
: Plot PCs either in three maps or scatter plots (PCx, PCy), (PCx, PCz), (PCz, PCy), or in a 3D scatter plot (PCx, PCz, PCy).All methods are used in three examples added to the example gallery. They will also be used in tutorial notebooks coming in a follow-up PR.
Other changes/additions:
kikuchipy.draw.plot_pattern_positions_in_map()
convenience function to plot pattern positions (e.g. those we use for PC fitting) on a 2D map. Is used in an example, will be used in coming new tutorials.Progress of the PR
For reviewers
__init__.py
.CHANGELOG.rst
.release.py
,.zenodo.json
and.all-contributorsrc
with the table regenerated.