EBSD Tutorial edit page

A quick guide on how to import and make basic plots with EBSD data in MTEX.

Data import

MTEX allows you to import EBSD from all big vendors of EBSD systems. Preferred data formats are text based data files like .ang, .ctf or open binary formats like .osc or .h5. Most conveniently, EBSD data may be imported using the import wizard, by typing

import_wizard;

or by the command EBSD.load

% load some test data packaged with your MTEX installation
fileName = [mtexDataPath filesep 'EBSD' filesep 'Forsterite.ctf'];
ebsd = EBSD.load(fileName,'EulerCorrection',rotation.id)
ebsd = EBSDsquare (Y1↓→X1, row↓→col)
 
 Phase  Orientations     Mineral         Color  Symmetry  Crystal reference frame
     0   58485 (24%)  notIndexed          none                                   
     1  152345 (62%)  Forsterite  LightSkyBlue       mmm                         
     2   26058 (11%)   Enstatite  DarkSeaGreen       mmm                         
     3   9064 (3.7%)    Diopside     Goldenrod     12/m1        X||a*, Y||b, Z||c
 
 Properties: bands, bc, bs, error, mad, oldId
 Scan unit : um
 X x Y x Z : [0 → 36550] x [0 → 16750] x [0 → 0]
 Normal vector: (0,0,1)
 Square grid  :336 x 732

This command outputs ebsd data stored in a single variable, called ebsd. This variable contains all relevant information, i.e., the spatial coordinates, the orientation information, a description of the crystal symmetries and all other parameters contained in the input data file.

Phase Plots

In this example, the output above shows that the data set contains three different phases: Forsterite, Enstatite, and Diopside. The spatial distribution of the different phases can be visualized by the plotting command

plot(ebsd,'refFrame','on')

When importing EBSD data it is important to check the alignment of the map coordinate system and the Euler angle coordinate system. This issue is exhaustively discussed in the topic Reference Frame Alignment.

Orientation Plots

Analyzing orientations of an EBSD map has to be done for each phase separately. The key syntax to restrict the data to a single phase is

ebsd('Forsterite')
ans = EBSD (Y1↓→X1)
 
 Phase   Orientations     Mineral         Color  Symmetry  Crystal reference frame
     1  152345 (100%)  Forsterite  LightSkyBlue       mmm                         
 
 Properties: bands, bc, bs, error, mad, oldId
 Scan unit : um
 X x Y x Z : [0 → 36550] x [0 → 16750] x [0 → 0]
 Normal vector: (0,0,1)

which allows us the access orientations of all Forsterite pixels with

ebsd('Forsterite').orientations
ans = orientation (Forsterite → Y1↓→X1)
  size: 152345 x 1

This syntax can be used to plot an ipf map of all Forsterite orientations

plot(ebsd('Forsterite'),ebsd('Forsterite').orientations,'micronbar','off')

Here the all Forsterite orientations a colored according to their alignment in a z inverse pole figure. A more complete discussion about how to colorize orientations can be found in the topic IPF Maps.

Grain reconstruction

MTEX contains sophisticated algorithms for reconstructing grains from EBSD data as described in the paper Grain detection from 2d and 3d EBSD data and the topic Grain Reconstruction. The syntax is

% reconstruct grains with a threshold angle of 10 degrees
grains = calcGrains(ebsd,'threshold',10*degree,'minPixel',5)

% smooth the grains to avoid the staircase effect
grains = smoothBoundary(grains,5);
grains = grain2d (Y1↓→X1)
 
 Phase  Grains  Pixels     Mineral  Symmetry         Color
     0       9     824  notIndexed                    none
     1     489  151493  Forsterite       mmm  LightSkyBlue
     2     208   25667   Enstatite       mmm  DarkSeaGreen
     3     167    7420    Diopside     12/m1     Goldenrod
 
 boundary segments: 35402 (1.7e+06 µm)
 inner boundary segments: 190 (8809 µm)
 triple points: 1514
 
 Properties: meanRotation, GOS

This creates a variable grains of type grain2d which contains the full geometric information about all grains and their boundaries. As the simplest application we may just plot the grain boundaries

% plot the grain boundaries on top of the ipf map
hold on
plot(grains.boundary,'lineWidth',2)
hold off

Crystal Shapes

In order to make the visualization of crystal orientations more intuitive MTEX supports crystal shapes. Those are polyhedrons computed to match the typical shape of ideal crystals. In order to overlay the EBSD map with crystal shapes oriented accordingly to the orientations of the grains we proceed as follows.

% define the crystal shape of Forsterite and store it in the variable cS
cS = crystalShape.olivine(ebsd('Forsterite').CS)

% select only Forsterite grains with more than 100 pixels
grains = grains('Forsterite',grains.numPixel > 100);

% plot crystal shapes at the positions of the Forsterite grains
hold on
plot(grains,0.7*cS,'colored')
hold off
cS = crystalShape
 mineral: Forsterite (mmm)
 vertices: 36
 faces: 20

Pole Figures

One of the most important tools for analyzing the orientations in an EBSD map are pole figure plots. Those answer the question of how selected crystal directions, here h, are aligned with respect to specimen directions

% the selected crystal directions
h = Miller({1,0,0},{0,1,0},{0,0,1},ebsd('Forsterite').CS);

% plot their distribution with respect to the specimen reference system
plotPDF(ebsd('Forsterite').orientations,h,'figSize','medium','contourf')

Inverse Pole Figures

Analogously one can ask for the crystal directions pointing in a selected specimen direction. The resulting plots are called inverse pole figures.

% select specimen directions
r = [vector3d.X,vector3d.Y,vector3d.Z];

% plot the distribution of the x, y, and z-Axis positions in crystal coordinates
plotIPDF(ebsd('Forsterite').orientations,r,'contour')

Citing this page. This page is part of the documentation of MTEX, a free and open source MATLAB toolbox for analyzing and modeling crystallographic textures. It was written by The MTEX Developers and is published at https://mtex-toolbox.github.io/EBSDTutorial.html. If you use MTEX, or reuse text or figures from this page, in your research, please cite

F. Bachmann, R. Hielscher, H. Schaeben: Texture Analysis with MTEX - Free and Open Source Software Toolbox, Solid State Phenomena 160 (2010), 63-68. 10.4028/www.scientific.net/SSP.160.63

BibTeX
@article{bachmann2010mtex,
  author  = {F. Bachmann and R. Hielscher and H. Schaeben},
  title   = {Texture Analysis with MTEX - Free and Open Source Software Toolbox},
  journal = {Solid State Phenomena},
  volume  = {160},
  pages   = {63-68},
  year    = {2010},
  doi     = {10.4028/www.scientific.net/SSP.160.63},
  url     = {https://doi.org/10.4028/www.scientific.net/SSP.160.63}
}

Other papers describing specific MTEX methods are listed under Publications — please cite the one that best fits your application. The MTEX source code is licensed under the GNU General Public License v2.0; the text and figures of this documentation are licensed under CC BY 4.0, which permits reuse — including by automated systems — provided The MTEX Developers and this page are credited.