-
Notifications
You must be signed in to change notification settings - Fork 28
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 EBSD Hough indexing with a thin wrapper around PyEBSDIndex #590
Merged
hakonanes
merged 21 commits into
pyxem:develop
from
hakonanes:ebsd-hough-indexing-method
Jan 12, 2023
Merged
Add EBSD Hough indexing with a thin wrapper around PyEBSDIndex #590
hakonanes
merged 21 commits into
pyxem:develop
from
hakonanes:ebsd-hough-indexing-method
Jan 12, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>
4 tasks
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>
2d1a297
to
74d0a46
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the change
This PR adds convenience methods for Hough indexing by a very thin wrapper around PyEBSDIndex. The methods are added to simplify use of kikuchipy with PyEBSDIndex.
Caveats:
pyebsdindex.ebsd_index.EBSDIndexer.index_pats()
. To get the best speed and memory handling, one should use PyEBSDIndex directly, e.g. viaebsd_index.index_pats_distributed()
.A
CrystalMap
is returned from the new methodEBSD.hough_indexing()
, which removes most of the inconvenience of getting a map from the array PyEBSDIndex' returns from itsEBSDIndexer.index_pats()
and similar functions. A functionkikuchipy.indexing.xmap_from_hough_indexing_data()
requring the array and an orixPhaseList
can be used to convert the array to a crystal map when using PyEBSDIndex directly (not viahough_indexing()
).EBSD.hough_indexing()
requires anpyebsdindex.ebsd_index.EBSDIndexer
, which can be conveniently created using a new methodEBSDDetector.get_indexer(phase_list)
, wherephase_list
is aPhaseList
. This ensures that all detector parameters (sample tilt, camera elevation, pattern shape) and the phase list (either FCC, BCC or both, at the moment) are handled correctly.Lastly, a
EBSD.hough_indexing_optimize_pc()
method is added to optimize projection centers (PCs). This wrapspyebsdindex.pcopt.optimize()
orpyebsdindex.pcopt.optimize_pso()
, depending on whether Nelder-Mead or particle swarm is chosen as optimization function. AEBSDDetector
with optimized PCs is returned.All tutorial notebooks using Hough indexing have been updated. They demonstrate nicely how to use the new functionality.
PyEBSDIndex is an optional dependency. It should be installed manually or via
pip install kikuchipy[all]
.all
is a new dependency list installing all dependencies and optional dependencies (PyEBSDIndex, NLopt, PyVista). Theviz
dependency list (PyVista) is deprecated and will be removed in 0.9.@Erlendos12, @htrellin and @olavlet: These changes might interest you for your https://github.com/htrellin/EBSD-GUI.
@drowenhorst-nrl: Hough indexing in kikuchipy is a very thin wrapper around PyEBSDIndex. This PR contains no duplication of functionality. I hope the new functionality in kikuchipy will increase the use of PyEBSDIndex and help identify any bugs going forward.
Progress of the PR
Minimal example of the bug fix or new feature
The indexing tutorials in the docs built from this PR demonstrates the new functionality nicely: https://kikuchipy--590.org.readthedocs.build/en/590/tutorials/index.html#indexing
For reviewers
__init__.py
.section in
CHANGELOG.rst
.release.py
,.zenodo.json
and.all-contributorsrc
with the table regenerated.