MTEX 7.0 xx/2026 - New Features
This is the first release that uses AI. This allowed us to implement many long lasting ideas.
Grain Reconstruction
Grain reconstruction has been entirely rewritten to give better results, be faster and be more easy to control. The general syntax is now
[grains, ebsd] = calcGrains(ebsd,'angle',10*degree,'minPixel',5,'alpha',3.1)and allows for three simple parameters to tune the reconstruction
- the misorientation threshold -
'angle' - the minimum number of pixels a grain must contain -
'minPixel' - the amount non / misindexed regions are reassigned to surrounding grains -
'alpha'
This is explained in detail in here and here. For highly deformed materials we greatly improved the Fast Multiscale Clustering method.
We have now also a method to clean up pseudo symmetries in EBSD maps using the command
[ebsd,grains] = cleanUpPseudoSym(ebsd,grains,mori,'threshold',1.5)Along with grain reconstruction we also greatly improved grain boundary smoothing which is now done with the command
grains = smoothBoundary(grains)The command smoothBoundary allows for several backends which are explained in detail here.
Much Better EBSD Import
Eventually we now have a full functional import wizard for EBSD maps that allows to scroll through your data files, adjust reference system alignment by inspecting ipf maps and pole figures. We put a lot of effort in getting all the different conventions right for all the formats on the market, i.e. from Bruker, EDAX, Oxford, and ThermoFisher. In this process we changed the default plotting convention to y↓→x, i.e. the current standard among all vendors. This default can be easily changed by
ebsd.how2plot = 'y↑→x';Additionally, we now support multiple data sets per file and allow to import all additional scans that might be present in your file.
Imported Data Comes on Its Grid
EBSD.load now returns an EBSDsquare or an EBSDhex whenever the measurements sit on one lattice, instead of a plain list that had to be gridifyed by hand. Almost every scan is a complete raster, so this is what you get for almost every file: the map is stored as a matrix, ebsd(i,j) addresses a scan position, and plotting and denoising no longer rebuild the raster on every call.
Data that would lose measurements by being gridded - two of them falling into the same lattice cell, or positions too irregular to span a raster - is never gridded and comes back as a list with a warning saying why. A plain list can also be asked for explicitly
ebsd = EBSD.load(fname,'noGrid') % this import
setMTEXpref('gridifyOnImport',false) % every importBoth representations are accepted everywhere, and EBSD(ebsd) and gridify convert between them at any time. Note that putting data on a grid reorders it - the matrix layout fixes the first dimension to y while a .ctf or .ang runs x fastest - so ebsd(k) is in general no longer line k of the file. The original ids are kept in ebsd.oldId. See Square and Hex Grids.
One syntax had to go for this: ebsd(x,y) used to be the measurement closest to the coordinate (x,y) on a list, while on a gridded map the very same expression is the pixel in row x and column y. Since almost every file now arrives gridded, that silent difference would decide itself by the data rather than by the script, so ebsd(x,y) is an error now. Ask for the coordinate by name
ebsd('xy',x,y) % the measurement closest to (x,y), grid or list
ebsd(i,j) % the pixel in row i and column j, gridded map onlyEBSD Analysis No Longer Needs a Grid
Computations that used to require gridify now work on any EBSD - a plain list, a phase subset, or a gridded map alike. This concerns the orientation gradient and everything built on it: curvature, calcGND and the gradient method of weightedBurgersVec.
kappa = curvature(ebsd) % no ebsd.gridify needed
gnd = calcGND(ebsd,dS)They are computed on the virtual lattice MTEX derives from the unit cell, so they also work for grids that are rotated or sheared with respect to the x/y axes, which the previous matrix based implementation could not do at all - ebsd.gradientX raised an error unless a grid direction happened to lie along an axis. calcGND additionally exists for hexagonal grids now; there simply was no hexagonal implementation before.
fill, smooth, interp and weightedBurgersVec keep the class and shape they were given. Previously fill and smooth turned a plain EBSD into an EBSDsquare, and weightedBurgersVec returned a result shaped like the grid rather than like the input.
Both grid classes now also accept a rotated grid. EBSDhex in particular no longer stores dHex and isRowAlignment - those could express only two orientations - but derives them, together with offset, dx and dy, from the unit cell and the pixel positions.
Corrections worth knowing
-
gradientXon a row aligned hexagonal grid divided bydHexwhere the neighbour distance issqrt(3)*dHex, so hexagonalcurvature,calcGNDand the gradient basedweightedBurgersVecwere wrong by a factor 1.732 in one column of the tensor. Values on hexagonal maps change accordingly; square grids are unaffected. -
gridifyof a rotated hexagonal map silently placed several measurements on the same cell and kept only the last - 5.2% of a titanium map rotated by 20 degree. It now places cells by their lattice index and keeps the measured positions exactly. -
calcGrains(...,'removeQuadruplePoints')merged the wrong boundary segments and destroyed real grain boundary - 0.21% of a forsterite map. -
export_angof a square grid failed in the header with an unrecognizeddx. It works again, and refuses a rotated grid, whose spacings the ang format cannot express. -
interp(ebsd,x,y)with row vectors returned an object whoselengthreported 1, and dropped query points when the source was a gridded map.
Much Faster Plotting of EBSD Maps
Plotting EBSD and grain maps is now orders of magnitude faster. It supports multiple backends that allow for fast plotting of hexagonal or strongly deformed pixel layouts. The micronbar has been largely improved to include also a small pictogram of the reference system.
Approximation, Sampling and Clustering
- the new classes S2FunMLS and SO3FunMLS approximate scattered data on the sphere and in orientation space by moving least squares
-
optimalSample(formerlycompactify) replaces random sampling by an almost perfectly equally distributed set of orientations or directions representing a given function. Asking for a second output optimizes the weights of the sampling points as well, which needs considerably fewer points for the same accuracy -
calcClusteruses by default the CLASSIX algorithm, which is much faster than hierarchical clustering and needs no number of clusters -
calcODFIterativeinverts pole figure data by iteratively adjusting the kernel width, which is much more robust for irregularly sampled data - planarColorKey encodes two scalar properties at once, the first one as hue, the second one as saturation
sF = S2FunMLS(nodes,values,'degree',3)
ori = optimalSample(odf,10000)
[ori,c] = optimalSample(odf,500) % optimize the weights, too
[c,center] = calcCluster(ori)
odf = calcODFIterative(pf,'halfwidth',5*degree)Rotations, Tangent Spaces and Vector Valued Functions
Two new pages describe the geometry MTEX is built upon. Rotation Representations compares Rodrigues, homochoric and cubochoric vectors and The Tangent Space the left and the right representation of a tangent vector. A SO3TangentVector now stores the rotation it is attached to, so switching between both representations needs no orientation passed along
t = odf.grad(ori); right(t) % t knows ori, no second argument neededWhat used to be a multivariate function is now a vector valued function and arrays of them are handled like any other MATLAB array.
MTEX 7.0 xx/2026 - Technical Changes
Grain Reconstruction
calcGrains covers small grain removal, alpha shapes and gridded as well as arbitrarily placed data in a single call. Its second output replaces the previous ebsd.grainId = ... assignment and marks pixels belonging to no grain - not indexed or removed by 'minPixel' - by grainId == 0. All boundary criteria are objects of type grainBoundaryCriterion (gbcAngle, gbcSoft, gbcFMC, gbcVariants, gbcCustom), so any per pixel property may be segmented and every phase may get a threshold of its own
grains = calcGrains(ebsd,'angle',{10*degree,15*degree}) % one per phase
grains = calcGrains(ebsd,gbcCustom(ebsd.bc,10)) % segment by band contrast
grains = calcGrains(ebsd,'soft') % a soft thresholdFast multiscale clustering gbcFMC - the criterion for deformed material where no single threshold angle works - has been rewritten. It judges two clusters by their misorientation against their own internal spread, fits a lattice curvature so that a bent grain is not mistaken for a scattered one, and clusters each phase separately, which lifts the adjusted Rand index on a benchmark of deformed maps from 0.84 to 0.96 at a third of the runtime. Note that calcGrains(ebsd,'fmc',cmaha) used to fall back to angle thresholding without saying so
grains = calcGrains(ebsd,'fmc',0.5,'minPixel',10,'verbose')The new data set mtexdata EMSphinx illustrates this in Grain Reconstruction. Advanced Grain Reconstruction shows how to write a criterion of your own, Markovian Clustering the second way of turning one into grains. Two new commands complete the picture
-
calcGBNDestimates the distribution of grain boundary normals, in specimen or in crystal coordinates, 2d and 3d -
cleanUpPseudoSymdetects grains split by pseudo symmetric indexing - by the tortuosity of the separating boundary - and reassigns the affected pixels
gbnd = calcGBND(grains.boundary('Fo','Fo'),ebsd('Fo'),'halfwidth',10*degree)
gbcd = calcGBND(gB,grains('Fo'),moriRef) % for a fixed misorientation
gbnd = calcGBND(grains3.boundary) % 3d, specimen coordinates
[ebsd,grains] = cleanUpPseudoSym(ebsd,grains,mori,'threshold',1.5)Grain Boundaries in Walk Order
The segments of a grainBoundary are not an unordered list anymore. They are sorted into chains - maximal runs of segments joined at vertices where exactly two segments meet - so that consecutive segments share a vertex. Any other vertex is a junction and terminates a chain. Each chain occupies a contiguous block of rows and is oriented such that the grain in gB.grainId(:,1) lies to the left of the walk direction
gB = grains.boundary
gB.chainId, gB.chainSize, gB.isChainStart, gB.isChainEnd, gB.isClosed
gB.arcLength, gB.chainLength % length along and of the chain
gB.chainV % vertex ids, chains separated by NaNThis is what allows to coarsen or to refine a boundary as a curve instead of as a bag of segments. All of the following keep the junctions exactly where they are, so which grains touch, and where, is unchanged
-
simplifyBoundary(grains,epsilon)drops every vertex whose removal moves the boundary by less thanepsilon- Douglas Peucker on each chain - which turns the pixel staircase into the straight line it approximates -
reduceBoundary(grains,n)is the blunt alternative, keeping every n-th vertex regardless of shape -
refineBoundary(grains,delta)resamples each chain at equal arc length instead of subdividing its segments, which only made the staircase finer -
isOuterBoundary(grains)tells which grains border the map, no longer obvious once an alpha shape has traced it
What used to be smooth(grains) is called smoothBoundary(grains) now - smooth on an EBSD denoises orientations, something entirely different - and it performs all three steps by default: simplify at d/sqrt(2), d the pixel spacing, which removes the grid and nothing else, refine, and only then the Laplacian smoothing it used to do on its own, which without the first two cuts the corners off a curve
grains = smoothBoundary(grains,5)
grains = smoothBoundary(grains,5,'noSimplify','noRefine') % as beforeThe old name still works and still does the old thing, so a script written against it keeps its grain areas and its segment count. Since the first two steps change the number of segments, switch them off wherever gB.ebsdId is read per segment.
Which algorithm smooths is a choice now, made by passing a boundaryFilter - the same pattern as the EBSDFilter of smooth(ebsd,F)
grains = smoothBoundary(grains,taubinFilter)
grains = smoothBoundary(grains,curvatureFilter('smoothingLength',3))
laplaceFilter is the default and unchanged, taubinFilter unshrinks after every pass where a Laplacian shrinks without bound, curvatureFilter replaces the iteration by a single sparse solve whose knob is a length rather than an iteration count, and huberFilter keeps a genuinely faceted boundary faceted. Advanced Grain Smoothing compares them.
EBSD Import
All HDF5 flavours are handled by one json driven interface loadEBSD_h5, so no format has to be guessed and a new vendor is a matter of a json description rather than of a new interface. The import wizard is started by import_wizard and exports the import as a script
ebsd = EBSD.load('data.h5') % no format guessing needed
ebsd = EBSD.load('data.h5','dataSet',2) % or 'dataSet','Area 2'
ebsd = EBSD.load('data.h5oina','dataSet','EBSD') % not the post processed data
ebsd = EBSD.load('data.h5','headerOnly') % phases, header and data sets
ebsd = EBSD.load('data.ctf','EulerCorrection',rotation.byEuler(pi,0,0))- a file holding several maps - EDAX areas, Oxford slices, EMSphInx scans - lists them on import and lets you pick one by
'dataSet', whose path is kept inebsd.opt.dataSet. Previously only the first one was imported, without a word - Oxford files may store the map as recorded and as cleaned up by the vendor software - both are offered as data sets of that file, the cleaned up one is imported by default and the recorded one by
'dataSet','EBSD' - reference frame corrections are unified across
ang,ctf,crcandh5files and stored inebsd.EulerCorrection - Oxford
h5oinafiles state the misalignment between the map and the Euler angle reference frame - AZtec shows the map in beam view but the orientations in camera view - asScanning Rotation Angle. MTEX now reads it instead of assuming it, as it still has to forctfandcrc. Orientations imported fromh5oinachange by that angle, usually 180 degree, and now agree with the same map imported from actf - the file header is kept in
ebsd.opt.headerand readable by'headerOnly'without importing the data at all, the SEM / PRIAS images an EDAX map comes with inebsd.opt.electron_image, as the Oxford electron images already were - faster import, automatic column and degree/radiant detection
The formats ang, osc, oh5 and edaxh5 may all hold the very same map, but were interpreted differently. They now agree on the alignment between Euler angle and map reference frame, on the crystal axes alignment used by EDAX - x parallel to a for triclinic, trigonal and hexagonal lattices, now available for any symmetry by the option 'EDAX' - and on the point group of the phases, where ang and osc used to report the Laue group 622 instead of 6/mmm and 432 instead of m-3m. As the setting is not stored in the file, the most common setting 2 is assumed instead of leaving the Euler angles uncorrected - state one of 'setting',1 to 'setting',4 yourself, or switch the correction off by 'setting',0
ebsd = EBSD.load('data.edaxh5','setting',3) % not the assumed setting 2
cs = crystalSymmetry('321',[4.9 4.9 5.4],'EDAX') % x // aPhases of Bruker files keep their International Tables number and atomic basis in cs.opt.spaceId and cs.opt.atoms. Fixed along the way: ang files whose header contains a stray carriage return - as written by some EDAX exports - silently lost their first data point.
Plotting EBSD Maps
EBSD and grain maps are drawn through three backends - imagesc, surf and patch. An axis aligned square grid goes to imagesc, any other square grid to surf, a hexagonal grid to patch, and inverse pole figure colors are precomputed via spherical lookup tables. Only patch draws one unit cell per pixel, which is what made large maps slow, so the routing may be overruled by 'backend' and the exact unit cells are still available by 'exact'
plot(ebsd,ebsd.orientations) % fast, the new default
plot(ebsd,ebsd.orientations,'exact') % exact unit cells, as before
plot(ebsd,ebsd.orientations,'backend','patch')The micron bar has been rewritten as a scaleBar object - it follows the plotting convention, rescales while zooming and takes options
plot(ebsd,'Location','nw','SBBackgroundColor','k','SBLineColor','w','Length',50)Reference Frame Annotations
On top of the micron bar a box indicates how the specimen reference frame is aligned on screen - an arrow for every axis with a component in the screen plane, a circled dot or cross for the one pointing out of or into it, exactly as in the string form of plottingConvention. It follows the data when the map is reoriented, e.g. by setView.
What used to be reserved to pole figures now happens on every spherical plot that is not given in crystal coordinates as well - the axes of the reference frame are annotated with the axes names of the frame the data lives in: X, Y, Z by default, X1, Y1, Z1 for the measurement frame of the instrument, RD, TD, ND once the rolling frame rules the session (see Named Reference Frames below). This includes vector3d and S2Fun plots, sigmaSections and pfSections, spherical densities as returned by calcGBND or calcDensity, and specimenSymmetry. Plots in crystal coordinates - Miller, inverse pole figures, ipfSections, color keys, single crystal tensors - keep their Miller indices at the vertices of the fundamental sector instead. Both are customized by the same pfAnnotations preference that pole figures always used, and switched off per plot or for the session
pfAnnotations = @(varargin) text([vector3d.X,vector3d.Y],{'RD','ND'},...
'BackgroundColor','w','tag','axesLabels',varargin{:});
setMTEXpref('pfAnnotations',pfAnnotations);plot(vector3d.rand(100),'noLabel')
plot(ebsd,ebsd.orientations,'refFrame','off')
setMTEXpref('showRefFrame','off')The Default Plotting Convention
The new default y↓→x is plottingConvention.ij - x to east, y to south and z into the screen - as SEM images are displayed and nearly every EBSD import states anyway. Pole figures are not affected, spherical plots align themselves with the hemisphere they show. A plottingConvention is stated as a string, each axis followed or preceded by the direction it points to on screen
ebsd.how2plot = 'y↑→x' % also 'x←↑y', 'z⊙→x', ASCII 'y^->x'Plotting conventions are carried by reference frames: data plotted the default way follows the session's default frame, hence changing the default convention also turns data imported before
plotx2east % turns all data
plottingConvention.default('y↑→x') % the same by a string
pC = plottingConvention.default; pC.east = yvector; pC.makeDefaultA convention assigned to a single object becomes an own reference frame of that object and stays untouched by later changes of the default.
Named Reference Frames
Behind the conventions sits a new class referenceFrame that answers "what coordinate system is this data expressed in". A frame carries an identity, named axes and the plotting convention its data is drawn in; crystalSymmetry and specimenSymmetry delegate their frame data (crystal axes, how2plot) to the frame they hold. Specimen frames come as named session instances
specimenFrame.specimen % the generic frame, axes X, Y, Z - the default
specimenFrame.measurement % the instrument frame, axes X1, Y1, Z1
specimenFrame.rolling % RD, TD, ND - RD north, TD west
specimenFrame.geological % N, E, Dand any of them can take over the session by
specimenFrame.rolling.makeDefaultafter which maps, pole figures and the micron bar annotate RD / TD / ND and plot in the rolling convention - no manual label definition needed. Every data class shows the frame it lives in at the top of its display, e.g. EBSD (Y1↓→X1) or PoleFigure (TD←RD↑); a crystal frame displays its alignment (Xa) and the resulting convention in crystal directions (⊙c→a).
Rotating data by an orientation now moves it from the crystal to the specimen frame (or back): the result adopts the new frame but never claims the orientation's symmetry, and mixing frames raises an error instead of silently producing numbers in an undefined coordinate system. Conventions loaded from .mat files are decided by the container: an EBSD or PoleFigure applies the convention its positions were saved with to the whole session, individual vectors keep theirs private. Scripted environments that run many independent jobs in one session can restore the pristine state by
referenceFrame.resetData without any symmetry can now state the frame it lives in: the trivial group carrying a frame is a first class citizen, obtained from a symmetry by cs.stripSym or directly from a frame by
crystalSymmetry(cF) % the trivial group on the crystal frame cF
specimenSymmetry(sF)Extrema and samples of a spherical function expressed in a crystal frame - for instance the deliberately unsymmetrised boundary normal distribution of calcGBND - therefore come back as Miller with proper crystal indices
[value,pos] = max(gbnd) % pos is a Miller nowAlong the same lines the compatibility checks behind orientation products and SO3Fun arithmetic compare the reference frames the coordinates are expressed in, rather than the symmetry groups: aligned crystal frames combine even when the groups differ, a compatible frame transition is absorbed automatically, and a wrong sided product - an orientation applied to data in specimen coordinates - is an error now instead of a warning.
Rotating a function drops a symmetry it destroys - now consistently
Rotating an SO3Fun or an SO3VectorField by a rotation which is not one of its own symmetry elements destroys that symmetry, so the group is dropped and only the reference frame kept. The twelve rotate methods implementing this had drifted into three different tests for "is there a symmetry to lose", and they disagree for every non centrosymmetric point group of order two - 2, m, -4 and friends. Concretely
cs = crystalSymmetry('2',[1 2 3],[90 100 90]*degree);
odf = unimodalODF(orientation.rand(cs));
rot = rotation.byAxisAngle(vector3d(1,2,3),37*degree);
odf = rotate(odf,rot,'right');warned and dropped the symmetry in SO3FunHarmonic, and silently kept the - by then false - claim of 2 symmetry in SO3FunComposition and the SO3VectorField classes. All of them now warn and drop, which is the correct behaviour: the rotated function really is no longer 2 symmetric. If you relied on the old silence, the symmetry was already wrong; a result that should keep its group has to be rotated by a symmetry element.
Orientation products follow the same rule
rot * ori acts in the specimen frame and so can only destroy the specimen symmetry; ori * rot acts in the crystal frame and destroys the crystal one. Both now drop the group and keep the frame, through the very same helper. Previously the product kept the group and merely warned, and the test for "is this a symmetry element" was a quaternion dot above 0.99 - which is a rotation angle of 16.2 degree, so any rotation up to sixteen degrees passed as a symmetry element and not even the warning fired.
This was visible in Detection of Sample Symmetry, which rotates a sample by 15.6 degree in order to destroy its orthotropic symmetry deliberately. The claim of 222 survived the rotation, the ODF estimated from those orientations was symmetrised with it, and centerSpecimen then had nothing left to find: it returned the identity, an error of the full 15.6 degree. It now recovers the rotation to 0.8 degree.
A plotting convention belongs to a reference frame
There are exactly three ways to say how something should be aligned on screen, and a plotting convention is now always a property of a reference frame rather than of a data object
plot(ebsd,'how2plot','y↑→x') % this one plot
plottingConvention.default('y↑→x') % the whole session
ebsd.frame = specimenFrame.rolling % move the data to a named frameThe first of these is new. Assigning a convention to the data itself, ebsd.how2plot = 'y↑→x', used to attach a private copy of the session frame to that one object - a frame that carried the session frame's name and axis labels, was indistinguishable from it in every display, and then silently stopped following it. how2plot is therefore read only on every class but referenceFrame, where the convention actually lives. Reading it is unchanged, and ebsd.frame = [] still means "follow the session again".
Importing data no longer changes how the session plots
A file describes its own data, not your screen. Loading an .mat file, and mtexdata, no longer repoint the session convention. An import may still state which frame the data lives in - Oxford data lands in specimenFrame.measurement with the axes X1, Y1, Z1 - and a convention you pass yourself still applies, since that is your choice and not the file's.
Documentation pages that want a particular alignment now say so, which they previously inherited invisibly from mtexdata.
This also applies to S2Fun.smiley, which used to carry its own convention so the face always read right - a page that shows it now declares plottingConvention.default('y↑→x') like any other.
Color Keys Say What They Are
Color keys used to display as MATLAB's dump of their properties, in which every interesting one read [1x1 crystalSymmetry]. They now show the pair of reference systems they map between in the header, the way an orientation does, and below it only the settings that distinguish them from a default key
ipfKey = ipfColorKey (Titanium (Alpha) → y↓→x)ipfDirection : (0,0,1) direction key: HSVDirectionKey
A directional color key additionally states which way round its colors run, written in the axes of its frame - ⊙c→a for a crystal key. That layout belongs to the frame of the symmetry and not to the session.
The property inversePoleFigureDirection is called ipfDirection now, and 'ipfDirection' works as a plot option beside the old spelling
plot(ebsd,ebsd.orientations,'ipfDirection',vector3d.X)The long name keeps working as an alias, so existing scripts are unaffected.
Approximation, Sampling and Clustering
Moving least squares approximation supports vector valued data, outlier detection, smoothly varying support radii and Voronoi weights, and planarColorKey turns any pair of scalar properties into a color
SO3F = SO3FunMLS(ori,values,'delta',5*degree,'detectOutliers')
cK = planarColorKey(winter,'colorModel','white');
rgb = cK.property2color(grains.longAxis,grains.aspectRatio);Tangent Spaces and Vector Valued Functions
A SO3TangentVector stores the symmetries along with the rotation it is attached to, and for SO3VectorFieldHarmonic the switch between the left and the right representation is performed directly on the harmonic coefficients. Arrays of vector valued functions support cat, reshape, permute, squeeze, transpose, indexing and assignment - which worked for SO3FunHarmonic only and now works for SO3FunHandle and SO3FunRBF as well. SO3VectorField comes with the arithmetic +,-,.*,./ together with dot and normSquare, and a SO3FunRBF draws its pole figures, inverse pole figures and sections directly instead of through a harmonic approximation.
Syntax Changes
-
ebsd.CSListis not a cell array anymore but an array of crystalSymmetry and notIndexed objects. In particular a not indexed phase can now carry a name and a color
ebsd.CSList(1) = notIndexed('amorphous',[0.5 0.5 0.5])- the constructors
quaternion,rotationandorientationonly accept the syntaxquaternion(a,b,c,d),orientation(a,b,c,d,CS,SS). Use the named constructorsvector3d.byPolar(theta,rho),orientation.byMatrix(M,cs), ... instead. Newly available arerotation.byHomochoric,rotation.id,rotation.nan,rotation.randandrotation.inversion - symmetries are compared on three levels -
cs1 == cs2checks for the same object,eqTol(cs1,cs2)for the same Laue group and axes, andsim(cs1,cs2)for the same lattice with possibly different alignment of x, y, z -
gB.Vreturns the two end points of every boundary segment, the plain list of all vertices isgB.allV -
multiplicitynow returns the number of symmetrically equivalent directions, fibres or misorientations - the multiplicity as the term is used crystallographically, e.g.multiplicity(Miller(1,0,0,cs))is 6 inm-3mand not 8. It used to return the reciprocal quantity, the number of symmetry operations fixing the input, which contradicted its own help line. The two multiply to the order of the group, so the old value isnumSym(cs) ./ multiplicity(m). This affects Miller, orientation and fibre alike
Renamed and Removed
-
smooth(grains)issmoothBoundary(grains)now, the old name forwards to the old behaviour and warns - the spherical Bingham distribution
BinghamS2has been renamed S2FunBingham and is fitted byS2FunBingham.fit(v) -
calcGBPDhas been superseded bycalcGBND - six EBSD interfaces have been retired to
obsolete/-loadEBSD_ACOM,loadEBSD_sor,loadEBSD_csvandloadEBSD_Oxfordcsvas they were unused,loadEBSD_hdf5andloadEBSD_h5oinaas they are covered byloadEBSD_h5 -
extern/kdeis calledkde1dnow as it used to shadow thekdeof recent MATLAB versions
Minor Additions
-
transform(ebsd,fun)andtransform(grains,fun)apply an arbitrary, not necessarily rigid, map to every position - to simulate an instrument distortion or to reproject a map -
ebsd.latticeis the one place that turnsebsd.unitCellandebsd.posinto a lattice basis and a per pixel integer index,ebsd.fixPosrepairs coordinates suffering from rounding,gridifytakes'rowMajor'and'columnMajor'as well as'unitCell'to interpolate onto another grid, and a hexagonal grid is addressed in cube coordinates byhex2cubeandcube2hex -
findon orientation, quaternion and vector3d returns the closest point, the k closest points or all points within an epsilon neighborhood, together with their distances -
sqrt,smoothandinvRadonon S2Fun, the new class S2FunGrid, and every S2Fun carries a symmetry, hence aCS, aSSand ahow2plot - screw dislocations of a dislocationSystem have proper Burgers vector lengths for hexagonal lattices
-
merge(grains,...,'maxPixel')takes the mean orientation of the largest grain involved instead of averaging -
doEulerStep(odf,vF,dt,'implicit')provides an implicit Euler scheme for texture evolution - new spherical Fourier transform based on the double Fourier sphere method,
NFSFTis the default, bandwidths beyond 1023 are supported - low level exponential and logarithm maps
expRight,logRighton SO(3) and S2, arithmetic+,-,.*,./for SO3Kernel and S2Kernel, derivatives of S1Fun - new class progressCounter for progress display,
crystalSymmetry.defaultfor fast default symmetries,colorcetperceptually uniform color maps and the flag'zero2white'for color ranges - use UTF8 to display (11̅0) instead of (1-10). Requires a suitable font like Julia Monospace.
Under the Hood
- a legend placed outside the axes is laid out by mtexFigure, not by MATLAB, which used to leave its distance to the plot depending on how many times the figure had been resized. The distance is
'legendSpacing', e.g.plot(cS,'colored','legendSpacing',30), orsetMTEXpref('legendSpacing',30) - an axes is shaped like the shadow its plot box casts on the screen, so that a crystalShape no longer sits in a much too wide axes
- markers are drawn as scatter objects throughout, which is faster than the patches used before and keeps marker transparency on
printandexportgraphics, where it used to be lost in every file format. Lines, i.e. the option'edgecolor', remain patches - the mex files are compiled for every platform on our continuous integration and attached to the release,
check_mexdownloads them from there and grain reconstruction falls back to a MATLAB Voronoi wherever a mex file is missing.mex_installreports which source failed to compile rather than failing quietly -
.matfiles written by MTEX 5.11 load again - the vertex list of a triplePointList and theCSListof a grainBoundary came back unusable -
ebsd('phaseName').orientationscarries the plotting convention of the map, and a specimenSymmetry displays the convention it holds -specimenSymmetry.defaultis where the session wide default lives
MTEX 6.1 10/2025
MTEX 6.1 does not come with major new features but with tons of speed ups and bug fixes. A lot of effort has been put into increasing the stability of the provided mex files. On startup MTEX automatically checks whether all mex files are installed. If not it attempts to download them from Github. If this fails as well, i.e. because your antivirus program intervenes, it tries to compile those mex files from source. The relevant commands are
-
check_mexchecks all mex files -
mex_installrecompiles all mex files, on Windows you need to install the free Addon MinGW compiler within Matlab
We will not list all speedups and minor improvements but only highlight which syntax has changed.
-
grains.grainSizehas been renamed tograins.numPixel - the plottingConvention is not now stored in
grains.how2plot,ebsd.how2plot, .... For more details look <here https://mtex-toolbox.github.io/AxesAlignment.html> -
how2plot.makeDefaultmake a plotting convention the default convention for all new data.
MTEX 6.0 10/2024
MTEX 6.0 is major release that includes numerous new features and internal changes.
Full 3d-Grains
With MTEX 6.0 three dimensional grain networks can be imported from Neper or Dream 3d and analyzed in a similar powerful way as you are used to do it with 2d grains. Have a look at 3d-grain operations and 3d-grain properties for more information.
Pseudo 3d EBSD and Grain maps
Additionally, all previous 2d-classes like EBSD, grain2d, grainBoundary are not longer restricted to the xy-plane. For example it is now possible to consider EBSD maps that represent the three faces of a cube. To make this possible, multiple changes at the core of MTEX had to be introduced:
-
ebsd.posgives the position of the EBSD measurements and is of type vector3d - many grain properties like vertices
grains.V, centroidgrains.centroidor long axisgrains.longAxisare now of type vector3d. -
ebsd.N,grains.Ngives the normal direction of a EBSD map - it is not possible to merge EBSD maps with different normal direction into one variable
Free three dimensional plotting of EBSD maps, pole figures, etc.
- Plotting of EBSD and grain maps is now possible in 3d
- The alignment of x, y and z on the screen is now controlled by an object of type plottingConvention. The code
how2plot = plottingConvention
how2plot.outOfScreen = ebsd.N
how2plot.east = yvector
plot(ebsd, how2plot)would plot an EBSD map with its normal direction out of the screen and the y-vector pointing to north. * A default plotting convention can be stored directly in the EBSD or grain variable via
ebsd.plottingConvention = how2plot- The plotting convention can also be passed to any spherical plot. This allows e.g. to plot pole figures with an arbitrary direction pointing out of the screen.
- As consequence
'upper'and'lower'refers to the outOFScreen direction.
Interface to Neper Neper is an open source software package for 3d polycrystal generation and meshing. It is now possible to call Neper from within MTEX, simulate micro-structures, generated slices through a 3d volume and import those slices into MTEX. Have a look at NeperInterface for more information.
Misc Changes
- new option
'minPixel'for the commandcalcGrainswhich allows to set a minimum grain size - ipf-sections are a novel way of representing the orientation space
-
grains(id).Vnow returns only the vertices of the respective grain -
dot(vF1,vF2)computes the inner product between two spherical vector fields. - the option
'FaceColor'now allows to colorize crystal shapes according to their orientation -
drawNow(gcm,'antiAliased')generates anti-aliased images -
transform2PolarReferenceFrametransforms ebsd data into a polar reference frame - support for area detectors in ODF reconstruction from pole figure data
- when computing parent EBSD data using
calcParentEBSDthe parent orientation will now be constant within the parent grains. In order to enforce the old behavior of a fixed OR but varying parent orientation use the new option'exactOR'. - new interface to files
- new function
stripStar*
MTEX 5.11.0 3/2024
MTEX 5.11 will be the last release before MTEX 6.0. It significantly improves grain reconstruction from 2d EBSD data.
Much Faster Grain Reconstruction
Thanks to using the jc_voronoi as tessellation method and some addition speedups grain reconstruction is now more than 10 times faster then previously. The method used for Voronoi tessellation is now specified in mtex_settings by the option 'VoronoiMethod'. You may want to set this option to 'qhull' if you experience problems with the 'jcvoronoi' engine.
Much Better Grain Reconstruction
With MTEX 5.11 MTEX uses alpha shapes to determine the shape of the grains in the presence of large unindexed regions. Those alpha shapes are controlled by a single parameter 'alpha' with specifies to which extend indexed regions are allowed to grow into not indexed regions. Have a look at grain reconstruction for an illustration of the new method.
Vector Fields in Orientation Space
Functionality of Vector Fields in Orientation Space has been greatly extended. It includes now functions to compute the divergence div(vF), the curl curl(vF) and the antiderivative of a vector field vF on orientation space. This new functionality can be used to efficiently model texture evolution by numerically solving the continuity equation as it is demonstrated for the single slip model. Crucial for this approach is the new command doEulerStep which updates an ODF or a list of orientation according to a vector field an orientation space which may be given e.g. by the Taylor model.
Lankford Parameter
The command calcLankford allows for the computation of the Lankford or R-value. A full discussion of the corresponding analysis can be found here.
Transformation ODF
The command variants(p2c,odfParent) takes now as a second input a parent ODF and return the child ODF under the assumption that all variants appear with the same frequency. This is in more detail explained in the section Transformation Texture.
Inner Planes in Crystal Shapes
Using the commands plotInnerFace, plot(cS,sS) and arrow3d it is now possible to plot internal lattice planes, directions or slip systems into the crystal shape. This is explained in more detail at Crystal Shapes.
Numerous minor improvements and bug fixes
- new command
transformReferenceFrame(odf,csNew)that allows to switch between different setups of the same symmetry, i.e. between 121 and 112. - improved h5 interface
- new function
cor(odf1,odf2)to compute the correlation between two ODFs. - new function
lineIntersectto compute the intersection between a line and a plane. - new class
S1Funto represent directional properties in the plane. - new function
volume(S2F,center,radii)to compute the volume of a spherical function within a ball. - replaces
CLimbysetColorRange -
calcParentEBSDcomputes also the variant and packet ids - many bug fixes
MTEX 5.10.1 9/2023
This is mainly a bug fix release.
MTEX 5.10.0 5/2023
Weighted Burgers Vector
With the function weightedBurgersVec(ebsd) it is now possible to compute the weighted burgers vector both, using the integral approach as well as the differential approach.
Bain Group Determination
The function calcVariantId now returns an id for the variant, the packet and the Bain group. The usage of this function is demonstrated here.
Numerous minor addon, speed improvements, bug fixes
- New option
'max'toangle(mori)to compute the largest misorientation angle. Helpful for identifying twinning. - Added checks for symmetry and positive definiteness when defining stress, strain and elasticity tensors.
- Add morphological filter
erode(ebsd)as a simple method for data cleaning in EBSD maps. - Pseudosymmetries like 532 are now natively supported using the syntax
crystalSymmetry('532') -
symmetrise(t,'iso')return the isotropic portion of a tensor -
symmetricDecompositioncomputes the symmetric decomposition of a tensor - normalize the Taylor factor according to the strain
- display boundary length as default output
- better import of h5 files
- many more fixes and speed improvements
MTEX 5.9.0 2/2023
Habit Plane Detection
MTEX 5.9 includes powerful functions for the determination of predominant habit planes and habit plane distributions. For the setting of a fully transformed microstructure the are described in the paper plane determination from reconstructed parent phase orientation maps. Those functions include
- new function
calcTraces(grains)andcalcTraces(ebsd)to compute habit plane traces from families of grains or EBSD data. - new function
calcGBND(traces,ori)to compute the grain boundary normal distribution from a list of habit plane traces and the corresponding grain orientations. - new function
characteristicShape(gB)to compute the characteristic shape from lists of grain boundaries
Orientation dependent functions
The orientation distribution function (ODF) describes the relative volume of crystal orientations within a material. As such it is a function that associates to each orientation a number with unit mrd (multiples of random distribution). However, in material science many other orientation depended functions are of importance, e.g., the Taylor factor with respect to some outer strain depends on the local orientation. While ODFs have ever since been at the heart of MTEX, this release is the first one that includes full support for orientation dependent functions. Those functions are called SO3Fun and behave similar to spherical functions S2Fun. In particular one can
- add, subtract, multiply and divide with them
- compare them
- detect global and local extrema
- visualize them in 3d and 2d sections
- compute gradients
While implementing these new features we also significantly speed up all operations related with ODF operations. A full documentation of these new features can be found here.
MTEX 5.8.2 11/2022
This is mainly a bug fix release. New functionalities include
-
fibre.fit(ori)andfibre.fit(odf)robustly finds fibers in data sets of individual orientations and ODFs. -
angle(f1,f2)computes the angle between two fibers. -
calcSymAxis(pf)allows to find rotational symmetries in pole figures or arbitrary spherical functions.
MTEX 5.8.0 01/2022
MTEX 5.8 improves further on parent grain reconstruction by implementing the novel variant graph algorithm which is faster and more accurate than the previous grain graph algorithm.
Improved parent grain reconstruction
Along with the new reconstruction algorithm the following new features have been implemented:
- manual interactive parent orientation selection using
selectInteractive(job) - new option
'reconsiderAll'in <parentGrainReconstructor.calcGBVotes.htmlcalcGBVotes(job)to recheck all assignments of parent orientations. - new option
'bestFit'in <parentGrainReconstructor.calcGBVotes.htmlcalcGBVotes(job)to consider only the best fitting neighbor -
job.votesis now a table which contains the parentId votes and the probabilities for all grains
Misc Changes
- new option
'region'forplot(ebsd)to plot only a rectangular subregion of the map
MTEX 5.7.0 05/2021
MTEX 5.7 improves on parent grain reconstruction. Changes include:
Improved parent grain reconstruction
- The ordering of the variants is stored within the OR misorientation
p2casp2c.variantMap. In particular the variants inp2c.variantsare ordered by default according to the Morito convention. This can be easily check by the commandround2Miller(p2c.variants) - The command
job.calcGBVotesandjob.calcTPVotescompute votes associated with probabilities that are stored injob.votesand can easily be analyzed. - The options
'noP2C'and'noC2C'have been replaced by'p2c'and'c2c'. - New option
job.useBoundaryMisorienationwhich makes the parent grain reconstructor to use the misorientations along the grain boundaries instead of the misorientations between the grain mean orientations. - added ShojiNishiyama orientation relationship.
Other Changes
- The command
findByOrientationaccepts a fiber as input. - The antipodal
axisAngleColorKeyallows for option'antipodal'.
MTEX 5.6.1 03/2021
This is mainly a bug fix release.
MTEX 5.6.0 01/2021
MTEX 5.6 greatly simplifies parent grain reconstruction by introducing the class parentGrainReconstructor. During the reconstruction procedure this class keeps track of the correspondence between measured child grains and the reconstructed parent grains. It provides the following functions for recovering parent orientations which can be applied multiple times and in any order to achieve the best possible reconstruction.
-
calcParent2Child- optimize parent to child orientation relationship -
calcGBVotes- compute votes from child/child and parent/child grain boundaries -
calcTPVotes- compute votes from child/child/child triple points -
job.calcParentFromVote- recover parent orientations from votes -
job.calcParentFromGraph- recover parent orientations from graph clustered -
job.mergeSimilar- merge similar parent grains -
job.mergeInclusions- merge inclusions -
job.revert- undo parent grain reconstructions
The usage of this new class is demonstrated in Beta Titanium Reconstruction and Parent Martensite Reconstruction.
Compatibility fixes
MTEX 5.6 fixes several incompatibilities with MATLAB versions earlier then 2019b.
MTEX 5.5.0 11/2020
Orientation Embedding
Orientational embeddings are tensorial representations of orientations with the specific property that each class of symmetrically equivalent orientations has a unique tensor representation. In contrast to the well known representation by Rodrigues vectors those embeddings do not suffer from boundary effects, i.e., the Euclidean distance between the tensors is always close to the misorientation angle. This allows to lift any method that works for multivariate data to orientations. More details of this representation can be found in the chapter orientation embeddings and the paper
- R. Hielscher, L. Lippert, Isometric Embeddings of Quotients of the Rotation Group Modulo Finite Symmetries, arXiv:2007.09664, 2020.
Low Angle Boundaries
With MTEX 5.5 we make low angle grain boundary analysis much more straight forward by allowing to pass to the command calcGrains two thresholds, i.e.,
grains = calcGrains(ebsd,'threshold',[10*degree 1*degree])generates grains bounded by high angle grain boundaries with a threshold of 10 degree and inner low angle boundaries with an threshold of 1 degree. The latter ones are stored as grains.innerBoundary. In order to estimate the density of inner boundaries per grain the commands subBoundaryLength and subBoundarySize have been introduced. The documentation page Subgrain Boundaries describes the analysis of low angle boundaries in more detail.
New Functionalities
- For single phase EBSD maps you can access the orientations now more easily by
ebsd.orientationsinstead ofebsd('indexed').orientations. Orientations corresponding to not indexed pixels will be returned as NaN and thus automatically ignored during any further computation. -
grains.isBoundarychecks grains to be boundary grains -
grains.isInclusionchecks grains to be inclusions -
merge(grains,'inclusions')merges inclusions into their hosts -
merge(grains,'threshold',delta)merges grains with a certain misorientation angle - interpolation of EBSD maps at arbitrary coordinates by the command
interpworks now for hexagonal grids as well. In particular this allows to remap EBSD data from hexagonal to square grids and vice versa. Have a look at the chapter Interpolation for more details. -
calcMis2Meancomputes the misorientation to a grain reference orientation, i.e., the grain reference orientation deviation (GROD). - KAM computation has been speed up significantly for hexagonal and square grids. Make sure to use the command
ebsd = ebsd.gridifybefore the KAM computation. - new option
'edgeAlpha'to control the transparency of grain boundaries, e.g. in dependency of the misorientation angle. - more easily add new / change phases in an EBSD map by one of the following commands
ebsd(ind).orientations = orientation.byEuler(0,0,0,CSNew)
ebsd(ind).CS = CSNew- new option to plot arrows in spherical plots by
plot([vector3d.Z, vector3d.Z + 0.5 * vector3d.rand],'arrow')-
export(ebsd,fileName)allows to export to EBSD data to.ang,.ctf,.crcand.hdf5files, thanks to Azdiar Gazder - new function
rot = fit(l,r)to compute the rotations that best rotates all the vectorslonto the vectorsr
-
orientation.loadandvector3d.loadallows now to import additional properties.
Important Bug Fixes
-
volume(odf)gave wrong results in the presence of specimen symmetry and for centers close to the boundary of the fundamental region.
-
slipSystem.symmetrisegave incorrect number of slipsystems due to a rounding error
MTEX 5.4.0 7/2020
Parent Grain Reconstruction
MTEX now includes a number of functions for variant analysis and to recover parent grain structure. Examples include beta phase reconstruction in Titanium and Martensite reconstruction from Austenite grains. The reconstruction is mainly build around the following new commands
-
calcParentcomputes the best fitting parent orientations from child orientations -
calcChildVariantsseparates child variants into packets -
calcParent2Childcomputes best fitting parent to child orientation relationship from child to child misorientations -
variantscomputes all parent or child variants
New Functionalities
- new function
ebsd.interpto interpolate EBSD maps at arbitrary x,y coordinates, example -
smoothBoundary(grains)keeps now triple points and outer boundary fixed by default - the field
grains.triplePoints.anglesreturns the angles between the boundaries at the triple points - new option
'removeQuadruplePoints'tocalcGrains - harmonic approximation of spherical functions respecting symmetry
-
export(ebsd,'fileName.ang')exports to .ang files -
neighbours(grains)now returns a list of pairs of neighboring grains -
grains.numNeighboursreturns the number of neighboring grains -
selectByGrainIdallows to select boundary segments by pairs of grains - new helper function
majorityVote - new option
'noAntipodal'for many commands likesymmetrise,unique,dot,angle - new predefined orientation relationship
orientation.Burgers
MTEX 5.3.1 6/2020
New Functions
- interp to interpolate EBSD maps
- grain properties longAxis, shortAxis
- grain boundary curvature
Bug Fixes
- loading ang files
- importing ODFs
- inverse pole figures misses orientations
- convex hull of grains has now correct boundaries
- Other Changes*
- vector3d/mean now returns not normalized vectors
- new flag
noAntipodalto suppress antipodal symmetry in calculations
MTEX 5.3.0 4/2020
MTEX 5.3 is a humble release without big shiny improvements. On the other hand is has seen some internal changes which lead to significant speed improvements in some functions. Technically speaking the class symmetry is not derived from rotation anymore but is a handle class. From the users perspective almost no change will be noticed. Developers should replace length(cs) by numSym(cs).
Much Better and Faster Halfquadratic Filter
Denoising of EBSD data using the halfQuadraticFilter is now about 10 times faster, handles outliers much better and runs native on hexagonal grids.
New Functions
-
plotWaveVelocitiesillustrates anisotropy of seismic waves -
grainMeangrain averages of arbitrary properties - shape functions
surfor,paror,caliper -
multiplicityfor Miller, orientation and fiber
MTEX 5.2.3 11/2019
- replaced
calcODF(ori)bycalcDensity(ori) - bug fix in ODF reconstruction from XRD data
- bug fix in EBSD export to ctf
- bug fix in grain reconstruction
- some more minor bug fixes
MTEX 5.2.0 10/2019
New Documentation
MTEX got a new homepage which was needed to include a much more exhaustive online documentation which has now
- a sidebar for quick navigation
- a search field
- a complete function reference to all MTEX functions and classes
- UML diagrams illustrating the hierarchy of the classes
- much more content
The new documentation is not yet perfect though we are working hard to improve it. That's why we are extremely happy for everybody who contributes additions to the documentation. This includes the correction of spelling errors, theoretical parts, examples etc. Check out how to contribute to the documentation.
More Colors
All plotting commands in MTEX support now much more colors. By default all the color names of the CSS palette can be chosen, e.g., aqua, orange, gold, goldenrod, etc. To see a full list of supported colors do
colornames_view
The following function have been included to handle colors more efficiently
Improved Import Wizard
Importing EBSD data using the import wizard allows to interactively realign the data and check with respect to the pole figures.
Speed Improvements
- much faster visualization of the large EBSD maps if
gridifyis used - faster Fourier transforms on the sphere and the orientation space
- support for <MOSEK https://docs.mosek.com/9.0/toolbox/install-interface.html> as faster replacement for linprog from the Optimization Toolbox
Support for hexagonal EBSD grids
The function gridify now works also for EBSD data measured on a hexagonal grid. As a consequence denoising and GND computation for those data is also on the way.
Plastic Deformations
MTEX 5.2. introduces a bunch of new tensor classes to make modelling of plastic deformations more straight forward.
The relationships between those tensors are explained in the section plastic deformations.
Spherical Bingham Distribution
Native support for spherical Bingham distributions, including the ability to fit them to directional distributions.
Tensors
- Improved methods for the visualization of elastic properties, see Seismic demo
- several new functions like
trace,svd,det, double dot product: - the function
meancomputes now Voigt, Reuss, Hill and geometric means
Improved Figure Layout
- fix layout
- plot at fixed positions
Misc Changes
- allow to export EBSD data to
.ctfthanks to Frank Niessen - compute the volume of a crystal shape
- label crystal faces in crystal shapes
- new function
stdfor computing the standard deviation of orientations - new function
calcKearnsFactor -
grainBoundary.ebsdIdis now the id and not the index of the EBSD data - allow to index ebsd data and grains by id using
{}brackets
ebsd{id}
grains{id}- new options to scatter
scatter(v,'numbered') % plot vectors with numbers
scatter(v,'MarkerFaceColor','none') % plot vectors with colored empty marksMTEX 5.1.0 04/2018
Dislocation systems
Starting with version 5.1 MTEX introduces a class representing dislocation systems. Dislocation systems may be lists of edge or screw dislocations and are either defined by its burgers and line vectors
cs = crystalSymmetry('432')
b = Miller(1,1,0,cs,'uvw')
l = Miller(1,-1,-2,cs,'uvw')
dS = dislocationSystem(b,l)by a family of slipsystems
sS = slipSystem.fcc(cs)
dS = dislocationSystem(sS)or as the family of predefined dominant dislocation systems by
dS = dislocationSystem.fcc(cs)More information how to calculate with dislocation systems can be found here.
Geometrically necessary dislocations
The newly introduced dislocation systems play an important role when computing geometrically necessary dislocations from EBSD data. The workflow is illustrate the script GND and consists of the following steps:
- define the dominant dislocation systems
- transform the dislocation systems into specimen coordinates for each pixel of the EBSD map
- compute the curvature tensor for each pixel in the EBSD map
- fit the dislocation systems to the curvature tensors.
- compute the total energy in each pixel
Tensor arithmetics
dyad, trace, det, mean, diag, eye, sym
Birefringence
MTEX 5.1 includes some basic methods to analyze and simulate optically isotropic materials. This includes the computation of the optical axis, birefringence and spectral transmission. The new features are demonstrated in BirefringenceDemo.
Color Keys
In MTEX 5.1 the color keys used for coloring EBSD have been a bit reorganised.
- separate classes for directional color keys. So far these classes are
HSVDirectionKey,HKLDirectionKey,TSLDirectionKey. This has become necessary as some orientation color keys depend directional color keys with different symmetry.
- new color key
axisAngleColorKeythat implements the coloring described in K. Thomsen, K. Mehnert, P. W. Trimby and A. Gholinia: Quaternion-based disorientation coloring of orientation maps, Ultramicroscopy, 2017. In central idea is to colorise the misorientation axis with respect to the specimen reference system.
- The existing color keys have been renamed for better consistency. The new names are
BungeColorKey,ipfHSVKey,ipfHKLKey,ipfTSLKey,ipfSpotKey,spotColorKey,PatalaColorKey
Spherical functions
- new function
discreteSampleto compute random samples from spherical density functions - new option to
symmetriseto symmetrise a spherical function with respect to an axis
Misc
- new function
fitEllipseto assign ellipses to grains - the functions
symmetrise(tensor)andsymmetrise(S2F)do support symmetrisation with respect to a certain axis. - the function
export(ori)allows to export arbitrary additional properties together with the Euler angles, e.g. the half axes and orientation of the grain ellipses - the function
loadOrientation_genericallows to import arbitrary additional properties together with the orientations, e.g., weights - new option
logarithmic - new function
gradto compute the gradient of and ODF at a certain orientation - explicitly set the number of rows and columns in a MTEXFigure plot with
- EBSD hdf5 interface works now for Bruker data as well
MTEX 5.0.0 03/2018
Replace all executables by two mex files
In MTEX many functionalities are based on the non equispaced fast Fourier transform (NFFT). Until now this dependency was kept under the hood, or more precisely, hidden in external executable files which often caused troubles on MAC systems. Starting with MTEX 5.0. all the executables have been replaced by two mex files provided by the NFFT package. This change (hopefully) comes with the following advantages
- better compatibility with MAC systems, no SIP disabled required
- increased performance, e.g., due to multi core support
- better maintainability, as all MTEX code is now Matlab code
- the pole figure to ODF inversion algorithm is now entirely implemented in Matlab making it simple to tweak it or add more sophisticated inversion algorithms
Spherical functions
Many functions in MTEX compute directional dependent properties, e.g. pole figures, inverse pole figures, wave velocities, density distribution of misorientation axis or boundary normals. Until now those functions took as an input an of vector of directions and gave as an output a corresponding vector of function values, e.g. the command
pfi = calcPDF(odf,Miller(1,0,0,odf.CS),r)returns for a list of specimen directions r the corresponding list of pole figure intensities pfi for the ODF odf. Starting with MTEX 5.0 it is possible to omit the list of specimen directions r or replace it by an empty list []. In this case the command
pdf = calcPDF(odf,Miller(1,0,0,odf.CS))returns a spherical function pdf also called pole density function. One can evaluate this spherical function using the command eval at the list of specimen directions r to obtain the pole figure intensities
pfi = pdf.eval(r)However, there are many more operations that can be performed on spherical functions:
% compute with spherical functions as with ordinary numbers
pdf3 = 5 * pdf1 + 3 * pdf2
pdf = max(pdf,0) % replace of negative entries by 0
pdf = abs(pdf) % take the absolute value
sum(pdf) % the integral of the pole figure
sum(pdf.^2) % the integral of the pole figure squares - also called pole figure index% plotting
plot(pdf)
plot3(pdf) % plot in 3d% detect maximum value
[value,pos] = max(pdf)% compute the eigen values and eigen vectors
[e,v] = eig(pdf)For a complete list of functions read here.
Symmetry aware spherical functions
Since most of the directional dependent properties obey additional symmetry properties the class S2FunHarmonic has been extended to respect symmetry in the class S2FunHarmonicSym.
Multivariate spherical functions, vector fields and spherical axis fields
In some cases it is useful that a spherical function gives not only one value for a certain direction but several values. This is equivalent to have concatenate several univariate spherical function to one multivariate function. This can be accomplished by
S2Fmulti = [S2F1,S2F2,S2F3]which gives a spherical function with 3 values per direction. More information how to work multivariate functions can be found here.
If we interpret the 3 values of S2Fmulti as \(x\), \(y\), and, \(z\) coordinate of a 3 dimensional vector, the function S2Fmulti can essentially be seen as a spherical vector field associating to each direction a three dimensional vector. The most important example of such a vector field is the gradient of a spherical function:
g = S2F1.gradThe resulting variable g is of type S2VectorField. A complete list of functions available for vector fields can be found here.
Another example for vector fields are polarisation directions pp, ps1, ps2 as computed by
[vp,vs1,vs2,pp,ps1,ps2] = velocity(C)The main difference is, that polarisation directions are antipodal, i.e. one can not distinguish between the polarisation direction d and -d. In MTEX we call vector fields with antipodal values are represented by variables of type AxisField.
Scalar tensor properties are returned as spherical functions
Any scalar or vectorial property of a tensor is not returned as a spherical function or spherical vector field. Examples are the velocity properties mentioned above, Youngs modulus, shear modulus, Poisson ration etc. In particular, plotting those directional dependent quantities is as simple as
plot(C.YoungsModulus)This makes the old syntax
plot(C,'plotType','YoungsModulus')obsolete. It is not supported anymore.
Crystal shapes
MTEX 5.0 introduces a new class crystalShape. This class allows to plot 3-dimensional representations of crystals on top of EBSD maps, pole figures and ODF sections. The syntax is as follows
% define the crystal symmetry
cs = loadCIF('quartz');% define the faces of the crystal
m = Miller({1,0,-1,0},cs); % hexagonal prism
r = Miller({1,0,-1,1},cs); % positive rhomboedron, usually bigger then z
z = Miller({0,1,-1,1},cs); % negative rhomboedron
s2 = Miller({1,1,-2,1},cs); % right tridiagonal bipyramid
x2 = Miller({5,1,-6,1},cs); % right positive Trapezohedron
N = [m,r,z,s2,x2];% define the crystal shape
habitus = 1.2; % determines the overall shape
extension = [1,1.2,1]; % determines the extension of the crystal in x,y,z direction
cS = crystalShape(N,habitus,extension);plot(cS)
plot(x,y,cS)
plot(grains,cS)
plot(ebsd,cS)
plotPDF(ori,ori*cS)ODF component analysis
MTEX 5.0 allows for decomposing ODF into components using the command calcComponents. In its simplest form
[mods,weights] = calcComponents(odf)returns a list of modal orientations mods and a list of weights which sum up to one. A more advanced call is
[modes, weights,centerId] = calcComponents(odf,'seed',oriList)which returns in centerId also for each orientation from oriList to which component it belongs.
Clustering of orientations
The ODF component analysis is used as the new default algorithm in calcCluster for orientations. The idea is to compute an ODF out of the orientations and call calcComponents with
[center,~,centerId] = calcComponents(odf,'seed',ori)Then center are the clusters center and centerId gives for each orientation to which cluster it belongs. Substantial in this method is the choice of the kernel halfwidth used for ODF computation. This can be adjusted by
[c,center] = calcCluster(ori,'halfwidth',2.5*degree)New tensor classes
With MTEX 5.0 we start introducing specific tensor classes. So far we included the following classes
more tensors are supposed to be included in the future. The central advantage is that tensor specific behaviour and functions can now better be implemented and documented, e.g., that the inverse of the compliance tensor is the stiffness tensor and vice versa. For user the important change is that e.g. the stiffness tensor is now defined by
C = stiffnessTensor(M,cs)instead of the depreciated syntax
C = tensor(M,cs,'name','elastic stiffness','unit','GPA')Improved spherical plotting
In MTEX 4.X it was not possible to display the upper and lower hemisphere in pole figure plots, inverse pole figure plots or ODF section plots. This was a server restriction as for certain symmetries both hemispheres do not have to coincide. In MTEX 5.0 this restriction has been overcome. MTEX automatically detects whether the upper and lower hemisphere are symmetrically equivalent and decides whether both hemispheres needs to be plotted. As in the previous version of MTEX this can be controlled by the options upper, lower and complete.
As a consequence the behaviour of MTEX figures have changed slightly. By default MTEX now always plots into the last axis. In order to annotate orientations or directions to all axes in a figure use the new option add2all.
plotIPDF(SantaFe,[xvector,yvector+zvector]) [~,ori] = max(SantaFe) plot(ori,'add2all')
We also introduced two new functions plotSection and quiverSection to visualize spherical functions restricted to a plane. As an example one can now plot the slowness surfaces of wave velocities in the plane perpendicular to Y with
plotSection(1./vp,vector3d.Y)see here for more information.
Other new functions
- odf.grad computes the gradient of an ODF at some orientation
- grain2d.hist can now plot histogram of arbitrary properties
-
fibreVolumeworks also for specimen symmetry - allow to change the length of the scaleBar in EBSD plots
MTEX 4.5.2 11/2017
This is mainly a bug fix release
- some more functions get tab completion for input arguments
- the option 'MarkerSize' can also be a vector to allow for varying Markersize
- new option 'noSymmetry' for plotPDF and plotSection
orientation relation ships
- new functions for computing variants and parents for a orientation relation ship *
- new predefined orientation relation ship
gT = GreningerTrojano(csAlpha,csGamma)
ori_children = ori_parent * inv(gT.variants)
ori_parents = ori_child * gT.parentsMTEX 4.5.1 08/2017
This is mainly a bug fix release
- some functions get tab completion for input arguments
- allow different colormaps in one figure
- updated interfaces
- added Levi Civita permutation tensor
- improved round2Miller
- grains.boundary('phase2','phase1') rearranges the misorientation to be from phase2 to phase 1
MTEX 4.5 03/2017
3d orientation plots
MTEX 4.5 supports plotting of orientations, fibres, and ODFs in 3d in various projections like
- Bunge Euler angles
- Rodrigues Frank space
- axis angles space
Misorientations
- MTEX introduces round2Miller which determines to an arbitrary misorientation
moritwo pairs of lower order Miller indices such that which are aligned bymori
- MTEX includes now some of the important misorientation relationships like
orientation.Bain(cs)
orientation.KurdjumovSachs(cs)
orientation.NishiyamaWassermann(cs)
orientation.Pitch(cs)Grain Reconstruction
New option to handle non convex other shapes of EBSD data sets
calcGrains(ebsd,'boundary','tight')- Grain boundary indexing* The commands gB('phase1','phase2').misorientation returns now always a misorientation from phase1 to phase2
Tensors
EBSD
Rotating, flipping of EBSD data is now done with respect to the center of the map. Previously all these operations where done relatively to the point (0,0). Use
rotate(ebsd,180*degree,'center',[0,0])to get back the behavior of previous versions.
Colorbar
MTEXColorbar allows now to have a title next to it. Use
mtexColorbar('Title','this is a title')Bug Fix This release contains several important bug fixes compare to MTEX 4.4.
MTEX 4.4 01/2017
Slip Systems
MTEX 4.4 introduces support for slip systems. Slip systems are defined by a plane normal and a slip direction
sSFCC = slipSystem(Miller(0,1,-1,cs,'uvw'),Miller(1,1,1,cs,'hkl'));Slip systems are instrumental for computing the following properties
Fibres
MTEX 4.4 adds support for fibres in orientation space. As an example the alpha fibre in cubic materials can be defined in the following ways
- as a predefined fibre
cs = crystalSymmetry('m-3m')
f = fibre.alpha(cs)- by a pair of directions
f = fibre(Miller(1,0,0,cs),vector3d.X)- by two orientations
ori1 = orientation('Miller',[0 0 1],[1 1 0],cs);
ori2 = orientation('Miller',[1 1 1],[1 1 0],cs);f = fibre(ori1,ori2)- by a list of orientations
f = fibre.fit([ori1,ori2,mean(ori1,ori2)])All commands that took a pair of directions to specify a fibre, e.g., fibreODF, fibreVolume, plotFibre have been rewritten to accept a fibre as a single input argument. I.e. a fibre ODF is now defined by
odf = fibreODF(fibre.alpha(cs))Up to now the following functions are implemented for fibres
- plot to Rodrigues space, Euler space, pole figures, inverse pole figures
oR = fundamentalRegion(cs,cs) f = fibre(oR.V(1),oR.V(2)) plot(oR) hold on plot(fibre,'color','r','linewidth',2) hold off
- compute the angle between orientation and fibre
angle(f,ori)Ignore Symmetry
Many functions support now the flag noSymmetry. Among them are angle, axis, dot, cunion.
Clustering of orientations
The new command calcCluster allows to cluster a given set of orientations into a given number of clusters.
% generate orientation clustered around 5 centers
cs = crystalSymmetry('m-3m');
center = orientation.rand(5,cs);
odf = unimodalODF(center,'halfwidth',5*degree)
ori = odf.calcOrientations(3000);% find the clusters and its centers
[c,centerRec] = cluster(ori,'numCluster',5);% visualize result
oR = fundamentalRegion(cs);
plot(oR)hold on
plot(ori.project2FundamentalRegion,c)
caxis([1,5])
plot(center.project2FundamentalRegion,'MarkerSize',10,'MarkerFaceColor','k','MarkerEdgeColor','k')
plot(centerRec.project2FundamentalRegion,'MarkerSize',10,'MarkerFaceColor','r','MarkerEdgeColor','k')
hold offMTEX 4.3.2 07/2016
Alignment of Miller plots
You can now specify the alignment of the crystal a-axis or b-axis in Miller plots by
plota2north, plota2east, plota2south, plota2west
plotb2north, plotb2east, plotb2south, plotb2westThis might also be specify in mtex_settings.m mtex_settings.
MTEX 4.3 - 03/2016
Alignment of Miller plots
Starting with MTEX 4.3 plots with respect to the crystal coordinate system, i.e., inverse pole figure plots, misorientation axis plot, ipf keys, are always aligned such that the b-axis points towards east. This follows the convention given in the International Table of Crystallography. The alignment can be adjusted using the option xAxisAlignment
plot(Miller(1,0,0,cs),'xAxisAlignment',30*degree)Plotting vector fields at grain centers or grain boundaries
There are three new commands
that allow visualizing directions for EBSD data, grains and at grain boundaries. The input argument dir should be a list of vector3d and may represent e.g. slip directions, polarization direction, etc.
EBSD data in raster format
Until MTEX 4.2 EBSD data have been always considered as a one-dimensional list of data, i.e., the often present structure of a regular grid was completely ignored. Starting with MTEX 4.3 EBSD data can be converted in a regular grid by
ebsd = ebsd.gridifyMissing data are represented as NaN in the regular representation. Gridified EBSD data may be addressed analogously like matrixes, i.e.,
ebsd(100,200)will give pixel 100 in the y-direction and 200 in the x-direction. Analogously.
ebsd(50:100,:)will give the stripe if pixels with y coordinate between 50 and 100.
Orientation gradients and GND
Gridified EBSD data allows also to compute orientation gradients by
ebsd.gradientX
ebsd.gradientYas well as an estimate of the geometrically necessary dislocation density (GND) using the command calcGND
ebsd.calcGNDAuxiliary new functionality
- grain2d.calcParis - Percentile Average Relative Indented Surface
- tensor.diag
- reduce works now also for EBSD data on Hex grids
MTEX 4.2 - 11/2015
MTEX 4.2 introduces basic functionality for triple junction analysis in grain maps.
Triple points
Triple points are automatically computed during grain reconstruction and can be accessed by
grains.triplePoints
grains.boundary.triplePointsMore details on how to work with triple points can be found here.
large EBSD data sets
Analyzing large EBSD data sets may be quite annoying due to memory consumption and slow plotting. As a work around MTEX includes a new function reduce which allows reducing the data set to each n-th pixel, i.e.,
ebsd_small = reduce(ebsd,2)contains only 25 percent of the data of the original data set. This functionality is assumed to be used for experimenting around with the data set and setting up a proper analysis script. The final analysis should, if possible, be done with the entire data set.
New option to ignore symmetry
When computing the angle between crystal directions, the misorientation angle between orientations and the misorientation axis symmetry can be ignored with the flag noSymmetry
angle(Miller(1,0,0,cs),Miller(0,1,0,cs),'noSymmetry')
angle(mori,'noSymmetry')
axis(mori,'noSymmetry')Axis distributions in specimen coordinates
In order to plot axis distributions in specimen coordinates, you can now do
[ori1,ori2] = calcMisorientation(ebsd('phaseName'))
plotAxisDistribution(ori1,ori2,'contourf')or
ori = ebsd(grains.boundary('indexed').ebsdId).orientations
plotAxisDistribution(ori(:,1),ori(:,2),'contourf')New option to work around Matlab opengl bug
In mtex_settings.m mtex_settings there is a new option that may help to work around the Matlab opengl bug. Switching it of may give nicer graphics.
setMTEXpref('openglBug',true)CSL misorientations
The function CSL requires now as a mandatory argument the crystal symmetry of the phase, i.e.
CSL(3,crystalSymmetry('m-3m'))Grain boundaries
Grain boundaries segments have a new option midPoint which may be used for attaching a vector displaying the misorientation axis or some other direction.
More ODF sections
- phi1
- Phi
- gamma
- omega
Along with the old syntax, there is now a new syntax that allows for more fine control of the ODF sections.
oS = phi2Sections(odf.CS,odf.SS)
oS.phi2 = [ 10*degree, 30*degree, 90*degree ];plot(odf,oS)Ordering of crystal symmetries
One can now check whether a crystal symmetry cs1 is a subgroup of crystal symmetry cs2 by
cs1 <= cs2Further, the largest proper subgroup of some crystal symmetry cs is now accessible by
cs.properSubGroup
MTEX 4.1 - 09/2015
MTEX 4.1 introduces new possibilities to the analysis of misorientations. For the first time, it covers all geometric aspects of misorientations between arbitrary crystal symmetries. Furthermore, MTEX 4.1 introduces filters to smooth EBSD data.
Smoothing of EBSD Data
Smoothing of EBSD data might be necessary if the orientation data are corrupted by noise which influences the estimation of orientation dependent properties like KAM or GND. The general syntax for smoothing EBSD data is
ebsd = smooth(ebsd)This applies the spline filter to the orientation data. Beside the spline filter, many other filters are available. A general discussion on this topic can be found here. To make use of a different than the default filter use the syntax
F = medianFilter
F.numNeighbours = 2 % this way options for the filter can be set
ebsd = smooth(ebsd,F)The command smooth can also be used to fill not indexed measurement points. This behavior is enabled by the option fill
ebsd = smooth(ebsd,F,'fill')Support for antipodal symmetry for misorientations
When working with boundary misorientations between the same phase one can not distinguish between a misorientation mori and its inverse |inv(mori). Starting with MTEX 4.1 this symmetry is supported for misorientations and misorientation distribution functions.
mori = inv(ori1) * ori2;
mori.antipodal = true;mdf = calcMDF(odf1,odf2,'antipodal')Antipodal symmetry effects the asymmetric region in orientation space as described below, as well as the distance between misorientations. Boundary misorientations between the same phase have set the flag antipodal by default.
Asymmetric regions in orientation space
MTEX 4.1 has now full support of asymmetric regions in orientation space. For any combination of crystal symmetries they can be defined by
oR = fundamentalRegion(cs1,cs2)and visualized by
plot(oR)One can check, whether an orientation is within the fundamental region by
oR.checkInside(ori)similarly as for a sphericalRegion. The fundamental region with antipodal symmetry is defined by.
oR = fundamentalRegion(cs1,cs2,'antipodal')For a fixed rotational angle omega, the intersection of the fundamental region with the sphere with radius omega gives the fundamental sector for the corresponding rotational axes. The axis sector can be computed by
sR = oR.axisSector(omega)Axis and angle distributions
Thanks to the implementation of the asymmetric region plotAxisDistribution and plotAngleDistribution works in MTEX 4.1 for any combination of crystal symmetries.
The following syntax is obsolete
plotAxisDistribution(grains.boundary('phase1','phase2'))
plotAngleDistribution(grains.boundary('phase1','phase2'))
plotAngleDistribution(ebsd)As replacement use the more verbose syntax
plotAxisDistribution(grains.boundary('phase1','phase2').misorientation)
plotAngleDistribution(grains.boundary('phase1','phase2').misorientation)mori = calcMisorientation(ebsd('phase1'),ebsd('phase2'))
plotAngleDistribution(mori)
plotAxisDistribution(mori)Rotational axis in specimen coordinates
It is now possible to compute the misorientation axis between two orientations in specimen coordinate system. This is done by
axis(ori1,ori2)To do so with random misorientations from an EBSD data set do
[ori1,ori2] = calcMisorientation(ebsd('phase1'),ebsd('phase2'))
plot(axis(ori1,ori2))Axis angle plots
(Mis)Orientation, ODFs, and MDFs can now be plotted in axis angles sections. Those plots respect the fundamental sector depending on the misorientation angle and for all combinations of crystal symmetries. The angle sections are scaled such that they represent the corresponding volume in orientation space. This can be switch off as described below
plotSection(mori,'axisAngle',55*degree)
plotSection(mdf,'axisAngle',(15:10:55)*degree)
plotSection(mdf,'axisAngle',(15:10:55)*degree,'volumeScaling',false)
plotSection(mdf,'axisAngle',(15:10:55)*degree,'antipodal')Replace plotODF by a plotSection
In most cases, you can replace plotODF by a|plot|. Only for misorientations, the default plot is scattered.
More default settings for EBSD maps and pole figure plots
- new MTEXpref to show/hide the micronbar in EBSD maps. The default is set in
mtex_settings.mtoon. The following command switches them off.
setMTEXpref('showMicronBar','off')- new MTEXpref to show/hide the coordinates in EBSD maps. The default is set in
mtex_settings.mtooff. The following command switches them on.
setMTEXpref('showCoordinates','off')- new MTEXpref to display coordinates in pole figure plot. The default is set in
mtex_settings.mto display the directionsXandY. The following command switches it toRDandND.
pfAnnotations = @(varargin) text([vector3d.X,vector3d.Y],{'RD','ND'},...
'BackgroundColor','w','tag','axesLabels',varargin{:});
setMTEXpref('pfAnnotations',pfAnnotations);Other improvements since MTEX 4.0.0
During the minor revisions of MTEX also several minor improvements have been added which are summarized below
- check for inclusions in grains: the following command returns a list of true/false depending whether a grain in
grainListis an inclusion inhostGrain
hostGrain.checkInside(grainList)- allow syntax
plot(odf,pf.h,'superposition',pf.c)- allow to show / hide the scale bar by the MTEX menu or by
[~,mP] = plot(ebsd)
mP.micronBar.visible = 'off'- allow to place labels above/below the marker by
plot(xvector,'label','RD','textAboveMarker')- new EBSD interface to ACOM Nanomegas *.ang files
- plot relative to the crystal coordinate system are now always aligned such that x points to the east and y points to north
- misorientation axis with respect to crystal and specimen reference frame
a = axis(o1,o2) % misorientation axis with respect to sample coordinate systema = axis(inv(o2)*o1) % misorientation axis with respect to crystal coordinate system- new function
intersectto compute intersections between grain boundary segments an a line
[x,y] = grains.boundary.intersect(xy1,xy2);- option for plotting angle distributions in percent
plotAngleDsitribution(mori,'percent')- reintroduced min/max in pole figure like plot
plot(pf,'minmax')- 3d plots of pole figures can now be simultaneously rotated
- you can now restrict an EBSD data set to a line to plot profiles
ebsd_prof = ebsd.spatialProfile(ebsd,some_line)- additional syntax to define a list if Miller indices
h = Miller({1,0,0},{1,1,1},{2,3,4},CS,'uvw')- interface to Bruker phl files
- new properties for grainBoundary
gB
gB.segmentLength % length of the corresponding connected segment
gB.isTwinning(mori,threshold) % check boundary for twinning- for a crystal symmetry
csyou can access a, b ,c and reciprocal axes by
cs.Aaxis
cs.AaxisRec- compute KAM with misorientation angle threshold or grain boundary threshold
MTEX 4.0.0 - 10/2014
MTEX 4 is a complete rewrite of the internal class system which was required to keep MTEX compatible with upcoming Matlab releases. Note that MTEX 3.5 will not work on Matlab versions later than 2014a. As a positive side effect, the syntax has been made more consistent and powerful. On the bad side MTEX 3.5. code will need some adaption to run on MTEX 4. There are two general principles to consider
Use dot indexing instead of getting and setting methods
The syntax
h = get(m,'h')
m = set(m,'h',h+1)is obsolete. set and get methods are not longer supported by any MTEX class. Instead use dot indexing
h = m.h
m.h = h + 1Note, that this syntax can be nested, i.e., one can write
ebsd('Forsterite').orientations.angleto get the rotational angle of all Forsterite orientations, or,
cs.axes(1).xto get the x coordinate of the first crystallographic coordinate axis - the a-axis. As a nice bonus, you can now use TAB completion to cycle through all possible properties and methods of a class.
Use camelCaseCommands instead of under_score_commands
Formerly, MTEX used different naming conventions for functions. Starting with MTEX 4.0 all function names consisting of several words, have the first word spelled with lowercase letters and the consecutive words starting with a capital letter. Most notable changes are * |plotPDF| * |plotIPDF| * |plotODF| * |calcError|
Grain boundaries are now directly accessible
MTEX 4.0 introduces a new type of variables called grainBoundary which allows to represent arbitrary grain boundaries and to work with them as with grains. The following lines give some examples. Much more is possible.
% select boundary from specific grains
grains.boundary% select boundary by phase transition
gB = grains.boundary('Forsterite','Enstatite')% select boundary by misorientation angle
gB(gB.misorientation.angle>100*degree)% compute misorientation angle distribution for specific grain boundaries
plotAngleDistribution(gB)Plotting EBSD, grain, grainBoundary data has different syntax
The syntax of the plot commands has made more consistent throughout MTEX. It is now
plot(obj,data)where obj is the object to be plotted, i.e., EBSD data, grains, grain boundaries, spherical vectors, pole figures, etc., and the data are either pure numbers or RGB values describing the color. Examples are
% plot MAD values of EBSD data
plot(ebsd,ebsd.mad)% colorize grains according to area
plot(grains,grains.area)% colorize grain boundary according to misorientation angle
gB = grains.boundary('Forsterite','Enstatite')
plot(gB,gB.misorientation.angle)Colorization according to phase or phase transition is the new default when calling plot without data argument, i.e., the following results in a phase plot
plot(ebsd)In order to colorize ebsd data according to orientations, one has first to define an orientationMapping by
oM = ipdfHSVOrientationMapping(ebsd('Forsterite'))Then one can use the command oM.orientation2color to compute RGB values for the orientations
plot(ebsd('Forsterite'),oM.orientation2color(ebsd('Forsterite').orientations))The orientation mapping can be visualized by
plot(oM)EBSD data are always spatially indexed
Starting with MTEX 4.0 EBSD data always have to have x and y coordinates. EBSD data without spatial coordinates are imported simply as orientations. As a consequence, all orientation related functionalities of EBSD data have been moved to orientations, i.e., you can not do anymore
plotpdf(ebsd('Fo'),Miller(1,0,0,CS))
calcODF(ebsd('Fo'))
volume((ebsd('Fo'))But instead you have to explicitly state that you operate on the orientations, i.e.
plotpdf(ebsd('Fo').orientations,Miller(1,0,0,ebsd('Fo').CS))
calcODF(ebsd('Fo').orientations)
volume((ebsd('Fo').orientations)This makes it more easy to apply the same functions to misorientations to grain mean orientations grains.meanOrientation, ebsd misorientation to mean mean |ebsd.mis2mean or boundary misorientations grains.boundary.misorientation
Different syntax for reconstructing grains from EBSD data
In MTEX 3.5 the command
grains = calcGrains(ebsd)duplicates the ebsd data into the grain variable allowing to access the EBSD data belonging to a specific grain by
get(grains(1),'EBSD')In MTEX 4.0 the command calcGrains returns as an additional output the list of grainIds that is associated with the EBSD data. When storing these grainIds directly inside the EBSD data, i.e., by
[grains,ebsd.grainId] calcGrains(ebsd)one can access the EBSD data belonging to a specific grain by the command
ebsd(grains(1))MTEX 4.0 distinguishes between crystal and specimen symmetry
In MTEX 4.0 two new variable types specimenSymmetry and crystalSymmetry have been introduced to distinguish clearly between these two types of symmetry. Calling
cs = symmetry('m-3m')
ss = symmetry('triclinic')is not allowed anymore! Please use instead
cs = crystalSymmetry('m-3m','mineral','phaseName')
ss = specimenSymmetry('triclinic')Pole figure indexing is now analogously to EBSD data
You can now index pole figure data by conditions in the same manner as EBSD data. E.g. the condition
condition = pf.r.theta < 80 * degreeis an index to all pole figure data with a polar angle smaller than 80 degree. To restrict the pole figure variable pf to the data write
pf_restricted = pf(condition)In the same manner, we can also remove all negative intensities
condition = pf.intensities < 0
pf(condition) = []In order to address individual pole figures within a array of pole figures pf use the syntax
pf('111')or
pf(Miller(1,1,1,cs))The old syntax
pf(1)for accessing the first pole figure will not work anymore as it now refers to the first pole figure measurement. The direct replacement for the above command is
pf({1})MTEX 4.0 supports all 32 point groups
In MTEX 4.0 it is for the first time possible to calculate with reflections and inversions. As a consequence, all 32 point groups are supported. This is particularly important when working with piezoelectric tensors and symmetries like 4mm. Moreover, MTEX distinguishes between the point groups 112, 121, 112 up to -3m1 and -31m.
Care should be taken, when using non-Laue groups for pole figure or EBSD data.
Support for three-digit notation for Miller indices of trigonal symmetries
MTEX 4.0 understands now uvw and UVTW notation for trigonal symmetries. The following two commands define the same crystallographic direction, namely the a1-axis
Miller(1,0,0,crystalSymmetry('-3m'),'uvw')Miller(2,-1,-1,0,crystalSymmetry('-3m'),'UVTW')Improved graphics
MTEX can now display colorbars next to pole figure, tensor or ODF plots and offers much more powerful options to customize the plots with titles, legends, etc.
Functionality that has been (temporarily) removed
This can be seen as a todo list.
- 3d EBSD data handling + 3d grains
- some grain functions like aspectRatio, equivalent diameter
- logarithmic scaling of plots
- 3d plot of ODFs
- some of the orientation color maps
- fibreVolume in the presence of specimen symmetry
- Dirichlet kernel
- patala colorcoding for some symmetry groups
- v.x = 0
- misorientation analysis is not yet complete
- some colormaps, e.g. blue2red switched
- histogram of volume fractions of CSL boundaries
- remove id from EBSD?
- changing the phase of a grain should change phases in the boundary
- KAM and GOSS may be improved
- write import wizard for orientations, vectors, tensors.
MTEX 3.5.0 - 12/2013
Misorientation colorcoding
- Patala colormap for misorientations
- publication: S. Patala, J. K. Mason, and C. A. Schuh, Improved representations of misorientation information for grain boundary, science, and engineering, Prog. Mater. Sci., vol. 57, no. 8, pp. 1383-1425, 2012.
- implementation: Oliver Johnson
- syntax:
plotBoundary(grains('Fo'),'property','misorientation','colorcoding','patala')Fast multiscale clustering (FMC) method for grain reconstruction
- grain reconstruction algorithm for highly deformed materials without sharp grain boundaries
- publication: C. McMahon, B. Soe, A. Loeb, A. Vemulkar, M. Ferry, L. Bassman, Boundary identification in EBSD data with a generalization of fast multiscale clustering, Ultramicroscopy, 2013, 133:16-25.
- implementation: Andrew Loeb
- syntax:
grains = calcGrains(ebsd,'FMC')Misc changes
- one can now access the grain id by
get(grains,'id')- the flags
'north'and'south'are obsolete and have been replaced by'upper'and'lower' - you can specify the outer boundary for grain reconstruction in non-convex EBSD data set by the option
'boundary'
poly = [ [x1,y1];[x2,y2];[xn,yn];[x1,y1] ]
grains = calcGrains(ebsd,'boundary',poly)- you can select a polygon interactively with the mouse using the command
poly = selectPolygonBug fixes
- .osc, .rw1 interfaces improved
- .ang, .ctf interfaces give a warning if called without one of the options
convertSpatial2EulerReferenceFrameorconvertEuler2SpatialReferenceFrame - fixed: entropy should never be imaginary
- removed function
SO3Grid/union - improved MTEX startup
- many other bug fixes
- MTEX-3.5.0 should be compatible with Matlab 2008a
MTEX 3.4.2 - 06/2013
bugfix release
- fixed some inverse pole figure color codings
- option south is working again in pole figure plots
- geometric mean in tensor averaging, thanks to Julian Mecklenburgh
- improved support of osc EBSD format
- tensor symmetry check error can be turned of and has a more detailed error message
- improved syntax for Miller Miller(x,y,z,'xyz',CS) Miller('polar',theta,rho,CS)
- ensure same marker size in EBSD pole figure plots
- allow plotting Schmid factor for grains and EBSD data
- allow to annotate Miller to AxisDistribution plots
- improved figure export
- allow for negative phase indices in EBSD data
- bug fix: https://code.google.com/p/mtex/issues/detail?id=115
- improved ODF fibre plot
MTEX 3.4.1 - 04/2013
bugfix release
- much improved graphics export to png and jpg files
- improved import wizard
- Miller(2,0,0) is now different from Miller(1,0,0)
- new EBSD interfaces h5, Bruker, Dream3d
- various speedups
- fix: startup error http://code.google.com/p/mtex/issues/detail?id=99
- fix: Rigaku csv interface
MTEX 3.4.0 - 03/2013
New plotting engine
MTEX 3.4 features a completely rewritten plotting engine. New features include
- The alignment of the axes in the plot is now described by the options
xAxisDirectionwhich can benorth,west,south, oreast, andzAxisDirectionwhich can beoutOfPlaneorintoPlane. Accordingly, there are now the commands
plotzOutOfPlane, plotzIntoPlane- The alignment of the axes can be changed interactively using the new MTEX menu which is located in the menubar of each figure.
- northern and southern hemisphere are now separate axes that can be stacked arbitrarily and are marked as north and south.
- Arbitrary plots can be combined in one figure. The syntax is
ax = subplot(2,2,1)
plot(ax,xvector)- One can now arbitrarily switch between scatter, contour and smooth plots for any data. E.g. instead of a scatter plot the following command generates now a filled contour plot
plotpdf(ebsd,Miller(1,0,0),'contourf')- obsolete options:
fliplr,flipud,gray,
Colormap handling
- User defined colormap can now be stored in the folder
colormaps, e.g. asred2blueColorMap.mand can set interactively from the MTEX menu or by the command
mtexColorMap red2blueODF
- The default ODF plot is now phi2 sections with plain projection and (0,0) being at the top left corner. This can be changed interactively in the new MTEX menu.
- The computation of more than one maximum is back. Use the command
[modes, values] = calcModes(odf,n)EBSD data
- MTEX is now aware about the inconsistent coordinate system used in CTF and HKL EBSD files for Euler angles and spatial coordinates. The user can now convert either the spatial coordinates or the Euler angles such that they become consistent. This can be easily done by the import wizard or via the commands
% convert spatial coordinates to Euler angle coordinate system
loadEBSD('filename','convertSpatial2EulerReferenceFrame')% convert Euler angles to spatial coordinate system
loadEBSD('filename','convertEuler2SpatialReferenceFrame')- It is now possible to store a color within the variable describing a certain mineral. This makes phase plots of EBSD data and grains more consistent and customizable.
CS = symmetry('cubic','mineral','Mg','color','red')- A better rule of thumb for the kernel width when computing an ODF from individual orientations via kernel density estimation.
- inpolygon can be called as
inpolygon(ebsd,[xmin ymin xmax ymax])Tensors
- new command to compute the Schmid tensor
R = SchmidTensor(m,n)- new command to compute Schmid factor and active slip system
[tauMax,mActive,nActive,tau,ind] = calcShearStress(stressTensor,m,n,'symmetrise')- it is now possible to define a tensor only by its relevant entries. Missing entries are filled such that the symmetry properties are satisfied.
- faster, more stable tensor implementation
- new syntax in tensor indexing to be compatible with other MTEX classes. For a 4 rank tensor
C, we have now
% extract entry 1,1,1,1 in tensor notation
C{1,1,1,1}% extract entry 1,1 in Voigt notation
C{1,1}- For a list of tensors
Cwe have
% extract the first tensor
C(1)Import / Export
- command to export orientations
export(ori,'fname')- command to import vector3d
v = loadVector3d('fname','ColumnNames',{'x','y','z'})
v = loadVector3d('fname','ColumnNames',{'latitude','longitude'})- new interface for DRex
- new interface for Rigaku
- new interface for Saclay
General
- improved installation / uninstallation
- new setting system
setpref('mtex','propertyName','propertyValue')has been replaced by
setMTEXpref('propertyName','propertyValue')MTEX 3.3.2 - 01/2013
bugfix release
- fix: better startup when using different MTEX versions
- fix: backport of the tensor fixes from MTEX 3.4
- fix: show normal colorbar in ebsd plot if scalar property is plotted
- fix: http://code.google.com/p/mtex/issues/detail?id=82
- fix: http://code.google.com/p/mtex/issues/detail?id=76
- fix: http://code.google.com/p/mtex/issues/detail?id=48
- fix: http://code.google.com/p/mtex/issues/detail?id=71
- fix: http://code.google.com/p/mtex/issues/detail?id=70
- fix: http://code.google.com/p/mtex/issues/detail?id=69
- fix: http://code.google.com/p/mtex/issues/detail?id=65
- fix: http://code.google.com/p/mtex/issues/detail?id=68
MTEX 3.3.1 - 07/2012
bugfix release
- fix: single/double convention get sometimes wrong with tensors
- fix: tensor checks did not respect rounding errors
- fix: ignorePhase default is now none
- fix: calcAngleDistribution works with ODF option
- fix: respect rounding errors when importing pole figures and ODFs
MTEX 3.3.0 - 06/2012
Grains: change of internal representation
Reimplementation of the whole grain part:
get(grains,'EBSD')- the grain selector tool for spatial grain plots was removed, nevertheless, grains still can be selected spatially.
- scripts using the old grain engine may not work properly, for more details of the functionalities and functioning of the @GrainSet please see the documentation.
- new functionalities: merge grains with certain boundary.
EBSD
The behavior of the 'ignorePhase' changed. Now it is called in general 'not indexed' and the not indexed data is imported generally. If the crystal symmetry of an EBSD phase is set to a string value, it will be treated as not indexed. e.g. mark the first phase as 'not indexed'
CS = {'not indexed',...
symmetry('cubic','mineral','Fe'),...
symmetry('cubic','mineral','Mg')};By default, calcGrains does also use the 'not Indexed' phase.
- create customized orientation colormaps
Other
- the command
set_mtex_optionis obsolete. Use the matlab commandsetMTEXpref(...)instead. Additionally, one can now see all options by the commandgetpref('mtex')
MTEX 3.2.3 - 03/2012
bugfix release
- allow zooming for multiplot objects again; change the z-order of axes
- symmetries allows now options a | | x additional to x | | a
- fix http://code.google.com/p/mtex/issues/detail?id=35
- fix http://code.google.com/p/mtex/issues/detail?id=38
- fix http://code.google.com/p/mtex/issues/detail?id=28
- fix export odf
MTEX 3.2.1 - 11/2011
New Features
- Import and Export to VPSC
- export EBSD data with all properties
- improved ODF calculation from pole figures by using quadrature weights for the pole figure grid
- implemented spherical Voronoi decomposition and computation of spherical quadrature weights
- plot odf-space in omega-sections, the i.e. generalization of sigma-sections
Bug Fixes
- S2Grid behaves more like vector3d
- vector3d/eq takes antipodal symmetry into account
- Euler angle conversion was sometimes wrong
- tensors multiplication was sometimes wrong
- rank 3 tensors get options 'doubleConvention' and 'singleConvention' for the conversion into the Voigt matrix representation
- documentation fixes
- Miller('[100]') gives not the correct result
- import wizard now generates correct CS definition
- import filter for uxd files should now work more reliable
MTEX 3.2 - 05/2011
3d EBSD Analysis
This release for the first time supports 3d EBSD data. In particular, MTEX is now able to
- import 3d EBSD data from stacked files
- visualize 3d EBSD data by plotting interactive slices through the specimen
- 3d grain detection
- the topology of 3d grains, i.e. boundaries, neighboring grains, etc.
Misorientation Analysis
- computation of the uncorrelated misorientation distribution (MDF) for one or two ODFs
- computation of the theoretical angle distribution of an ODF or MDF
- computation of the misorientation to mean for EBSD data
New Syntax for EBSD and grain variables
EBSD and grain variables can now be indexed by phase, region or grain / ebsd variables. Let us assume we have a two phase ebsd variable containing 'Fe' and 'Mg' then can restrict our dataset to the Fe - phase only by writing
ebsd('Fe')
The same works with grains and also with more than one phase. Please have a look into the documentation for information how to index ebsd and grain variables.
Accordingly the following syntax is now depreciated.
calcODF(ebsd,'phase',2)
It should be replaced by
calcODF(ebsd('Fe'))
Other Enhancements
- better import and export of pole figures, odfs and EBSD data
- automatic centering of a specimen with respect to its specimen symmetry
- download and import tensors from http://www.materialproperties.org/
- new interfaces for Rigaku, Siemens, Bruker and many other X-ray devices and formats
- support for rank three tensors, i.e, for piezo electricity tensors
- improved documentation
- many bug fixes
MTEX 3.1 - 03/2011
Tensor Arithmetics This release introduces tensor analysis into MTEX, this includes
- import of tensors via the import wizard
- basic tensor operations: multiplication, rotation, inversion
- advanced visualization
- computation of averaged tensors from EBSD data and ODFs
- computation of standard elasticity tensors like: Youngs modulus, linear compressibility, Christoffel tensor, elastic wave velocities
Other Enhancements
- support for different crystal reference frame conventions
- automatic conversion between different reference frames
- definition of crystal directions in direct and reciprocal space
- more predefines orientations: Cube, CubeND22, CubeND45, CubeRD, Goss, Copper, SR, Brass, PLage, QLage, ...
- improved EBSD and grain plots
- new and improved interfaces
- many bug fixes
MTEX 3.0 - 10/2010
Crystal Geometry
This release contains a completely redesigned crystal geometry engine which is thought to be much more intuitive and flexible. In particular, it introduces two new classes rotation and orientation which make it much easier to work with crystal orientations. Resulting features are
- no more need for quaternions
- support for Bunge, Roe, Matthies, Kocks, and Canova Euler angle convention
- a simple definition of fibres
- simply check whether two orientations are symmetrically equivalent
Other Enhancements
- automatic kernel selection in ODF estimation from EBSD data
- support for Bingham model ODFs
- estimation of Bingham parameters from EBSD data
- faster and more accurate EBSD simulation
- faster grain reconstruction
- improved documentation
- improved output
- MTEX is now compatible with NFFT 3.1.3
MTEX 2.0 - 10/2009
Grain Analysis for EBSD Data
MTEX is now able to partition spatial EBSD data into grains. This allows for the computation of various grain characteristics, as well as the computation and visualization of the grain boundaries and neighborhood relationships. Main features are:
- Grains statistics (area, diameter, mean orientation, ...)
- Misorientation analysis
- Interactive selection of grains by various criteria
- ODF-calculations for any subset of grains
- A large palette of plotting possibilities.
Visualization Improvements
- ODF fibre plot
- support for different x-axis alignment - plotx2north, plotx2east
- plot EBSD data with respect to arbitrary properties
- plot zero regions of ODFs and pole figures white
- pole figure contour plots
- color triangle for spatial EBSD plots
General Improvements
- ODF import / export
- rotate EBSD data
- Pole figure normalization
- improved interfaces and import wizard
- speed improvement of several side-functions as well as core-functions of @quaternions and spherical grids.
Incompatible Changes to Previous Versions
- The flags reduced and axial have been replaced by the flag antipodal
MTEX 1.2 - 05/2009
Improved EBSD import
- import-weighted EBSD (e.g. from odf modeling)
- new HKL and Chanel interfaces (.ang and .ctf files)
- import of multiple phases
- import of arbitrary properties as MAD, detection error, etc.
Improved EBSD plotting
- plot EBSD data in axis angle and Rodrigues space
- annotations in these spaces
- plot arbitrary properties as MAD, detection error, etc.
- better orientation colorcoding
- superpose odf, pole figure and EBSD plots
- better interpolation
General Improvements
- support for different crystal geometry setups
- faster and more accurate volume computation
- improved function modalorientation
- improved documentation
Incompatible Changes to Previous Versions
- The flag reduced has been replaced by the flag axial
MTEX 1.1 - 12/2008
Improved Import Wizard
- Load CIF files to specify crystal geometry
- Import EBSD data with coordinates
- More options to specify the alignment of the specimen coordinate system
- support for popla *.epf files, *.plf files, and *.nja files
Improved Pole Figure Analysis
- Background correction and defocusing
- Outlier detection and elimination
Improved EBSD Data Support
- Spatial plot of EBSD data
- Modify EBSD data in the same way as pole figures
Improved Plotting
- GUI to modify plots more easily
- Annotate orientations into pole figure plots
- Annotate orientations into ODF sections
- Coordinate systems for ODF and pole figure plots
- More flexible and consistent option system
- Default plotting options like FontSize, Margin, ...
- Speed improvements
Bug Fixes
- ModalOrientation works now much better
- Plot (0,0) coordinate in ODF plot at upper left
- Fixed a bug in ODF estimation from EBSD data
MTEX 1.0 - 06/2008
New Installer Including Binaries for Windows, Linux, and Max OSX
- MTEX ships now with an automated installer and binaries for Windows, Linux, and Mac OSX. This makes it in unnecessary to install any additional library and to compile the toolbox. (Thanks to F. Bachmann, C. Randau, and F. Wobbe)
New ODF Class
- The new function
FourierODFprovides an easy way to define ODFs via their Fourier coefficients. In particular, MTEX allows now to calculate with those ODFs in the same manner as with any other ODFs.
New Interfaces
- New PoleFigure interface for xrdml data (F. Bachmann)
Improved Plotting
- Plot EBSD data and continuous ODFs into one plot
- Miller indices and specimen directions can now be plotted directly into pole figures or inverse pole figures.
- New plotting option north, south for spherical plots
- Improved colorbar handling
- Spherical grids
- More spherical projections
Incompatible Changes With Previous Releases
- The flag hemisphere in S2Grid has been replaced by north, south, and antipodal making it more consistent with the plotting routine.
Improved Documentation
MTEX comes now with over 500 help pages explaining the mathematical concepts, the philosophy behind MTEX and the syntax and usage of all 300 functions available in MTEX. Furthermore, you find numerous examples and tutorials on ODF estimation, data import, calculation of texture characteristics, ODF and pole figure plotting, etc.
Bug Fixes
- Fixed zero range method
- Fixed automatic ghost correction
- Fixed some loadPoleFigure issues
- Many other bug fixes.
MTEX 0.4 - 04/2008
Speed Improvements
- ODF reconstruction and PDF calculation are about 10 times faster now (thanks to the new NFFT 4.0 library)
- ODF plotting and the calculation of volume fractions, the texture index, the
entropyand Fourier coefficients is about 100 times faster
New Support of EBSD Data Analysis
- Import EBSD data from arbitrary data formats.
- New class EBSD to store and manipulate with EBSD data.
- Plot pole figures and inverse pole figures from EBSD data.
- Recover ODFs from EBSD data via kernel density estimation.
- Estimate Fourier coefficients from EBSD data.
- Simulate EBSD data from ODFs.
- Export EBSD data.
New Functions
-
fibreVolumecalculates the volume fraction within a fibre. -
plotSpektraplots the Fourier coefficients of an ODF. -
setcolorrangeand the plotting option colorrange allow for consistent color coding for arbitrary plots. - A colorbar can be added to any plots.
-
mat2quatandquat2matconvert rotation matrices to quaternions and vice versa.
Incompatible Changes With Previous Releases
- New, more flexible syntax for the generation of S2Grids
- Slightly changed the syntax of
unimodalODFandfibreODF. - Default plotting options are set to {}, i.e. 'antipodal' has to add manually if desired
- Crystal symmetry triclinic is not called tricline anymore.
MTEX 0.3 - 10/2007
- new function
fourierto calculate the Fourier coefficients of an arbitrary ODF - new option
ghost correctionin function calcODF - new option
zero rangein function calcODF - new function loadEBSD to import EBSD data
- simplified syntax for the import of diffraction data
- new import wizard for pole figure data
- support of triclinic crystal symmetry with arbitrary angles between the axes
- default plotting options may now be specified in mtex_settings.m
- new plot option 3d for a three-dimensional spherical plot of pole figures
- contour levels may be specified explicitly in all plot functions plotodf, plotpdf and plotipdf
- new plot option logarithmic
- many bugfixes
MTEX 0.2 - 07/2007
- new functions texture index, entropy, volume
- greatly improved help
- improved installation
- new options for plotting routines for specific ODF sections
- many bugfixes
MTEX 0.1 - 03/2007
- initial release