This PR adds the option to refine EBSD orientations/PC with the NLopt package. It's Nelder-Mead implementation gives comparable results to SciPy's implementation but faster, often giving a > 2x speed-up.
Because of this speed-up and (in my opinion) better control of refinement parameters like control variable bounds and initial steps, I'd like to make NLopt's Nelder-Mead the default. However, the latest release was in March, and there are open issues about installation problems on M1 Macs (conda seems to be fine) and whether it supports Python 3.11 (it doesn't as of now). I've instead added NLopt as an optional dependency via pip install kikuchipy[opt].
Other changes:
Reverted use of Rodrigues-Frank vectors in refinement to Euler angles. It was a mistake to use vectors. It is simpler to define bounds and initial steps for Euler angles.
Switch PyVista/Jupyter backend from pythreejs to panel as a temporary solution to #583.
[x] Demonstrate the use of NLopt in the pattern matching tutorial
[x] Test NLopt's subplex algorithm: My limited testing shows that it performs comparable to Nelder-Mead (similar time but slightly worse average correlation score). Will not support this method at this time.
Minimal example of the bug fix or new feature
I'll link to the pattern matching tutorial notebook in the docs built from this PR once I've updated it to show use of NLopt.
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.
Description of the change
This PR adds the option to refine EBSD orientations/PC with the NLopt package. It's Nelder-Mead implementation gives comparable results to SciPy's implementation but faster, often giving a > 2x speed-up.
Because of this speed-up and (in my opinion) better control of refinement parameters like control variable bounds and initial steps, I'd like to make NLopt's Nelder-Mead the default. However, the latest release was in March, and there are open issues about installation problems on M1 Macs (conda seems to be fine) and whether it supports Python 3.11 (it doesn't as of now). I've instead added NLopt as an optional dependency via
pip install kikuchipy[opt]
.Other changes:
Progress of the PR
Minimal example of the bug fix or new feature
I'll link to the pattern matching tutorial notebook in the docs built from this PR once I've updated it to show use of NLopt.
For reviewers
__init__.py
.CHANGELOG.rst
.release.py
,.zenodo.json
and.all-contributorsrc
with the table regenerated.