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

Make EBSD indexing/refinement more flexible by allowing navigation masks #593

Merged
merged 57 commits into from
Jan 20, 2023

Conversation

hakonanes
Copy link
Member

@hakonanes hakonanes commented Jan 19, 2023

Description of the change

Updates to EBSD dictionary indexing and refinement in this PR allow for a navigation mask to be passed to those methods to only index or refine the patterns/orientations/projection centers (PCs) of interest.

The masking depends on the orix crystal map's is_in_data attribute array, which keeps track of points which are in the data. Whenever a crystal map is returned, the masked out points are entered as False in this array. If a crystal map with some points not in the data is passed to the refinement methods, only the points in the data are refined.

This functionality enables hybrid indexing (as sought by @IMBalENce in #458 (comment)), in which only bad points from Hough indexing can easily be singled out and dictionary indexed using a boolean mask. To merge the good Hough indexed points and the dictionary indexed points, both need to be refined in order to obtain smooth misorientations and get the same score so these can be compared when merging.

The function for merging single phase crystal maps also allows navigation mask(s).

A tutorial showing this workflow on a small dataset of very noisy recrystallized Ni patterns is part of this PR.

Other changes:

  • Navigation shape of patterns are flattened internally in order to allow navigation masking. This led to a slight speed-up in both dictionary indexing and refinement in most cases in the documentation.
  • Number of objective function evaluations per pattern are returned from refinement methods. This information can be useful when optimizing refinement methods further.

Navigation masks allow a route for refining multi phase maps in that one can get a single phase view of the multi phase map and refine only this, do this for all phase and subsequently merge. This workflow is basically what is sought in #411. Closes #411.

Navigation masks is the only improvement listed in #422 which I consider necessary. Closes #422.

I anticipate that these changes are the final ones before releasing version 0.8.

Progress of the PR

Minimal example of the bug fix or new feature

See hybrid indexing tutorial in this PR: https://kikuchipy--593.org.readthedocs.build/en/593/tutorials/hybrid_indexing.html.

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>
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>
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>
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>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
@hakonanes hakonanes added enhancement New feature or request documentation This relates to the documentation labels Jan 19, 2023
@hakonanes hakonanes added this to the v0.8.0 milestone Jan 19, 2023
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 merged commit 1dad34a into pyxem:develop Jan 20, 2023
@hakonanes hakonanes deleted the navigation-mask-indexing branch January 20, 2023 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This relates to the documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential improvements to dictionary indexing Allow to refine multiphase crystal maps
1 participant