A method of orientation.
the mean of a list of orientations, with the principal moments and axes of inertia
Syntax
m = mean(ori)
The mean orientation.
m = mean(ori, weights=w)
A weighted mean.
m = mean(ori, robust=True)
Outliers left out.
m, oriProjected = mean(ori, return_projected=True)
With the equivalents nearest to it.
m, oriProjected, lam, V = mean(ori, return_projected=True, return_inertia=True)
And the inertia.
Description
Starting from the first orientation, every orientation is moved to its symmetric equivalent closest to the running mean, and the quaternion mean of these equivalents is the next mean; iterations rounds of this. A texture spread over more than the fundamental region has no meaningful mean. Orientations that are not a number are left out.
The mean is taken over the whole list; axis is refused, index the list for the mean of a part.
Input
ori |
orientation |
Keywords
| keyword | default | description |
|---|---|---|
weights |
None |
one weight per orientation |
robust |
False |
leave out the outliers, as quaternion.mean does |
iterations |
3 |
the rounds of moving to the closest equivalents and averaging |
return_projected |
False |
also return oriProjected |
return_inertia |
False |
also return lam and V |
axis |
None |
NumPy’s reduction axis, refused |
dtype |
None |
NumPy’s argument, refused |
out |
None |
NumPy’s argument, refused |
keepdims |
False |
keep the reduced axes with length one, as np.mean does |
Output
m |
orientation, the mean |
oriProjected |
orientation, the equivalents of ori closest to m, NaN where ori is |
lam |
the principal moments of inertia, in ascending order |
V |
quaternion, the four principal axes of inertia |
Example
Average orientations that straddle a cubic symmetry boundary. The Euler angles 1 and 89 degrees represent orientations only two degrees apart under cubic symmetry.
import numpy as np
from mtex import crystalFrame, orientation, degree, mean
cs = crystalFrame('m-3m')
ori = orientation.byEuler(np.array([1, 89])*degree, 0, 0, cs)
centre, projected = mean(ori, return_projected=True)
print('Input Euler phi1 (degrees):', [1, 89])
print('Misorientation to mean (degrees):', np.round(ori.angle(centre)/degree, 3))
print('Projected rotations to mean (degrees):', np.round(projected.angle(centre, symmetry=False)/degree, 3))
The symmetry-aware mean lies near a cubic equivalent of zero degrees. Arithmetic averaging of the Euler angles would give 45 degrees. Use a mean for a localized orientation cluster; a broad or multimodal texture generally cannot be represented by one mean orientation.
Input Euler phi1 (degrees): [1, 89]
Misorientation to mean (degrees): [1. 1.]
Projected rotations to mean (degrees): [1. 1.]
See also
quaternion.mean, quaternion.std, EBSD.grainMean, BinghamODF
MATLAB’s orientation.mean
source
Citing this page.
This page is part of the documentation of
MTEX, a free and open
source MATLAB toolbox for analyzing and modeling crystallographic textures.
It was written by The MTEX Developers and is published at
https://mtex-toolbox.github.io/orientation.mean_py.html.
If you use MTEX, or reuse text or figures from this page, in your research,
please cite
F. Bachmann, R. Hielscher, H. Schaeben: Texture Analysis with MTEX - Free and Open Source Software Toolbox, Solid State Phenomena 160 (2010), 63-68. 10.4028/www.scientific.net/SSP.160.63
BibTeX
@article{bachmann2010mtex,
author = {F. Bachmann and R. Hielscher and H. Schaeben},
title = {Texture Analysis with MTEX - Free and Open Source Software Toolbox},
journal = {Solid State Phenomena},
volume = {160},
pages = {63-68},
year = {2010},
doi = {10.4028/www.scientific.net/SSP.160.63},
url = {https://doi.org/10.4028/www.scientific.net/SSP.160.63}
}
Other papers describing specific MTEX methods are listed under Publications — please cite the one that best fits your application. The MTEX source code is licensed under the GNU General Public License v2.0; the text and figures of this documentation are licensed under CC BY 4.0, which permits reuse — including by automated systems — provided The MTEX Developers and this page are credited.