-
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
Option to use euler fundamental region for mean orientation #437
base: develop
Are you sure you want to change the base?
Conversation
Thanks for this, @anderscmathisen. Did you consider using I actually have a rewritten version of EMsoft's (Singh and De Graef's) reduction to the fundamental zone, and it produces the same results as you get by projecting to the Euler fundamental region. Interestingly, it reduces all your orientations above to a tight cluster in the axis-angle space of 622. Is this as expected? For completeness' sake, this change also relates to #434 in that we should overwrite more methods in the |
Thanks for the swift response. I indeed initially tried to use I agree that the
Not really no. Edit: |
OK, I checked my results against EMsoft's using their command line program |
I've changed reduction to the Rodrigues fundamental zone in #442. This change should fix your issue here, i.e. if you pull that branch and replace mean_ori_in_fundamental = oris.mean(mean_in_euler_fundamental_region=True) with mean_ori_in_fundamental = oris.reduce().mean() you should get what you want. I would be very grateful if you could actually check out the change on your example here and also any other problems you might have where reducing to the fundamental zone would be desirable. |
Hi, I have been testing with #442 and indeed that seems to solve all the issues with mean orientation :) As we discussed offline @hakonanes, we should rebase this PR to #442 and replace my previously committed code with something along the lines of: def mean(self, reduce=True):
"""..."""
if reduce:
quat = Quaternion(self.reduce())
else:
quat = Quaternion(self)
return Orientation(quat.mean(), symmetry = self.symmetry) It is perhaps best to wait for #442 to merge into develop before rebasing and continuing with this PR? |
Great. Yes, since we might make some changes to #442 before merging. |
BTW, since def mean(self, reduce=True):
"""..."""
if reduce:
quat = Quaternion(self.reduce())
else:
quat = Quaternion(self)
return self.__class__(quat.mean(), symmetry=self.symmetry) |
Description of the change
Added override to the
mean()
function in theOrientation
class with the option to calculate the mean in the euler fundamental region. Also keeps the symmetry of theOrientation
for the returned mean. This way, when plotting in an IPF, I think the meanOrientation
makes more sense.Progress of the PR
Minimal example of the bug fix or new feature
For reviewers
__init__.py
.section in
CHANGELOG.rst
.__credits__
inorix/__init__.py
and in.zenodo.json
.