Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fitting of a plane to projection centers #587

Merged
merged 11 commits into from
Jan 6, 2023

Conversation

hakonanes
Copy link
Member

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's FitOrientation program (no orientation correction, as they do, is currently implemented). This solves part of Orientation correction after dictionary indexing (and PC correction) before refinement #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).

Progress of the PR

For reviewers

  • The PR title is short, concise, and will make sense 1 year later.
  • New functions are imported in corresponding __init__.py.
  • New features, API changes, and deprecations are mentioned in the unreleased
    section in CHANGELOG.rst.
  • New contributors are added to release.py, .zenodo.json and
    .all-contributorsrc with the table regenerated.

Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
@hakonanes hakonanes added the enhancement New feature or request label Jan 6, 2023
@hakonanes hakonanes added this to the v0.8.0 milestone Jan 6, 2023
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant