Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfHielscher committed Oct 4, 2024
1 parent ca53650 commit 4aa695b
Showing 1 changed file with 58 additions and 21 deletions.
79 changes: 58 additions & 21 deletions pages/documentation_matlab/EBSDTutorial.html
Original file line number Diff line number Diff line change
@@ -1,31 +1,51 @@
---
title: EBSD Tutorial

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
---title: EBSD Tutorial
sidebar: documentation_sidebar
permalink: EBSDTutorial.html
folder: documentation
toc: false
---
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--
This HTML was auto-generated from MATLAB code.
To make changes, update the MATLAB code and republish this document.
--><title>EBSD Tutorial</title><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.source" content="script_EBSDTutorial.m"></head><body><font size="2"><a href="https://github.com/mtex-toolbox/mtex/blob/develop/doc/Tutorials/EBSDTutorial.m">
edit page</a></font><div><!--introduction--><p>A quick guide on how to import and make basic plots with EBSD data in MTEX.</p><!--/introduction--><h2 id="1">Data import</h2><p>MTEX allows you to import EBSD from all big vendors of EBSD systems. Prefered data formats are text based data files like <code class="language-plaintext highlighter-rouge">.ang</code>, <code class="language-plaintext highlighter-rouge">.ctf</code> or open binary formats like <code class="language-plaintext highlighter-rouge">.osc</code> or <code class="language-plaintext highlighter-rouge">.h5</code>. Most conveniently, EBSD data may be imported using the import wizard, by typing</p>
-->
<title>EBSD Tutorial</title>
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/">
<meta name="DC.source" content="script_EBSDTutorial.m">
</head>
<body>
<font size="2"><a href="https://github.com/mtex-toolbox/mtex/blob/develop/doc/Tutorials/EBSDTutorial.m">
edit page</a></font>
<div class="content">
<h1>EBSD Tutorial</h1>
<!--introduction-->
<p>A quick guide on how to import and make basic plots with EBSD data in MTEX.</p>
<!--/introduction-->
<h2 id="1">Data import</h2>
<p>MTEX allows you to import EBSD from all big vendors of EBSD systems. Prefered data formats are text based data files like <code class="language-plaintext highlighter-rouge">.ang</code>, <code class="language-plaintext highlighter-rouge">.ctf</code> or open binary formats like <code class="language-plaintext highlighter-rouge">.osc</code> or <code class="language-plaintext highlighter-rouge">.h5</code>. Most conveniently, EBSD data may be imported using the import wizard, by typing</p>
{% highlight matlab %}
import_wizard
{% endhighlight %}
<center>
{% include inline_image.html file="EBSDTutorial_01.png" %}
</center><p>or by the command <a href="EBSD.load.html">EBSD.load</a></p>
</center>
<p>or by the command <a href="EBSD.load.html">EBSD.load</a>
</p>
{% highlight matlab %}
%load some test data packaged with your MTEX installation
fileName = [mtexDataPath filesep 'EBSD' filesep 'Forsterite.ctf'];
ebsd = EBSD.load(fileName)
{% endhighlight %}

{% highlight plaintext %}
Warning: .ctf files have usualy inconsistent conventions for spatial
coordinates and Euler angles. You may want to use one of the options
'convertSpatial2EulerReferenceFrame' or
'convertEuler2SpatialReferenceFrame' to correct for this

ebsd = EBSD

Phase Orientations Mineral Color Symmetry Crystal reference frame
Expand All @@ -39,14 +59,19 @@
<strong>X x Y x Z</strong> : [0 36550] x [0 16750] x [0 0]
<strong>Normal vector</strong>: (0,0,1)
{% endhighlight %}
<p>This command outputs ebsd data stored in a single variable, called <code class="language-plaintext highlighter-rouge">ebsd</code>. 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.</p><h2 id="4">Phase Plots</h2><p>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</p>
<p>This command outputs ebsd data stored in a single variable, called <code class="language-plaintext highlighter-rouge">ebsd</code>. 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.</p>
<h2 id="4">Phase Plots</h2>
<p>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</p>
{% highlight matlab %}
plotx2east % this command tells MTEX to plot the x coordinates increasing to the east (left)
plot(ebsd,'coordinates','on')
{% endhighlight %}
<center>
{% include inline_image.html file="EBSDTutorial_02.png" %}
</center><p>When importing EBSD data it is critically important to align it correctly to a fixed reference frame. This issue is exhaustively discussed in the topic <a href="EBSDReferenceFrame.html">Reference Frame Alignment</a>.</p><h2 id="6">Orientation Plots</h2><p>Analyzing orientations of an EBSD map can be done only for each phase seperately. The key syntax to restrict the data to a single phase is</p>
</center>
<p>When importing EBSD data it is critically important to align it correctly to a fixed reference frame. This issue is exhaustively discussed in the topic <a href="EBSDReferenceFrame.html">Reference Frame Alignment</a>.</p>
<h2 id="6">Orientation Plots</h2>
<p>Analyzing orientations of an EBSD map can be done only for each phase separately. The key syntax to restrict the data to a single phase is</p>
{% highlight matlab %}
ebsd('Forsterite')
{% endhighlight %}
Expand Down Expand Up @@ -77,9 +102,12 @@
{% endhighlight %}
<center>
{% include inline_image.html file="EBSDTutorial_03.png" %}
</center><p>In this standard form a default color coding of the orientations is choosen. A more complete discussion about how to colorize orientations can be found in the topic <a href="EBSDIPFMap.html">IPF Maps</a>.</p><h2 id="10">Grain reconstruction</h2><p>MTEX contains a sophisticated algorithm for reconstructing the grain structure from EBSD data as described in the paper <a href="https://www.researchgate.net/publication/51806709_Grain_detection_from_2d_and_3d_EBSD_data-Specification_of_the_MTEX_algorithm">Grain detection from 2d and 3d EBSD data</a> and the topic <a href="GrainReconstruction.html">Grain Reconstruction</a>. The syntax is</p>
</center>
<p>In this standard form a default color coding of the orientations is chosen. A more complete discussion about how to colorize orientations can be found in the topic <a href="EBSDIPFMap.html">IPF Maps</a>.</p>
<h2 id="10">Grain reconstruction</h2>
<p>MTEX contains a sophisticated algorithm for reconstructing the grain structure from EBSD data as described in the paper <a href="https://www.researchgate.net/publication/51806709_Grain_detection_from_2d_and_3d_EBSD_data-Specification_of_the_MTEX_algorithm">Grain detection from 2d and 3d EBSD data</a> and the topic <a href="GrainReconstruction.html">Grain Reconstruction</a>. The syntax is</p>
{% highlight matlab %}
% reconstruct grains with a theshold angle of 10 degrees
% reconstruct grains with a threshold angle of 10 degrees
grains = calcGrains(ebsd('indexed'),'theshold',10*degree)

% smooth the grains to avoid the staircase effect
Expand All @@ -100,7 +128,7 @@

<strong>Properties</strong>: meanRotation, GOS
{% endhighlight %}
<p>This creates a variable <code class="language-plaintext highlighter-rouge">grains</code> of type <a href="grain2d.grain2d.html">grain2d</a> which containes the full <a href="ShapeParameters.html">geometric information</a> about all grains and their <a href="BoundaryProperties.html">boundaries</a>. As the simplest application we may just plot the grain boundaries</p>
<p>This creates a variable <code class="language-plaintext highlighter-rouge">grains</code> of type <a href="grain2d.grain2d.html">grain2d</a> which contains the full <a href="ShapeParameters.html">geometric information</a> about all grains and their <a href="BoundaryProperties.html">boundaries</a>. As the simplest application we may just plot the grain boundaries</p>
{% highlight matlab %}
% plot the grain boundaries on top of the ipf map
hold on
Expand All @@ -109,17 +137,19 @@
{% endhighlight %}
<center>
{% include inline_image.html file="EBSDTutorial_04.png" %}
</center><h2 id="12">Crystal Shapes</h2><p>In order to make the visualization of crystal orientations more intuitive MTEX supports <a href="CrystalShapes.html">crystal shapes</a>. Those are polyhedrons computed to match the typical shape of ideal crystals. In order to overlay the EBSD map with crystal shapes orienteted accordingly to the orientations of the grains we proceed as follows.</p>
</center>
<h2 id="12">Crystal Shapes</h2>
<p>In order to make the visualization of crystal orientations more intuitive MTEX supports <a href="CrystalShapes.html">crystal shapes</a>. 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.</p>
{% highlight matlab %}
% define the crystal shape of Forsterite and store it in the variable cS
cS = crystalShape.olivine(ebsd('Forsterite').CS)

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

% plot crystal shapes at the positions of the Forsterite grains
hold on
plot(grains('Forsterite'),0.7*cS,'FaceColor',[0.3 0.5 0.3])
plot(grains,0.7*cS,'colored')
hold off
{% endhighlight %}

Expand All @@ -131,7 +161,9 @@
{% endhighlight %}
<center>
{% include inline_image.html file="EBSDTutorial_05.png" %}
</center><h2 id="13">Pole Figures</h2><p>One of the most important tools for analysing the orientations in an EBSD map are <a href="OrientationPoleFigure.html">pole figure plots</a>. Those answer the question of how selected crystal directions, here <code class="language-plaintext highlighter-rouge">h</code>, are aligned with respect to specimen directions</p>
</center>
<h2 id="13">Pole Figures</h2>
<p>One of the most important tools for analyzing the orientations in an EBSD map are <a href="OrientationPoleFigure.html">pole figure plots</a>. Those answer the question of how selected crystal directions, here <code class="language-plaintext highlighter-rouge">h</code>, are aligned with respect to specimen directions</p>
{% highlight matlab %}
% the selected crystal directions
h = Miller({1,0,0},{0,1,0},{0,0,1},ebsd('Forsterite').CS);
Expand All @@ -147,7 +179,9 @@
{% endhighlight %}
<center>
{% include inline_image.html file="EBSDTutorial_06.png" %}
</center><h2 id="14">Inverse Pole Figures</h2><p>Analogously one can ask for the crystal directions pointing in a selected specimen direction. The resulting plots are called <a href="OrientationInversePoleFigure.html">inverse pole figures</a>.</p>
</center>
<h2 id="14">Inverse Pole Figures</h2>
<p>Analogously one can ask for the crystal directions pointing in a selected specimen direction. The resulting plots are called <a href="OrientationInversePoleFigure.html">inverse pole figures</a>.</p>
{% highlight matlab %}
% select the specimen direction
r = vector3d.Z;
Expand All @@ -162,4 +196,7 @@
{% endhighlight %}
<center>
{% include inline_image.html file="EBSDTutorial_07.png" %}
</center></div></body></html>
</center>
</div>
</body>
</html>

0 comments on commit 4aa695b

Please sign in to comment.