Every class and function of mtex, by the layer it belongs to; a class page lists its methods and properties.
Geometry
Classes
| crystalShape | construct a convex crystal morphology from symmetry-related lattice planes |
| dislocationSystem | a Burgers vector with a line vector, edge when orthogonal and screw when parallel |
| fibre | a fibre in orientation space: the orientations mapping the crystal direction h onto the specimen direction r, or the arc of them between two orientations |
| latticeType | the Bravais lattice systems, an enumeration whose members carry the conventions that follow from them: the default axis angles, the independent axis lengths, the orthogonal axes |
| orientation | orientations and misorientations, rotations taking coordinates in the frame CS to coordinates in the frame SS |
| orientationRegion | a region of orientation space bounded by planes in the quaternions, mostly the fundamental region of a pair of frames |
| orthogonalTransform | orthogonal transforms, a rotation and a parity as a fifth coordinate, -1 for an improper one, the rotation followed by the inversion |
| plane3d | planes in three-dimensional space, stored by unit normals and signed offsets |
| quaternion | quaternions stored as a + b*i + c*j + d*k, with one coefficient tuple per element |
| rotation | proper rotations represented by unit quaternions, with opposite signs identified |
| slipSystem | slip systems: slip directions b with plane normals n orthogonal to them and a critical resolved shear stress each, in crystal coordinates while Miller indexed, in specimen coordinates once an orientation has rotated them |
| SO3TangentVector | a tangent vector of SO(3), a rotation vector v at a reference rotation or orientation, on the left, exp(v) * oriRef, or on the right, oriRef * exp(v) |
| sphericalRegion | a region on the sphere bounded by small circles: all directions v with dot(v, N_i) >= alpha_i for every normal N_i |
| symmetry | a point group: the closure of the generators its Hermann-Mauguin symbol names, written in given axes |
| vector3d | three dimensional vectors, a container over (…, 3) coordinates carrying antipodal, isNormalized, the reference frame and the display style |
Functions
| alignment | describe how the Cartesian axes align with the axes of a crystal lattice |
| allHKL | every index triple up to maxIndex, coprime, without (0, 0, 0) |
| angle | measure angles between geometric objects, or the phase of numeric values |
| aspectRatio | measure the ratio of the longest to shortest fitted half axis of each grain |
| axis | return the axis of a rotation or misorientation |
| bainPlanes | the three {100} directions of the parent phase cs that the Bain groups of the variants are sorted by |
| calcDistortion | fit the spatial distortion between the maps of a registration job |
| calcFourier | return the harmonic coefficients of a kernel |
| calcGND | estimate geometrically necessary dislocation content from orientation gradients |
| calcGROD | compare every measurement with the reference orientation of its grain |
| calcMisorientation | sample uncorrelated misorientations from separated pairs of map measurements |
| calcParent | the parent orientations of child orientations under a parent to child orientation relationship, with their fit |
| calcParent2Child | the parent to child orientation relationship that fits child to child misorientations best, refined from an initial guess |
| calcVariantId | the variant, packet and Bain group of every child orientation with respect to its parent, MATLAB’s calcVariantId |
| caliper | measure the Feret width of each grain outline along a direction or at its extrema |
| cat | cat(a, b, …) is type(a).cat(a, b, …): the list of the operands, MATLAB’s [a, b], the carried attributes joined |
| characteristicShape | combine grain boundary segments into a characteristic particle shape |
| checkInside | whether x lies in the region, region.checkInside(x) |
| closestConvention | the entry of AXIS_CONVENTIONS nearest a rotation, and how far it is from it in radians |
| conj | take the quaternion or complex conjugate of an object |
| conv | convolve functions or kernels on their domain |
| conventionalSector | return the conventional spherical sector used to display crystal directions |
| conventionNames | the eight written in the axis names of a frame, ‘Y1↑→X1’ for an Oxford file |
| convexHull | the indices of the convex hull of points in the plane, anticlockwise, by Andrew’s monotone chain |
| convexHullLoops | the convex hulls of many loops of indices into the (n, 2) vertices V in one pass, a list of index arrays into V |
| convexity | compare each grain area with the area of its convex hull |
| cross | form the cross product of vectors or vector fields |
| CSL | the coincidence site lattice misorientations of order sigma of the lattice of the crystal frame cs, MATLAB’s CSL |
| cubo2homo | map cubochoric coordinates from a cube to the equal-volume homochoric ball |
| cubochoric | express rotations in equal-volume cubochoric coordinates |
| curvature | calculate the lattice curvature tensor from spatial orientation derivatives |
| det | calculate tensor determinants or vector triple products |
| diff | differentiate a function on the circle |
| dirichletSector | the Dirichlet domain of a point group about a centre, a fundamental domain for every group, whatever axes it is written in |
| discretize | sample a spatial transform as a displacement field at given positions |
| disjoint | find the symmetry elements shared by two point groups or frames |
| displacement | evaluate the displacement produced by a spatial transform |
| dist | dist(plane, v), dist(plane, plane2): the signed distance to the plane |
| dot | calculate an inner product, with the symmetry conventions of its operands |
| dspacing | return the separation of lattice planes from their Miller normals |
| Euler | express rotations as Euler angles in radians |
| eulerRegion | the ranges (phi1, Phi, phi2) of the Bunge Euler angles covering the fundamental region of two frames, the specimen frame the default second |
| even | extract the part of a function unchanged by reversal of its argument |
| exp | take the pointwise exponential or the exponential map of an object |
| extent | return the spatial bounding box of a map or image |
| factor | factor two point groups relative to their common symmetry elements |
| fill | fill missing measurements in a map using nearby data or grain information |
| fillByGrainId | replace map measurements by the mean orientations assigned to their grain ids |
| find | search geometric data for neighbours, or find nonzero entries of numeric data |
| findByLocation | locate map measurements or grains at specified spatial positions |
| findByOrientation | select measurements or grains close to an orientation or fibre |
| findPointGroup | the symbol a name stands for, findsymmetry: an exact name, then a space group symbol, then a name contained in the string, later entries first |
| fitEllipse | fit an ellipse to each grain outline using its second area moments |
| fitStage | fit one stage of a composite spatial transform to supplied point pairs |
| flip | exchange the two grain sides of boundary segments or faces |
| fullSym | return the largest registered symmetry group for the same frame basis |
| fundamentalRegion | return the region representing distinct orientations under the given symmetries |
| fundamentalRegionEuler | the box in Euler angles that carries every orientation at least once (fundamentalRegionEuler): the two-folds perpendicular to z halve Phi, and one of the reflections they make on phi1 or phi2 halves that angle when it folds its turn about zero fundamentalRegionEuler(cs, ss): MATLAB’s name of the Euler plotting box |
| fundamentalSector | return a spherical region containing one representative of each symmetry orbit |
| geodesic | the geodesic from a to b: exp(s * log(b, a)), s in [0, 1] |
| getMTEXpref | one preference, or with no name all of them as a new dict, MATLAB’s struct |
| grad | differentiate a scalar function or a smoothing kernel |
| gradient | calculate spatial orientation derivatives of a map |
| gradientX | differentiate map orientations along the x direction |
| gradientY | differentiate map orientations along the y direction |
| gradientZ | differentiate map orientations along the z direction |
| grainMean | average a map property separately within each grain |
| gridify | arrange measurements on the cells of their spatial lattice |
| halfwidth | return the angular halfwidth of a kernel in radians |
| hm2point | a Hermann-Mauguin space group symbol reduced to its point group, hms2point |
| homo2cubo | map equal-volume homochoric coordinates from a ball to the cubochoric cube |
| homochoric | express rotations as equal-volume coordinates inside the homochoric ball |
| homochoricRadius | the radius (3 pi / 4)^(1/3) of the homochoric ball, the image of the rotations of angle pi |
| hull | replace particle outlines by their convex hulls |
| identifyGroup | the symbol of a list of elements written in the given axes, ‘’ when it names no group |
| innerFace | innerFace(cS, n): the section of the shape by the plane through its centre |
| inpolygon | test whether map positions or grain centroids lie inside a polygon |
| interp | read a map or spherical data at new sample positions |
| intersect | intersect(plane, v1, v2): where the segments cross the plane |
| inv | invert a rotation, tensor or spatial transform |
| invRadon | invert the spherical Funk transform on its even modes |
| isAligned | test whether two reference frames have aligned basis vectors |
| isclose | compare objects within the numerical tolerances of their type |
| isCompatible | check whether a coordinate transition between two frames is available |
| isCrystalDirection | whether v is a vector given in a crystal frame |
| isnan | identify objects containing missing coordinates or coefficients |
| isPointGroupName | whether a string names a point group exactly, by one of its symbols or names, never a substring: the specimen frame ‘measurement’ is no group m |
| KAM | measure the mean misorientation angle from each map measurement to its neighbours |
| laplace | apply the Laplace-Beltrami operator to a harmonic function |
| Laue | add inversion symmetry to a point group or reference frame |
| LaueName | return the Hermann-Mauguin symbol of the corresponding Laue group |
| left | left(t) is t.left(): the tangent vectors on the left side |
| lineIntersect | where the segments from a to b cross the planes <n, v> = d, NaN where they do not, MATLAB’s lineIntersect |
| loadSettings | applies the saved settings to the session: the key plottingConvention sets the default convention, every other key the preference of that name |
| log | take a pointwise logarithm or map rotations to tangent vectors |
| longAxis | return the longest fitted half axis of each grain outline |
| matrix | express rotations, transforms or tensors as numeric matrices |
| maxAngle | maxAngle(cs), maxAngle(cs1, cs2): the largest rotation angle of the fundamental region of the frames, MATLAB’s maxAngle of a symmetry |
| mean | average objects using the mean defined for their type |
| merge | join grains that meet the specified boundary, label or orientation criteria |
| Miller | crystal directions and lattice plane normals, a vector3d in a crystal frame |
| misfit | misfit(mori, p2c): the angle of every child to child misorientation to the nearest one the relationship predicts |
| monoclinicSetting | ‘2’, ‘m’, ‘2/m’ with lattice angles: the unique axis is the one whose angle is not 90 degree |
| mPrime | mPrime(sS1, sS2) is sS1.mPrime(sS2): the Luster-Morris parameter |(n1 |
| multiplicity | count distinct symmetry-equivalent directions or fibres |
| nfold | return the order of the rotational symmetry axes of a point group |
| norm | measure vector lengths, tensor magnitudes or function L2 norms |
| normalize | scale vectors, tensors or densities to the normalisation of their type |
| numProper | count the proper rotations in a point group |
| numSym | count all operations in a point group |
| orth | choose a unit direction perpendicular to each vector |
| orthProj | project vectors onto the plane perpendicular to a given normal |
| packetPlanes | the four {111} planes of the parent phase cs that the packets of the variants are sorted by |
| paris | measure outline indentation relative to the convex hull, in percent |
| paror | calculate the cumulative particle projection function of grain outlines |
| perp | fit an axis perpendicular to a collection of directions |
| pixelSizeMatch | resample the maps and images of a registration job to a common pixel spacing |
| polar | return polar vector coordinates or a tensor polar decomposition |
| pos2ind | convert physical image positions to pixel indices |
| principalComponents | return the principal half axes of grain outlines or volumes |
| project | project directions to a plane or embeddings back to orientations |
| projectIntoEulerRegion | the Bunge Euler angles of the representative of every orientation inside the Euler box of its frames, as MATLAB’s project2EulerFR: three arrays in the shape of the list |
| projectIntoFundamentalRegion | choose symmetry-equivalent representatives in a fundamental region |
| projectIntoRegion | the image of a direction that lies in a region, under the group |
| properGroup | form a proper rotation group from all rotational parts of a point group |
| properSubGroup | retain only the proper rotations already present in a point group |
| radon | apply an orientation Radon transform or a spherical Funk transform |
| reduce | coarsen a map lattice or a boundary discretisation |
| reduceBoundary | coarsen the boundary discretisation of grains |
| refineBoundary | subdivide boundary segments or triangular faces |
| reflection | a reflection at the plane with normal n |
| reset | a fresh session: the preferences, the register and the default frame |
| right | right(t) is t.right(): the tangent vectors on the right side |
| Rodrigues | express rotations as axes scaled by the tangent of half the rotation angle |
| rotate | rotate(x, rot) is x.rotate(rot), or rot * x for an object without that method |
| round | round(x) of an MTEX object by its own round, of an array, a list or with an axis as NumPy rounds, of a number as Python rounds, so that from mtex import * keeps Python’s round |
| round2Miller | the lattice planes and directions of low indices an orientation or a misorientation aligns |
| sectorCenter | the centre of the Dirichlet domain: the barycentre of the conventional sector - the triangle c, a, tertiary for the tetragonal and hexagonal systems, [001], [101], [111] for the cubic one - in the axes the group is written in |
| setMTEXpref | sets a preference of the session |
| setOptions | set registration options for a job or one of its maps |
| settingsFile | the path of the user’s settings file, whether or not it exists: MTEX_SETTINGS when set, else mtex_settings.json in the user’s configuration folder, %APPDATA%/mtex on Windows and $XDG_CONFIG_HOME/mtex or ~/.config/mtex elsewhere |
| shapeFactor | compare grain perimeters with circles of the same area |
| shift | translate map positions by a spatial displacement |
| shortAxis | return the shortest fitted half axis of each grain outline |
| sim | compare the symmetry classes of reference frames without requiring aligned axes |
| simplifyBoundary | remove boundary vertices while limiting the change in outline shape |
| smooth | smooth sampled orientations, boundaries or harmonic functions |
| smoothBoundary | smooth grain boundary curves or surfaces |
| spaceGroupToPointGroup | return the crystallographic point-group symbol for a space-group number |
| spatialProfile | sample map measurements along a spatial polyline |
| sqrt | take the pointwise square root of a function or numeric array |
| std | measure the angular spread of rotations about their mean |
| stripSym | return the same frame basis with the trivial symmetry group |
| subGrid | select grid points by indices or by a geometric neighbourhood |
| subsample | keep every n-th map measurement along each lattice direction |
| sum | sum(x) of an MTEX object by its own sum, of an array or with an axis as NumPy sums, of any other iterable as Python sums, so that from mtex import * keeps Python’s sum |
| surfor | calculate the cumulative directional projection length of boundary segments |
| symmetrise | apply the symmetry action appropriate to directions, tensors or fields |
| tilesSphere | whether the region is a fundamental domain of the point group: n evenly spread directions folded into it all land inside, and it covers the share of one element |
| transform | apply a spatial transform to map positions |
| transformationMatrix | return the coordinate transition between two reference frames |
| transformReferenceFrame | express the same geometric data in another reference frame |
| truncate | cut or pad a harmonic expansion to a specified maximum degree |
| undistort | resample a registration job onto its reference grid using the fitted transforms |
| union | combine point groups or compatible pole figure data sets |
| unique | remove duplicate geometric objects, respecting their symmetry and tolerance |
| variants | the variants of a parent to child orientation relationship, and the child or parent orientations they give |
| weightedBurgersVec | estimate net Burgers vector per unit area from an orientation map |
| withExchange | impose grain exchange symmetry f(g) = f(inv(g)) on an orientation function |
Helper folders
| Folder | Contents |
|---|---|
| Spherical and orientation grids | Grids and triangulations for sampling directions and rotations, and for finding nearby samples. |
| Reference frames and layouts | Coordinate frames, crystal axes and array layouts used to express directions, orientations and measurement positions. |
| Spatial transforms | Models for moving measurement positions between frames, fitting scan distortions and applying their inverses. |
Function spaces
Classes
| fibreVonMisesFisherKernel | the von Mises Fisher kernel of a fibre, what fibreODF convolves with |
| griddedDensity | a density tabulated on a Cartesian grid and evaluated by cubic interpolation |
| InvariantProjection | symmetry projection blocks for harmonic coefficients, stored on their nonzero index support |
| PoleFigure | measured pole figure intensities with their crystal and specimen directions |
| quadratureS1Grid | equally spaced angles and weights for Fourier quadrature on the circle |
| S1BumpKernel | the indicator of the interval |x| < delta scaled to a density |
| S1DeLaValleePoussinKernel | the n-th de la Vallee Poussin kernel on the circle, 2 F_(2n-1) - F_(n-1) with F the Fejer kernels: coefficients one up to n, falling to zero at 2n |
| S1DirichletKernel | the Dirichlet kernel on the circle, sum_(k = -n . |
| S1FejerKernel | the Fejer kernel on the circle, the mean of the Dirichlet kernels D_0 . |
| S1FourierPlan | the circle: f(x) = sum_{k=-L}^{L} c_k e^{ikx} |
| S1FunHandle | represent a periodic circular function by a vectorised callable |
| S1FunHarmonic | a function on the circle by its Fourier coefficients fhat, k = -L..L, over e^{-ikx} as MATLAB’s |
| S1GaussKernel | the heat kernel of the circle, a wrapped Gaussian: what smooths a density of angles |
| S1Kernel | an even kernel on the circle represented by a finite Fourier series |
| S1KernelHandle | wrap a callable formula as a S1Kernel |
| S2AxisFieldHandle | an axis field on the sphere given by a function of the directions, with a bandwidth hint for its expansion |
| S2AxisFieldHarmonic | an axis field on the sphere by a harmonic series: an axis without sign at every direction, as the principal directions of a stress or the polarisations of a wave |
| S2BumpKernel | the bump kernel on the sphere: 2 / (1 - cos delta) on the cap of radius delta, zero beyond, a density of mean one |
| S2DeLaValleePoussinKernel | the de la Vallee Poussin kernel on the sphere, (1 + kappa) ((1 + t) / 2)^kappa: nonnegative and a finite series, the kernel recommended for texture analysis |
| S2DirichletKernel | the Dirichlet kernel on the sphere, sum_n (2n+1) P_n(t) up to the degree N, of mean one |
| S2FourierPlan | the NUFFT plan of a spherical harmonic series at arbitrary directions v up to bandwidth L, reusable across coefficient vectors: plan(fhat) evaluates, plan.adjoint(values, weights) |
| S2Fun | base class for scalar functions of a direction on the unit sphere |
| S2FunBingham | an antipodally symmetric Bingham density on the unit sphere |
| S2FunHandle | a function on the sphere given by a callable that receives directions |
| S2FunHarmonic | a function on the sphere by its spherical harmonic series, or a list of such functions |
| S2FunSum | a sum of functions on the sphere of different representations: evaluation adds the values, the harmonic form adds the harmonic forms |
| S2FunTri | interpolate sampled spherical data linearly over a triangulation |
| S2GridPlan | the sphere: f(theta, rho) = sum G[m, j] e^{i(m rho - j theta)}, theta a transform of length 4Lg cut to the grid’s rows, rho one of the grid’s length, real valued for a real function |
| S2Kernel | a radially symmetric spherical kernel represented by Legendre coefficients |
| S2KernelHandle | wrap a callable formula as a S2Kernel |
| S2RestrictedDistanceKernel | the restricted distance kernel on the sphere, -2 sin(acos(t) / 2), cut at the degree N: negative, a distance between directions that makes points repel each other |
| S2VectorFieldHandle | a vector field on the sphere given by a callable of the directions, the bandwidth a hint for its harmonic expansion |
| S2VectorFieldHarmonic | a vector field on the sphere by the spherical harmonic expansions of its three Cartesian components |
| SchulzDefocusingKernel | model the intensity correction for defocusing in a tilted Bragg–Brentano measurement |
| SO3AbelPoissonKernel | the Abel Poisson kernel on SO(3), sum_n (2n+1) kappa^(2n) U_2n(t), kappa in (0, 1) |
| SO3BumpKernel | the bump kernel on SO(3): constant on the rotations of angle below delta, zero beyond, of mean one |
| SO3DeLaValleePoussinKernel | the de la Vallee Poussin kernel on SO(3), B(3/2, 1/2) / B(3/2, kappa + 1/2) t^(2 kappa): nonnegative and concentrated at zero, the kernel recommended for texture analysis |
| SO3DirichletKernel | the Dirichlet kernel on SO(3), sum_n (2n+1) U_2n(t) up to the degree N, of mean one: the kernel for physical properties |
| SO3FourierPlan | reusable transform plan for a Wigner series at arbitrary rotations |
| SO3Fun | base class for scalar functions on orientation space SO(3) |
| SO3FunBingham | the Bingham distribution on SO(3): the density exp(q’ A diag(kappa) A’ q) on the quaternions, symmetrised over the crystal and specimen frames, with four concentrations kappa and four orthonormal quaternion axes A |
| SO3FunCBF | a fibre ODF: a sum over fibres h || r of a kernel on the sphere of the angle between g h and r |
| SO3FunComposition | a sum of functions of different representations: evaluation adds the values, the harmonic form adds the harmonic forms |
| SO3FunHandle | a function on SO(3) given by a callable that receives orientations |
| SO3FunHarmonic | a function on SO(3) as a series of Wigner functions, symmetric under its crystal and specimen frame |
| SO3FunRBF | a function on SO(3) as a sum of radial kernels at centre orientations, plus a constant: a radial basis function ODF |
| SO3GaussWeierstrassKernel | the Gauss Weierstrass kernel on SO(3), sum_n (2n+1) e^(-n(n+1) kappa) U_2n(t), kappa > 0 |
| SO3GridPlan | the plan of a Wigner series on a Clenshaw-Curtis quadrature grid of SO(3) up to bandwidth L, a sequence of FFTs one axis at a time: plan(fhat) evaluates, plan.adjoint(values, weights) |
| SO3Kernel | a rotationally symmetric kernel represented by Chebyshev coefficients |
| SO3KernelHandle | wrap a callable formula as a SO3Kernel |
| SO3LaplaceKernel | the Laplace kernel on SO(3), sum_n (2n+1) / (4 n^2 (2n+2)^2) U_2n(t), without a constant term |
| SO3RestrictedDistanceKernel | the restricted distance kernel on SO(3), -sqrt(8) sin(acos(t)), cut at the degree N: negative, a distance between orientations that makes points repel each other |
| SO3SobolevKernel | the Sobolev kernel on SO(3), sum_n (2n+1) (n(n+1))^s U_2n(t) up to the bandwidth |
| SO3SquareSingularityKernel | the square singularity kernel on SO(3), kappa in (0, 1), its coefficients the Legendre functions of the second kind |
| SO3VectorFieldHandle | a vector field on SO(3) given by a callable returning vectors or tangent vectors at orientations, in the left or right tangent space |
| SO3VectorFieldHarmonic | a vector field on SO(3) whose three components are series of Wigner functions, in the left or the right tangent space |
| SO3VectorFieldRBF | a vector field on SO(3) as a sum of radial kernels at centre orientations with weight vectors, exactly equivariant |
| SO3vonMisesFisherKernel | the von Mises Fisher kernel on SO(3), proportional to e^(kappa cos omega), kappa > 0 |
Functions
| adjointTransform | adjointTransform(plan, values, weights) is plan.adjoint(values, weights): the coefficients from weighted values at the plan’s nodes |
| angularDerivatives | L_i f, the derivative under the rotation about e_i, on the coefficients: the ladder operators as shifts of the coefficient vector, the degrees never mixing |
| antiderivative | the antiderivative of a gradient field, the function of mean zero whose gradient it is |
| bandwidthFor | the smallest bandwidth at least L whose 2L+2 the folds divide |
| BinghamODF | construct an orientation distribution from Bingham concentrations and quaternion axes |
| calcAngleDistribution | the distribution of the misorientation angle: of a misorientation density, of a list of misorientations, or of the uniform density of two crystal frames |
| calcAxisDistribution | the axis distribution of an SO(3) function, an S2 function of the rotation axes symmetric under the rotations the two frames share |
| calcBinghamODF | the Bingham distribution estimated from orientations |
| calcComponents | the modal orientations of an orientation density, the components: their orientations, their volumes and the mode every seed flowed into |
| calcDensity | estimate a smooth density from orientations, directions, angles or real-valued samples |
| calcError | the error between a measurement and a recalculation, or between two SO(3) functions |
| calcErrorPF | the pole figures of the deviation from a recalculation |
| calcKernel | the kernel a density estimate of orientations or directions should use, a de la Vallee Poussin kernel of the halfwidth chosen from the sample |
| calcMDF | the uncorrelated misorientation distribution function of one or two ODFs |
| calcMIndex | the M-index of an ODF by Skemer et al., computed from the ODF instead of a discrete number of orientations |
| calcNormalization | calcNormalization(pf, other) is pf.calcNormalization(other): the factor that scales the second pole figure to the mass of the first |
| calcPoleFigure | the pole figures an ODF predicts: simulated diffraction intensities, superposed pole figures and any specimen directions |
| calcQuadratureWeights | weights that integrate a function from samples at the directions, summing to one |
| centerSpecimen | an orientation density of an assumed orthotropic texture rotated so that its two fold axes lie on the specimen axes |
| clebschGordan | <j1 m1 j2 m2 | J M> by the Racah formula in exact rational arithmetic |
| clebschGordanTensor | the array C[m1, m2, M] of degrees l1, l2 coupled to J |
| clenshawCurtis | construct an n-point Clenshaw–Curtis quadrature rule on [-1, 1] |
| component | component(v, i) is the i-th component of the field v, a function on its component frames |
| componentFrames | the frames the components are functions on: the group on the tangent side is stripped |
| correct | correct(pf, …) is pf.correct(…): the background subtracted and the defocusing divided out |
| curl | the curl, the dual of the exterior derivative, a field of the same side |
| deg2dim | the number of harmonic coefficients on SO(3) of the degrees below n, sum of (2k + 1)^2 for k = 0 . |
| degreeBlock | the block of degree n as a view, rows the specimen side k, columns the crystal side l |
| degreeRange | the slice of the coefficients of degree n in a flat SO(3) coefficient array |
| differentiate | the three derivatives of a coefficient vector, on the rows for the left side and on the columns for the right |
| dim2deg | the bandwidth of a coefficient array of length d, so that dim2deg(deg2dim(n + 1)) == n |
| discrepancy | the discrepancy between two densities and/or weighted point sets on the sphere (S2Fun, vector3d) or on SO(3) (SO3Fun, rotation, orientation), in either order |
| discreteSample | a random sample of n orientations drawn from an orientation density, of directions from a density on the sphere, of numbers from a density on an interval, or n random members of a list |
| div | the divergence, invariant under both groups |
| entropy | the entropy -int f log f of a function on SO(3) or on the sphere |
| equivariantProjection | the projection of stacked components onto the equivariant fields: for every degree the mean over the group of M(s) kron D(s), M the matrix acting on the components and D the matrix acting on one component from the left |
| fibreODF | a fibre ODF, symmetric about the fibre of the orientations taking a crystal direction to a specimen direction, its shape a kernel on the sphere |
| fibreVolume | the volume of a fibre: the share of an orientation density within a radius of the fibre of the orientations that map the crystal direction h onto the specimen direction r |
| foldedDims | the shape (l, k, j) of the Fourier array of bandwidth L, the two periodic axes shrunk by the z folds, the axis l halved for a real function |
| folds | the z folds on the crystal and on the specimen side: the order of the rotation about z that leaves the frame’s group invariant |
| FourierODF | an ODF by its Fourier coefficients, or another ODF in its harmonic form (MATLAB FourierODF) |
| fourierSeries | the Fourier series sum of chat_k e^{ikx} at the angles x, directly or by NUFFT |
| fourierSeriesAdjoint | the Fourier coefficients c_{-L} . |
| Gaussian | the normal density of mean m and width delta, the standard deviation times sqrt(2) |
| gaussLegendre | construct an n-point Gauss–Legendre quadrature rule on [-1, 1] |
| halfPiDegrees | the Wigner-d matrices d_0(pi/2) . |
| interpolate | the function in harmonic form fitted by least squares to values at nodes: on SO(3) at orientations, on the sphere at directions, a vector field for vector values or tangent vectors |
| interpolateRBF | an SO3FunRBF, a weighted sum of radial kernels, through values at orientations |
| interpSO3 | a function on SO(3) through values at orientations, by radial basis functions, by harmonics or as a Bingham distribution |
| invariantProjection | the projection of the harmonic coefficients onto the functions invariant under a group, one matrix P_n per degree up to L |
| isOutlier | the measurements deviating from the mean of their neighbours by more than alpha standard deviations |
| isRealFourier | whether Fourier coefficients on the circle are those of a real function, c_{-k} = conj(c_k) |
| isRealSpherical | whether spherical coefficients are those of a real function, fhat_l^{-m} = (-1)^m conj(fhat_l^m) |
| isRealWigner | a coefficient vector is real valued when fhat_n^{-k,-l} = (-1)^{k-l} conj(fhat_n^{kl}) on SO(3), fhat_l^{-m} = (-1)^m conj(fhat_l^m) on S2, c_{-k} = conj(c_k) on S1 |
| kde1d | a kernel density estimate of one dimensional data by diffusion, the Gaussian kernel’s bandwidth chosen from the data |
| kdeN | the adaptive kernel density estimate of samples in several dimensions, the regularised EM mixture of Botev et al. |
| legendreP | the Legendre polynomials P_0(x) . |
| mapField | a pointwise operation on vector fields on SO(3), as a field or a function |
| mapFun | the harmonic function of op applied pointwise to f and gs, by quadrature at the sum of their bandwidths, capped by the preference, or at the given bandwidth |
| max | the maximum of a function on SO(3) or the sphere, the value and the position, numLocal local maxima from a grid refined down to the accuracy |
| mhyper | 1F1(1/2 |
| min | the minimum of a function on SO(3) or the sphere, the value and the position, numLocal local minima |
| mlsq | MATLAB’s mlsq: least squares over weights of the sign of the start, the steepest descent direction scaled by the weights so that none crosses zero |
| noisepf | simulated diffraction counts: Poisson counts of factor * I + background, the background subtracted again |
| normalizedLegendre | the fully normalised associated Legendre functions P_l^m(x), m = 0..l, with the Condon-Shortley phase, so that Y_l^m = P_l^m e^{im rho} |
| projectLeft | the coefficients projected in place on the left, the specimen side, by the projection P |
| projectRight | the coefficients projected in place on the right, the crystal side, by the projection Q |
| refine | the directions with a new one between every three neighbours: the centroids of the Delaunay triangles of the points on the sphere, none below the lowest point, so a cap stays a cap |
| rhoVector | the unit vector along the azimuth at a direction, the second vector of the polar basis |
| rotationalDiscrepancy | the discrepancy between two measures on SO(3), densities or weighted orientation sets in any pairing: D_2, D_ball or a bandlimited L2 norm |
| SantaFe | the Santa Fe sample ODF (MATLAB SantaFe): cubic crystal and orthorhombic specimen symmetry, a uniform portion of 0.73 and a von Mises Fisher component of 10 degree halfwidth at (122)[221] carrying the other 0.27 |
| selectHalfwidth | Select the angular halfwidth of a de la Vallee Poussin kernel for density estimation |
| silvermanWidth | choose a Gaussian smoothing width from the spread and size of a numeric sample |
| sphericalDiscrepancy | the discrepancy between two measures on the sphere, densities or weighted point sets in any pairing: D_2, D_cap or a bandlimited L2 norm |
| sphericalPlan | the plan for a node set on the sphere: the FFT on a Clenshaw-Curtis grid, the NUFFT otherwise |
| sphericalSeries | the spherical harmonic series fhat at directions or on a quadrature grid, the trigonometric sum or the NUFFT by the number of nodes |
| sphericalSeriesAdjoint | the spherical coefficients up to bandwidth L from weighted values at directions, the direct sum below 50 nodes |
| sphericalTransform | the Fourier array G[m, j] of spherical coefficients of bandwidth L, so that f(theta, rho) is the sum of G e^{i(m rho - j theta)} |
| sphericalTransformAdjoint | the adjoint: fhat_l^m = sqrt((2l+1)/4pi) i^m sum_j d_l^{jm} d_l^{j0} h[m, -j] for h[m, j] = sum_q w_q v_q e^{-i(m rho_q - j theta_q)} |
| sphericalY | MTEX’s spherical harmonics, Y_l^{-m} = conj(Y_l^m) without the Condon-Shortley phase: the basis the public coefficients fhat are taken in |
| summationMatrix | the values of the kernels at the centres at the nodes, rows the nodes, columns the centres |
| supportCosine | the cosine of the half angle beyond which the kernel stays below tol of its peak, in closed form for the families with one and found by a scan otherwise |
| textureIndex | the texture index of a function on SO(3) or on the sphere, the squared L2 norm of its harmonic expansion |
| thetaVector | the unit vectors of the polar coordinates at a direction: along the polar angle and along the azimuth |
| transformODF | the child texture of a parent texture, the transformation texture |
| uniformODF | the uniform ODF, constant one, between a crystal and a specimen frame |
| unimodalODF | a unimodal ODF, radially symmetric about a modal orientation, its shape a kernel on SO(3) |
| usableFolds | the z folds a NUFFT array of bandwidth L can carry, (1, 1) when a folded axis would be too thin |
| volume | the share of orientations within a radius of a centre: the integral of f over the ball, int_{angle(g, c) < r} f(g) dg, relative to the integral over all orientations |
| wigner3j | the Wigner 3j symbol of (j1 j2 j3 |
| WignerD | the Wigner-D matrices of rotations, or the Wigner-d matrices of a second Euler angle, of one degree or of all degrees up to a bandwidth |
| wignerd | the real Wigner-d matrix d_l(beta) at one angle, or with bandwidth=L the list d_0 . |
| wignerdDegrees | the Wigner-d matrices d_0(beta) . |
| wignerPlan | the plan for a node set: the NUFFT at arbitrary nodes, the FFT on a Clenshaw-Curtis grid, the NUFFT on the nodes of a grid whose polar rule is not equispaced |
| wignerSeries | the series at every rotation of a container or on a quadrature grid |
| wignerSeriesAdjoint | coefficients from weighted values: the adjoint sum below DIRECT_SUM_NODES nodes |
| wignerSeriesAdjointGridded | the SO(3) coefficients up to bandwidth L from weighted values, every rotation rounded to the nearest node of a Clenshaw-Curtis grid and the grid’s FFT adjoint taken, MATLAB’s ‘gridded’ |
| wignerTransform | the Wigner coefficient transform: the coefficients of a Wigner series as the Fourier array of the same function in the Euler angles |
| wignerTransformAdjoint | the adjoint of the Wigner coefficient transform: the Fourier array of weighted values back to Wigner coefficients |
Tensors
Classes
| ChristoffelTensor | the elastic Christoffel tensor for a wave propagation direction |
| complianceTensor | the elastic compliance S = inv(C), its Voigt matrix carrying the factors of the double convention |
| curvatureTensor | the lattice curvature tensor, the rank two tensor of the spatial derivatives of the orientation field |
| deformationGradientTensor | a deformation gradient tensor F, the rank two tensor carrying a line segment dX of the undeformed body into dx = F dX of the deformed one |
| dislocationDensityTensor | the dislocation density or Nye tensor, the rank two tensor derived from the curvature tensor of an orientation field |
| refractiveIndexTensor | the rank two symmetric refractive index tensor, whose anisotropy makes a crystal birefringent |
| SchmidTensor | SchmidTensor(n, b) of a plane normal and a slip direction, SchmidTensor(sS) of slip systems |
| spinTensor | spinTensor(M), or spinTensor(v) the skew matrix of a rotation vector, in its frame |
| stiffnessTensor | the elastic stiffness C, sigma = C : eps |
| strainRateTensor | a rank two symmetric strain rate tensor, the symmetric part of a velocity gradient, in the double convention of the Voigt notation |
| strainTensor | a rank two symmetric strain tensor, in the double convention of the Voigt notation |
| stressTensor | a rank two symmetric stress tensor, or a list of them |
| tensor | a tensor of rank R in a reference frame, or a list of them |
| velocityGradientTensor | a velocity gradient tensor L, the rank two tensor of the spatial derivatives of the velocity |
Functions
| antiSym | antiSym(T) is T.antiSym(): the antisymmetric part of a rank two tensor |
| checkSymmetry | whether the tensor is invariant under the group of its frame, T.checkSymmetry() |
| colon | the double contraction A : B, the last two indices of A against the first two of B, MATLAB’s A:B |
| directionalMagnitude | the magnitude of a tensor in the direction v, the tensor contracted with the unit direction on every index, T.directionalMagnitude(v) |
| doubleContract | the double contraction A : B, the last two indices of A against the first two of B, MATLAB’s A:B |
| dyad | the dyadic product of tensors or vectors, their outer product |
| eig | eig(T) is T.eig(): the eigenvalues in ascending order and the eigenvectors |
| EinsteinSum | the contraction of tensors, vectors, rotations or arrays over the indices they share |
| expm | expm(T) is T.expm(): the matrix exponential |
| Kelvin | convert tensor coefficients to orthonormal Kelvin (Mandel) notation |
| logm | logm(T) is T.logm(): the matrix logarithm |
| sqrtm | sqrtm(T) is T.sqrtm(): the matrix square root |
| svd | svd(T) is T.svd(): the singular value decomposition, u, s, v of a rank two tensor |
| sym | sym(T) is T.sym(): the symmetric part, the mean over the permutations of the indices |
| times | times(A, B) is A.times(B): the product of corresponding coefficients, MATLAB’s A .* B |
| trace | trace(T) is T.trace(): the trace of a rank two tensor, or of the Voigt matrix of a rank four |
| Voigt | convert tensor coefficients to compact Voigt notation |
EBSD Analysis
Classes
| EBSD | an EBSD map: positions, rotations and phase ids with the list of the phases’ frames and the properties of every measurement |
| EBSD3 | the measurements of a volume: positions, rotations and phase ids of voxels with the list of the phases’ frames and the properties of every measurement |
| grain2d | the grains of a map: a table of ids, phases, pixel counts, mean orientations and properties, with the boundary, the inner boundary and the polygon of every grain |
| grain3Boundary | polygonal faces separating neighbouring grains in a three-dimensional volume |
| grain3d | the grains of a volume as closed polyhedra, given by the incidence I_GF of grains and the faces of a grain3Boundary: what calcGrains returns for a volume, the counterpart of grain2d |
| grainBoundary | a list of line segments separating neighbouring grains in a two-dimensional map |
| mapImage | an image that knows where on the specimen it sits: a raster of values on a regular grid of an origin and two perpendicular steps |
| mapImageList | a list of mapImage, displayed as MATLAB’s table of a mapImage array |
| neper | the interface to Neper, the tessellation program, one per session with its settings: the geometry, the morphology, the iterations and the file path the tessellation is written to |
| pairShifts | the shifts one cross correlation pass measured between two images |
| parentGrainReconstructor | the state of a parent grain reconstruction: the map and the grains it starts from, the orientation relationship and the grains after every step taken |
| phaseList | the phases of a map, the frames its measurements can belong to, the not indexed frame first at index 0, so that a phase id is an index into the list |
| shape2d | one closed outline in the plane of a map, so that every parameter above is there for a curve that came from no segmentation, as the characteristic shape of a boundary and a projection function drawn as a shape are |
| simulateEBSD | a simulated map whose answer is known: a job holding the settings, the grid xdim, ydim and stepSize, the orientations ori0, the noise and the features, and the map EBSDsim at the current stage, which every verb rewrites |
| triplePointList | the triple points of a boundary: the vertices where three grains meet, each with its three grains, their phases, the three boundary segments and the angles between them |
| trueEbsd | the alignment of a sequence of images and EBSD maps of one area, most distorted first and the ground truth last, one unfitted spatial transform per hop |
| voteTable | MATLAB’s table of votes: a row per grain, parentId the best variants of the grain and prob, fit or count their value, sorted best first |
Functions
| calcGrains | the grains of a map, the pixels joined across every boundary the criterion keeps |
| calcTraces | the traces of subregions of a map or of sets of grains, the direction their lamellae run along |
| chainOrder | the decomposition of an edge list into maximal chains, each walked end to end: the permutation that brings the edges into walk order, and per edge whether the walk enters it at its first (1) or second (2) vertex |
| cleanUpPseudoSym | the map corrected for a pseudo symmetry of one phase, detected by the tortuosity of its boundaries |
| colorTriplet | a colour as an RGB triplet: a name of the order, or what matplotlib knows, or a triplet |
| decompose | the spatial decomposition of a map into one cell around every pixel, the cell complex calcGrains builds the grains from |
| edgeMap | the edge transform: how unlike its eight neighbours at padWidth pixels each pixel is, every channel contrast normalised over its 2nd to 98th percentile, a neighbour off the image differenced against zero |
| imboxfilt | a box filter of k pixels, or (rows, cols), odd: the window shrinks at the border and around a missing value, so a NaN padding neither spreads nor darkens the frame (MATLAB’s own, movmean down the columns and then along the rows) |
| majorityVote | the most frequent vote cast for every id |
| mclComponents | the components of a weighted graph by Markov clustering, MCL |
| mergeRuns | every surviving head swallows the run of segments before it, so the boundary stays connected and keeps its length up to the straightening of the dissolved corners |
| mustKeep | the heads a coarsening may not dissolve: the end of an open chain is a junction and stays where it is, a vertex where the pair of grains changes is a corner of both grain polygons even where only two segments meet there, and a protected vertex is one another boundary over the same vertices still walks over |
| neighbourBall | the offsets of the lattice reachable in that many steps over its stencil, or within a physical distance over as many steps as it takes to reach it |
| orientFaces | the grains with their faces turned consistently, the normals pointing out of every grain: the signs of I_GF and the sides of the boundary change, the corners do not |
| phaseColorNames | the colour of every phase of a list: the one its frame carries, else the next name of the order for an indexed phase, None for a not indexed one without a colour |
| polygonMoments | the moments of the polygon of every outline: the area, the first and the second moments about the origin, summed over its loops |
| rescale | the values of one or more images stretched to a common range |
| sharedVertices | the vertices both boundaries walk over: a vertex where an inner boundary ends on the outer one has degree two to either and would be dissolved, leaving the other hanging off a vertex its walk no longer reaches |
| triplePoints | the vertices where exactly three segments of three grains meet, with the grains, the segments and the angles the segments enclose |
| xcfShift | how far every part of one image moved against another, by phase correlation of tiles |
Helper folders
| Folder | Contents |
|---|---|
| Grain boundary criteria | Criteria used by calcGrains to decide which neighbouring measurements belong to one grain. |
| EBSD filters | Filters for smoothing orientation measurements while controlling how grain boundaries are treated. |
| Boundary filters | Filters and shared boundary networks for smoothing reconstructed grain boundaries. |
| Lattice and grid helpers | Lattices, measurement planes and grid variants used to locate and index measurements in maps and volumes. |
Analysis
Classes
| embedding | the isometric embedding of orientations into a Euclidean space: one matrix of components with a column per orientation, so that norm(e1 - e2) is a metric on the orientations modulo the crystal symmetry |
| embeddingSpec | the recipe of the embedding of a crystal frame: the identity image and the orthonormal basis of the space it moves in, built once per frame |
| MLSSolver | the modified least squares solver of the pole figure inversion, an ODF as a weighted sum of unimodal components fitted to scattered pole figure intensities |
| OptimalSampleResult | sampling result and convergence diagnostics from optimalSample |
| TaylorModel | the slip systems prepared for the Taylor solve: the distinct signed systems with their critical resolved shear stresses, the strain each shear produces and its spin |
| zeroRangeMethod | the zero range method of the pole figure inversion: where a pole figure vanishes, the ODF vanishes on every fibre through it |
Functions
| angularVelocityVector | return the angular velocity represented by the antisymmetric part of a velocity gradient |
| axisRatios | return signed differences between the principal values of a rank-two tensor |
| birefringence | the birefringence for light propagating along vprop, the difference of the two refractive indices, and the polarisation axes of the fast and the slow wave |
| bulkModulus | the bulk modulus of an isotropic polycrystal, the Voigt and Reuss bounds |
| calcCluster | the clusters of directions or orientations: one cluster id per element, counted from zero, and the centre of every cluster |
| calcGBND | the boundary normal distribution of a 3D boundary: the face normals in specimen coordinates weighted by area, with grains the normals in the crystal frame of the one phase, with moriRef the grain boundary character of the faces whose misorientation is near moriRef |
| calcGBNDKernel | the kernel of the inclination of a boundary plane about its trace, the one calcGBND convolves with |
| calcKearnsFactor | the Kearns factor, the mean squared alignment of a crystal direction with the specimen direction N |
| calcLankford | the Lankford coefficients, the R-values, of a sheet from its orientations or its ODF |
| calcODF | an ODF reconstructed from pole figure intensities by the modified least squares method, with ghost correction and, on request, the zero range method |
| calcODFIterative | an ODF reconstructed from pole figures by a ladder of kernel widths, from wide to the target, each step started from the last |
| calcShearStress | resolve a stress tensor on slip systems and identify the most highly stressed system |
| calcTaylor | the Taylor factor, the shears of the slip systems and the plastic spin of a strain the crystal accommodates by slip alone |
| calcTensor | the texture average of a single crystal tensor over an ODF, a list of orientations or a map |
| CauchyStrain | compute the small-strain approximation from a deformation gradient |
| classix | CLASSIX, fast and explainable clustering based on sorting: one cluster label per row of X, counted from zero |
| deviatoric | remove the isotropic part of a rank-two stress or strain tensor |
| deviatoricStrain | remove the isotropic part of a rank-two stress or strain tensor |
| deviatoricStress | remove the isotropic part of a rank-two stress or strain tensor |
| dislocationDensity | convert lattice curvature to the Nye dislocation density tensor |
| doEulerStep | the orientations or the density after unit time in n Euler steps under the rotation velocity field spin |
| double | the coordinates of the images of an embedding in their orthonormal basis, one row per orientation, e.double() |
| energyVector | the energy velocity of a lossless elastic plane wave, the vector C_ijkl p_j n_k p_l / (rho v) |
| equivalentStrain | compute the von Mises equivalent strain |
| equivalentStress | compute the von Mises equivalent stress |
| fitDislocationSystems | rho, factor = fitDislocationSystems(kappa, dS): the dislocation densities that account for the curvature with the least total line energy, one signed density per system, NaN where no combination of them reproduces it |
| GreenStrain | compute the Green–Lagrange finite strain of a deformation gradient |
| hashinShtrikmanBounds | the Hashin-Shtrikman bounds of the isotropic moduli, the tightest pair for a quasihomogeneous polycrystal: (lower=(K, G), upper=(K, G)), each the extreme estimate over the references whose residual is semidefinite, found on the boundary of that convex set by a golden section over the shear and a bisection over the bulk modulus |
| HashinShtrikmanModulus | the Hashin-Shtrikman estimate of the isotropic moduli of a polycrystal from a reference medium K0, G0, over arrays of references: the bulk and shear moduli, and the definiteness of C - C0 (1 where the estimate is a lower bound, -1 an upper one, 0 where it is neither and the moduli are NaN) |
| isotropicShearModulus | the isotropic shear modulus of a polycrystal, the Voigt, Reuss and Hill bounds |
| knnRadius | the median distance to the k-th nearest neighbour of a subsample, the radius CLASSIX suggests |
| linearCompressibility | the linear compressibility, the length change per pressure in the direction v, S_ijkk v_i v_j |
| linearProgram | the minimiser of a linear program in standard form, min c.x under A x = b, x >= 0 |
| linprogCentre | the solutions of many linear programs min c.x under A x = y, x >= 0 at once, each the analytic centre of its optimal face |
| maxStrain | return the largest absolute principal strain of each tensor |
| meanStress | compute the mean normal stress, trace(sigma) / 3 |
| octahedralStrain | compute octahedral shear and normal strain from Green–Lagrange strain |
| opticalAxis | the optical axes of a refractive index tensor, the directions along which the two refractive indices coincide and the birefringence vanishes |
| optimalSample | the sample of n nodes that reproduces a density best up to the bandwidth, on the sphere or the rotation group |
| PoissonRatio | the Poisson ratio of the tension direction x and the transverse direction y, minus the transverse over the longitudinal strain, -S_ijkl x_i x_j y_k y_l / S_mnop x_m x_n x_o x_p |
| refractiveIndex | the refractive index in the direction v, n_ij v_i v_j |
| rotationRate | the rotation rate of a velocity gradient, the length of its angular velocity vector |
| SchmidFactor | the Schmid factor of slip systems under a stress tensor or a uniaxial tension |
| setDouble | setDouble(e, d) is e.setDouble(d): the embedding with the coordinates d, one row per image |
| shearModulus | the shear modulus of the plane h and the shear direction u, 1 / (4 S_ijkl h_i u_j h_k u_l) |
| SO3FunSBF | the shear banding function of a slip system and a strain (rate) tensor: the closed form ODF of Schaeben that a single slip system produces under that strain, as a handle |
| spectralTransmission | the colour of white light passing a birefringent plate between a polariser and an analyser, as a thin section shows it under the microscope |
| spin | extract the antisymmetric spin tensor from a velocity gradient |
| spinTensorOf | the spin tensor of an axial vector v, the antisymmetric tensor W with W u = v x u |
| strainRate | extract the symmetric strain-rate tensor from a velocity gradient |
| velocity | the speeds of the three elastic plane waves in a direction and their polarisations, the eigenvalues and eigenvectors of the Christoffel tensor |
| volumeCompressibility | the volume change per pressure, S_iikk |
| vorticity | the vorticity of a velocity gradient, its rotation rate over the magnitude of its strain rate |
| YoungsModulus | Young’s modulus in the direction v, the reciprocal of S_ijkl v_i v_j v_k v_l |
Import and export
Classes
| EBSDFileInfo | metadata describing an EBSD file before its measurement arrays are imported |
Functions
| buildImportWizardScript | the Python script of an import as the import wizard sets it up: the file, the plotting convention, the correction of the Euler angles, the phases and a first plot |
| cifFiles | the names of the CIF files shipped with MTEX, sorted |
| cprintf | MATLAB’s cprintf(d, ‘-Lc’, labels, ‘-Lr’, rows): a matrix printed as a table, a vector as one row |
| DubnaGrid | the specimen grid of the Dubna goniometer: 19 rings five degrees apart, each ring of 72 azimuths five degrees apart, the last at 355 degree, starting where the instrument starts it |
| ebsdFiles | the EBSD files of a folder by their extension, sorted, a .crc beside its .cpr left out |
| export | write a map to the file the extension names |
| exportODF | export(odf, fname, …): the function on a grid, as its components, or as a VPSC sample |
| exportOrientation | orientations written to a text file, as a table of Euler angles or quaternions with further columns, or as a VPSC texture file |
| exportPoleFigure | write every pole figure of a data set to its own three column table |
| exportVector3d | write directions as a text table with a line of column names |
| h5Image | the pixels of a picture an EBSD file holds, by an entry of ebsd.meta[‘images’] |
| h5ImageIndex | the pictures a file holds, as an index and not as pixels: a vendor writes its electron images beside the map, and one Oxford file carries a dozen of three megapixels each, so what the map keeps is where they are and what shape they have |
| inspectEBSD | what an EBSD file says about itself, read from its header alone |
| isEBSDFile | whether a name is an EBSD file by its extension |
| loadCall | the one line load of a file, for the clipboard |
| loadCIF | the crystal frame a CIF file describes: its space group, cell and mineral |
| loadEBSD | the map a file holds, read by the loader its extension names |
| loadEBSD3 | the EBSD map of a volume read from a file, the voxel data of a DREAM.3D file, the LabDCT volume of an xnovo file, or a stack of 2D maps |
| loadGrains3d | the 3D grains read from a file, the surface mesh of a DREAM.3D file or the polyhedra of a 3D Neper tessellation |
| loadNeperTess | the parts of a Neper tessellation: the dimension, the vertices, the faces as polygons of vertex indices, the orientations, the crystal system, and the incidence of the polyhedra and the faces (3D) or the cell ids (2D) |
| loadODF | the ODF a file holds, the interface told by its content: a VPSC texture file or a generic table |
| loadOrientation | the orientations a text table holds, and the other columns it names |
| loadPHL | a Bruker phase list: XML with one TEBSDExtPhaseEntry per phase, the space group by its number, the cell under Cell/Dim and Cell/Angles, the colour as r,g,b |
| loadPoleFigure | the pole figures a file holds, or the files of a list, read by their format |
| loadTensor | the tensor a text file holds: the last block of numeric rows, the density on the line after the word density, the crystal frame given positionally |
| loadVector3d | the directions a text table holds, read by the names of its coordinate columns, and the other columns it names |
| mtexCifPath | the directory of the CIF files shipped with MTEX, where crystalFrame.load looks up a name |
| mtexdata | the sample data of the documentation, read from the data repository |
| mtexdatafile | the file of a sample data set, or its files, fetched on first use |
| mtexDataPath | the directory the sample data are fetched into: the preference mtexDataPath, else the environment variable MTEX_DATA, else ~/.mtex/data |
| openDoc | a documentation page as a script to run section by section, or the reference page of a function in the browser |
| string2Miller | the Miller indices a file name or a header line spells: four digits with optional signs, else three |
Plotting
Classes
| lines3d | line segments (k, 2, 3), a colour per segment (k, 3) or one for all, their width |
| mapPlot | the map plot of one axes: the axes, the layout of the plane on the screen, the unit |
| mesh3d | polygons over vertices: V (n, 3), the faces as ptr/idx (face k is idx[ptr[k]:ptr[k+1]]), a colour per face (m, 3) in [0, 1] or one colour for all, the face and edge transparency |
| mtexFigure | a figure of MTEX plots: equally sized axes in a grid, with colour bars and legends that follow them |
| picture3d | a picture on a rectangle in space: RGBA (rows, cols, 4) in [0, 1] with its first row at the bottom, and the corners of the rectangle at the bottom left, the bottom right, the top left and the top right |
| planarColorKey | encode two scalar properties in one RGB colour |
| points3d | markers at positions (k, 3), a colour per marker (k, 3) or one for all, their size in points |
| scene3d | the items of a three dimensional plot and the plotting convention it is seen by |
| slices3d | three orthogonal slices of a voxel volume: the colours (nx, ny, nz, 3) in [0, 1], the voxels shown (nx, ny, nz), the centre of the first voxel, the steps of the three voxel axes as the rows of D, and the voxel index of each slice, None for a slice not shown |
| sphericalPlot | the spherical plot of one axes: its projection, boundary, grid and labels |
Functions
| annotate | annotate: markers on every axes of the current figure, black by default |
| annotateSection | annotate(ori) on a section plot: every orientation marked in the section it lies in |
| arrow3d | solid arrows in space, from the origin, or from anchor, to the tips v |
| arrows3d | arrows in space as the items of a scene3d, a line for the shaft and a cone for the head |
| axisAnglePoints | the orientations as points of axis angle space, each brought into the fundamental region of its frames first: axis times angle, in radians, shape (n, 3) |
| black2whiteColorMap | the black2white colour map, as MATLAB’s black2whiteColorMap returns it |
| blue2redColorMap | the blue2red colour map, as MATLAB’s blue2redColorMap returns it |
| boundaryMesh | the faces of a 3D grain boundary as a polygon mesh of a scene3d |
| boundaryPolyline | a boundary as one polyline, the chains in walk order separated by a NaN row |
| boundarySegments | the two vertices of every segment, shape (n, 2, 2) |
| circle | a circle on a spherical plot: the small circle of the opening angle about a direction, the great circle by default |
| contour | contour(sF), contour(v), contour(v, data): contour lines |
| contourf | contourf(sF), contourf(v), contourf(v, data): filled contours |
| contourLevels | n levels between the extremes, logarithmic on request: the levels of a contour plot |
| drawMatplotlib | the scene on matplotlib’s 3D axes, the faces sorted by depth as matplotlib does |
| dynamicMarkerSize | the size of the markers of a plot of n points |
| ellipse | an ellipse on the spherical plots of a figure, about a direction and turned as a rotation says |
| ellipsoids3d | ellipsoids as one polygon mesh of a scene3d |
| exportHTML | the scene of the current figure written as an interactive three.js page, which a browser rotates and zooms |
| faceColors | the colour of every face of every crystal shape, as plot(cS) paints them |
| frameAxes | the axes a frame names, as unit directions with their labels: X, Y, Z of a specimen frame, the lattice axes a, b, c of a crystal frame |
| frameOnScreen | the (right, up, towards the viewer) components of the axes of the frame in the picture of a map: the plane’s coordinates taken to the screen by the layout, and the normal towards the viewer, who looks from the other side of the plane when the layout flips it |
| gcm | the current mtexFigure, None before the first plot |
| gcs | the scene of the current axes of a figure, the 3D scene a plot of a volume, of 3D grains or of maps in several planes draws into |
| grainMesh | the faces of 3D grains as a polygon mesh of a scene3d, coloured by grain |
| grainPolygons | the loops of a grain as a list of rings, the outer one first, each (m, 2) |
| hasPyVista | whether PyVista can be imported, the renderer of the 3D scenes |
| histogram | histogram(grains), histogram(grains, prop, bins): the area weighted distribution of a grain property as one histogram per indexed phase, drawn over each other, or with grouped=True side by side (MATLAB’s hist) |
| hold | hold on: the next plot goes into the current axes |
| hsl2hsv | the HSV coordinates of colours given in HSL, as three arrays h, s, v |
| hsv2rgb | the RGB colours of HSV coordinates, three arrays of any common shape, as (…, 3) in [0, 1] |
| ind2color | the colour of the index i in MTEX’s colour order, counting from 0 (MATLAB counts from 1) |
| inversePoles | the inverse poles: the crystal directions that lie along the specimen direction r, over the distinct equivalents of r under the specimen group |
| is3dMap | whether x is a map of a volume: 3D grains, their boundary or an EBSD3 map |
| isLower | whether the region lies within the hemisphere into the screen of the convention pC |
| isUpper | whether the region lies within the hemisphere out of the screen of the convention pC |
| keyLegend | the inverse pole figure key of every indexed phase in a map, drawn in insets to the right of the map |
| keyResolution | the step a key of that many pixels is meshed at: about two pixels to a quad over a sector some ninety degrees across, never finer than a key drawn for a page nor coarser than the eye would catch |
| LaboTeXColorMap | the LaboTeX colour map, as MATLAB’s LaboTeXColorMap returns it |
| legend | a legend: of every artist a displayName named, or naming the curves of the current axes |
| line | a polyline in the coordinates of the current map, drawn under its layout, MATLAB’s line |
| logAxis | both axes of a plot logarithmic, a decade of the same length on either |
| mapAliases | the style keywords of a map plot, checked for their spelling |
| mapCells | the corners of every cell of a map, shape (n, m, 2), on the screen |
| mapExtent | the extent of what a map plot has to show, on the screen: (xlo, xhi, ylo, yhi) |
| mapLayout | the layout a convention asks for: the 2 x 2 matrix taking the in-plane coordinates of a map to the screen, east to the right and north up |
| mapPicture | the picture of two dimensional map plots on the rectangle of the plane they lie in, to be shown in a 3D scene |
| mapPoints | the measurements as points on the screen |
| mapRaster | the picture a map on a rigid lattice is drawn as: the rectangle its cells span and, for every pixel, the measurement whose cell covers it or -1 where none does, as an array of shape (ny, nx) with the first row at the bottom |
| mapValues | the value or the colour of every measurement or grain, and whether it is a value a colour map turns into colours: what a map plot draws, before it is drawn |
| maxAngles | the largest rotation angle inside the region about every axis of an (n, 3) array, zero where the axis lies outside the sector the region is cut down to: the bound dot(q, N_i) <= 0 at q = (cos(w/2), sin(w/2) v) reads tan(w/2) dot(v, a_i) <= tan(w_i/4) |
| millerLabel | a direction of a crystal frame as its rounded indices, the direct basis first and the reciprocal one if that does not round, in the brackets of one direction |
| mtexColorbar | a colour bar per axes of the current figure, or one when the ranges agree |
| mtexColorMap | the colour map of the current figure, or of one figure or axes |
| mtexTitle | a title over an axes |
| newMtexFigure | a new mtexFigure laid out for n axes, which becomes the current one |
| nextAxis | the axes the next plot goes into: the next of the current figure, or the one given by its number or its row and column |
| num2rgb | the colours a colour map gives those numbers, MATLAB’s num2rgb |
| pcolor | pcolor(sF), pcolor(v), pcolor(v, data): a coloured surface |
| phaseColor | the colour a phase is drawn in: the one its frame carries, else the next of MATLAB’s order for an indexed phase, white for a not indexed one without a colour |
| phaseLegend | the legend of the phases present in a map or grains, one patch per phase in its colour, a not indexed phase only when it was given a colour of its own |
| phasePalette | the colour of every phase of a list |
| plot | plot(x, …) draws x as its kind is drawn |
| plot3d | plot3d(v), plot3d(v, data), plot3d(sF), plot3d(vF), plot3d(oR), plot3d(ori), plot3d(odf) |
| plotAngleDistribution | the distribution of the misorientation angles: a histogram of a list of misorientations, a curve of a misorientation distribution function or of two random phases |
| plotAxisDistribution | the distribution of the misorientation axes, in the fundamental sector of the symmetry the two frames share |
| plotBoundary | the grain boundary segments, in one colour or coloured segment by segment |
| plotDiff | the difference between measured pole figures and recalculated ones, or two measurements, drawn as pole figures of the error |
| plotEBSD | a spatial EBSD map, coloured by phase, by a value, by orientation or by colours given |
| plotEllipse | ellipses drawn into the map that is held, one per centre |
| plotEllipsoid | ellipsoids with the half axes a, b, c about their centres, in a 3D scene |
| plotFibre | the ODF along the fibre f, as a line over the angle along the fibre |
| plotFibreSection | a fibre on the current section plot, as lines through the sections it passes |
| plotGrains | the grains of a map as polygons, coloured by phase, by a value or by orientation, with their boundaries on top |
| plotHKL | the low index directions <100>, <110>, <111> of a crystal with all their symmetric equivalents, labelled by their indices |
| plotInnerDirection | a crystal direction drawn as an arrow from the centre of a crystal shape to its surface |
| plotInnerFace | the section of a crystal shape by a lattice plane through its centre |
| plotIPF | inverse pole figures, one per specimen direction: of an ODF or of a list of orientations |
| plotKernel | a kernel on the sphere as a curve over the angle in degree, into the held axes or a new figure |
| plotKey | a colour key drawn as the colours it gives the directions of its sector, an inverse pole figure key as its direction key |
| plotKeySections | plot of an orientation colour key, its colours over the sections of orientation space |
| plotPF | pole figures, one per crystal direction: of an ODF, of a list of orientations or of a measured PoleFigure |
| plotPlane | planes in space drawn as polygons, each clipped by the bounds of the 3D axes |
| plotRegion | the outline of a spherical region on the charts of the current figure, or of a new one |
| plotRGB | three functions on the sphere drawn as the red, green and blue channels of one surface, their values clipped to [0, 1] |
| plotS2Grid | the regular grid of directions a spherical plot samples its chart at |
| plotSection | plotSection(odf), plotSection(odf, ‘sigma’), plotSection(ori, oS, sections=9) |
| plotSections | the empty charts of a section plot, one per section, with the reference field of every section |
| plotSector | the sector of the frame’s group an inverse pole figure shows, that of the Laue group for axes, turned as MATLAB draws it for 321 |
| plotSeismicVelocities | the overview of the seismic wave velocities of a stiffness tensor, six pole figures |
| plotSlipSystem | a slip system drawn inside a crystal shape: the slip plane through the centre with the slip direction as an arrow in it |
| plotSO3Kernel | plot(psi): the value of a kernel on SO(3) against the rotation angle, -180 to 180 degree |
| plotSpectrum | the Chebyshev coefficients of a kernel, or the harmonic power of a function, per degree |
| plotSymmetry | the elements of the point group of a frame drawn on the upper hemisphere, as the international tables draw them |
| plotTriplePoints | the triple points of a boundary network as circles, open or filled by a value |
| polarAxes | the polar axes a polar plot draws into |
| poles | the poles of orientations: every orientation applied to every distinct equivalent of the crystal direction h, and every image of those under the specimen group |
| pyvistaPlotter | a PyVista plotter drawing a 3D scene, its camera set by the plotting convention |
| quiver | arrows: tangent vectors at directions, a vector or axis field on the sphere, arrows at orientations in the sections of the current figure, or directions on a map or a volume |
| quiver3d | arrows in space: tangent vectors in orientation space, a field on the sphere or SO(3), or arrows at positions |
| quiverMap | arrows on a map: one per grain at its centroid, per measurement, or per boundary segment at its midpoint |
| quiverSection | arrows on a section plot: of a function on the sphere along one of its circles, or at orientations in the sections of orientation space |
| quiverSectionField | plot of a vector field on SO(3) as arrows in the sections of orientation space |
| red2blueColorMap | the red2blue colour map, as MATLAB’s red2blueColorMap returns it |
| regionLines | the parallels and meridians drawn on the surface, which is how a viewer reads its shape |
| regionSurface | the boundary of an orientation region in axis angle space: the sphere mesh pushed out to the largest angle about every axis, in radians, with the faces of the mesh |
| regionWalls | the walls of a region cut down to an axis sector: the plane of every boundary arc of the sector from the identity out to the surface, one polygon per arc |
| renderImage | the scene drawn offscreen by PyVista, as a picture |
| rgb2hsv | MATLAB rgb2hsv, hsv2rgb and hsl2hsv on arrays of shape (…, 3) or three arrays |
| rhoRange | the azimuth interval of a region: the whole circle when a pole lies inside, otherwise the complement of the widest gap between the azimuths of its boundary |
| saveFigure | the figure written to a graphics file cropped to its content |
| scaleBarOn | a scale bar in one corner of a map: a round length near a tenth of its width, written above the bar, and above it the axes of the specimen frame as they lie on the screen |
| scatter | directions or crystal directions drawn as markers on a spherical plot, coloured by data or labelled |
| scatter3d | directions as markers on the sphere in space |
| scatterXY | markers at the coordinates of the current map, MATLAB’s scatter of two coordinate lists |
| sceneHTML | the scene as a standalone HTML page that draws it with three.js in the browser, turned and zoomed with the mouse |
| setCamera | the 3D view of the current axes looking down how2plot.outOfScreen, with how2plot.north up |
| setColorRange | one colour range over every axes of the current figure (‘equal’), each its own (‘tight’) or the one given as (lo, hi) |
| setColorScale | logarithmic or linear colours on every plot of the figure |
| setView | a polar axes turned as the plotting convention says, a 3D axes looking down its out of screen direction |
| shapeOutlines | the shapes seen along the normal of a plane, as polygons on the screen: the vertices in the coordinates of the plane under the layout, for the front faces |
| shapesOnMap | one crystal shape per grain of the shape’s phase: rotated by the grain’s mean orientation, scaled by the square root of its area and put at its centroid, as one list of shapes over the grains that take it, whose indices come with it |
| show3d | the scene of the current figure in an interactive PyVista window, rotated and zoomed with the mouse |
| smallCircle | the circle of directions at an angle about a direction, closed |
| sphereGridLines | the small circles about the pole and the meridians, as polylines of directions |
| sphereMesh | the unit sphere as a mesh: rings of constant polar angle joined by quads split into triangles, fans at the poles, every triangle wound so that its normal points outwards |
| str2rgb | str2rgb(‘salmon’): the RGB triplet of a colour name, MATLAB tools/str2rgb |
| surf | a function on the sphere as a surface in space, the sphere pushed out to |f| and coloured by f |
| switchUnit | the same length in the unit that keeps its number between one and a thousand: the number, its unit and the factor it was multiplied by |
| text | text at directions on the sphere, at the measurements or grains of a map, or at a point of the current axes |
| triadGeometry | the reference frame indicator MTEX draws in the scale bar box, with the text height t as its unit: an arrow per axis that has a direction on screen, shortened by its tilt out of the plane, a circle for an axis leaving the plane with its label inside, crossed by four spokes when it points away from the viewer, and a label beside every arrow |
| vega20 | n colours of vega’s twenty categorical ones, repeated beyond twenty, an n x 3 array |
| visibleFaces | the faces a viewer along view sees: those whose outward normal points at the viewer, a mask over the faces, one row per shape of a list |
| volumeSlices | three orthogonal slices through the voxels of an EBSD volume as an item of a scene3d |
| white2blackColorMap | the white2black colour map, as MATLAB’s white2blackColorMap returns it |
| WhiteJetColorMap | the WhiteJet colour map, as MATLAB’s WhiteJetColorMap returns it |
| writeHTML | the scene written to a file as an interactive HTML page, that of sceneHTML |
| xlabel | a label under the current axes, which a spherical chart draws without axis lines, so matplotlib’s own label would not show |
| ylabel | a label left of an axes, written beside a spherical chart, which has no axis lines to carry matplotlib’s own label |
Helper folders
| Folder | Contents |
|---|---|
| Spherical projections | Projections that map directions on the sphere to plotting coordinates. |
| Directional colour keys | Colour keys that assign RGB colours to crystal or specimen directions. |
| Orientation colour keys | Inverse pole figure, Euler-angle, axis-angle and misorientation colour keys for orientation data. |
| Orientation sections | Section definitions for plotting orientation distribution functions at fixed Euler angles, directions or rotation parameters. |
| Orientation plots | Coordinate systems for displaying rotations and orientations in three dimensions. |
| Plot conventions and layout helpers | Plotting conventions, screen coordinates, scale bars and the layout machinery used by MTEX figures. |
Import wizard
Functions
| importWizard | the import wizard: a window that browses the files of a folder, shows what a file holds, lets the phases, the conventions and the reference frames be chosen and writes the Python of the import |
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/FunctionReference_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.