average objects using the mean defined for their type.

Syntax

average = mean(x)

Description

For an MTEX object, mean(x, …) calls x.mean(…). Additional positional and keyword arguments are passed to that method unchanged. Its documentation specifies the accepted inputs, units, symmetry handling and optional outputs. Consult the corresponding method for the behaviour of a particular object type.

For numeric arrays without an MTEX method, this calls numpy.mean.

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.]

Signature

mean(x, *args, **kwargs)

Methods it calls

embedding the arithmetic mean of the images
orientation the mean of a list of orientations, with the principal moments and axes of inertia
PoleFigure the mean intensity of each pole figure, the integral over the sphere
quaternion the mean of a list of quaternions, with the principal moments and axes of inertia
S1FunHandle the mean over the circle, through the harmonic form
S1FunHarmonic the mean over the circle, the coefficient c_0
S2FunBingham the mean value over the sphere, one: the distribution is normalised
S2FunHandle the mean over the sphere, through the harmonic form
S2FunHarmonic the mean over the sphere, int f dS / 4 pi, one per function
S2FunSum the sum of the means of the summands
S2FunTri estimate the spherical mean using Voronoi areas around the sample vertices
S2VectorFieldHarmonic the mean vector of the field over the sphere, read off the coefficients of degree zero
SO3FunBingham the mean value of the function over SO(3), its weight
SO3FunCBF the mean of the function over SO(3), the sum of the weights times the kernel’s mean
SO3FunComposition the sum of the means of the components
SO3FunHarmonic the mean of every function
SO3FunRBF the mean of the function over SO(3), c0 plus the sum of the weights times the kernel’s mean
SO3TangentVector the mean of tangent vectors at one shared reference, weighted when weights are given
SO3VectorFieldHarmonic the mean over SO(3), and the length of the vectors as a function, MATLAB’s norm
tensor the mean of a list of tensors, over all of them or along axes, weighted or not
vector3d the mean direction of a list of vectors, of axes, or of crystal directions

Used on

OrientationEmbeddings, EBSDAdvancedMaps, EBSDGrid, EBSDSharpPlot, CPOSeismicProperties, IsotropicTheory, WaveVelocities, TwinningBoundaries, Grain_dispersion_axes, FibreODFs, ODFCharacteristics, ODFImport

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/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.