-
Notifications
You must be signed in to change notification settings - Fork 50
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
Change left/right symmetry in reduction of (mis)orientations to fundamental zone #442
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
kikuchipy's tests pass with this branch. The functionality in kikuchipy relying on reduction to Rodrigues fundamental zone is the uniform sampling of orientations. This seems to be unaffected by this change. |
Considering the change in this PR, the notion of the first and second symmetry in An alternative would be to allow one or two symmetries to be passed as Another alternative is two flip the order |
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Talked to @anderscmathisen offline, reduction to the FZ now seems to make sense for his use. |
Thanks @hakonanes . I hope I get some chance to test this soon on the dataset where I had the issues in the past. What is the exact version number of the new orix version which includes this change? I will probably install in a test environment initially and not destroy my old install just yet. |
That would be great. This change only lives in my fork so far, which you should be able to install into an environment like so: pip install git+https://github.com/hakonanes/orix.git@fix-misorientation-reduce If reviewers agree that his change is necessary, I anticipate that the change will be part of the next minor release v0.12, which should be released shortly after this PR is merged. |
@hakonanes I have installed in my testing environment, run it on the old data, and found that the symmetry reduction works more reliably on the Silicon misorientations dataset that was giving problems before. |
Happy to hear that, thank you for doing the tests. Please report back if you still find inconsistencies. |
FYI, @DorianDepriester checked out the changes in this PR on his calculation of weighted mean orientations in #434 (comment) and got results in line with his expectations. |
Thank you for sharing this test, @maclariz. I believe this is related to (inconsistent?) alignment of crystal axes with symmetry operations. I've encountered issues with point group -3m myself (chromium nitride in duplex steel) using the changes in this PR. Given this issue, I suggest to wait with the change in the left/right symmetry of I'll make another PR for the changes in this PR not strictly related to the left/right symmetry change. |
I've started to work on this in https://github.com/hakonanes/orix/tree/plot-symmetry-operations. I anticipate it will take some time. |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Description of the change
This PR changes the order of symmetry application in the reduction of misorientations to the misorientation fundamental zone from
sym_A * m_AB * sym_B
tosym_B * m_AB * sym_A
. The new order is in line with the notion of the misorientation fromo_A
too_B
being given bym_AB = o_B * o_A^-1
.Note that the same algorithm is used to reduce orientations to the Rodrigues fundamental zone, in which case the two symmetries are the symmetry of the sample reference frame,
sym_A = C1
and the symmetry of the crystal, saysym_B = Oh
.This change was motivated by several inconsistent results reported lately. This change fixes all these issues:
I had to update all three clustering tutorials. They give comparable results, although I'm unsure of how to solve the mirroring of the clustered Ti orientations in that tutorial. Any help on spotting an error would be appreciated.
The other major change is naming:
map_into_symmetry_reduced_zone()
->reduce()
, inspired by the attractive naming ofscipy.spatial.transforms.Rotation.reduce()
. I've deprecated the former method in favor of the new one, with removal in v0.13. Arguably not as easy to understand as the former name, but the notion of reducing a (mis)orientation to its fundamental zone is there. Using this word allows us also to addreduce
as an intuitive parameter to various methods if we don't want to apply symmetry operations, instead of having ause_symmetry
parameter (similar to MTEX'noSymmetry
). We could then renameMiller.in_fundamental_region()
toMiller.reduce()
etc.Testing this change required some other tools and changes, which are also included in this PR:
Vector3d.get_path()
to get vectors along the path between two or more vectors. Useful to plot a bounded region on the stereographic projection, or delineate a path between two vectors.convention
parameter in to/from_euler() methods from v1.0 to v0.13, because I don't see v1.0 on the horizon.grid.alpha
config value.Progress of the PR
Minimal example of the bug fix or new feature
I suggest to inspect the clustering tutorial notebooks in the docs built from this PR:
For reviewers
__init__.py
.section in
CHANGELOG.rst
.__credits__
inorix/__init__.py
and in.zenodo.json
.