Skip to content

Commit

Permalink
docu
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfHielscher committed Nov 7, 2024
1 parent 94019ce commit 6da9952
Show file tree
Hide file tree
Showing 27 changed files with 137 additions and 145 deletions.
Binary file modified images/ClusterDemo_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/CombinedPlots_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/EBSDProfile_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/EBSDProfile_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/GrainGraphBasedReconstruction_11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/GrainGraphBasedReconstruction_15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/OrientationInversePoleFigure_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/OrientationInversePoleFigure_04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/OrientationPoleFigure_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/ParentChildVariants_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/PlotTypes_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/TiltAndTwistBoundaries_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/TransformationTexture_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/TransformationTexture_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/VectorsAxes_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/VectorsAxes_04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions pages/documentation_matlab/CrystalReferenceSystem.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ <h2 id="4">Trigonal and hexagonal materials</h2>

close all
figure(1)
plot(cS_x2a,'figSize','small')
plot(cS_x2a,'figSize','small','colored')
hold on
arrow3d(0.5*[xvector,yvector,zvector],'labeled')
arrow3d(0.6*[xvector,yvector,zvector],'labeled')
hold off
{% endhighlight %}
<center>
Expand All @@ -114,9 +114,9 @@ <h2 id="4">Trigonal and hexagonal materials</h2>
cS_y2a = crystalShape.quartz(cs_y2a);

figure(2)
plot(cS_y2a,'figSize','small')
plot(cS_y2a,'figSize','small','colored')
hold on
arrow3d(0.5*[xvector,yvector,zvector],'labeled')
arrow3d(0.6*[xvector,yvector,zvector],'labeled')
hold off
{% endhighlight %}
<center>
Expand Down
64 changes: 23 additions & 41 deletions pages/documentation_matlab/CrystalShapes.html
Original file line number Diff line number Diff line change
Expand Up @@ -274,23 +274,23 @@ <h2 id="11">Defining complicated crystal shapes</h2>
<center>
{% include inline_image.html file="CrystalShapes_09.png" %}
</center>
<p>i.e. we see only the positive and negative rhomboedrons, but the hexagonal prism are to far away from the origin to cut the shape. We may decrease the distance, by multiplying the corresponding normal with a factor larger then 1.</p>
<p>i.e. we see only the positive and negative rhododendrons, but the hexagonal prism are to far away from the origin to cut the shape. We may decrease the distance, by multiplying the corresponding normal with a factor larger then 1.</p>
{% highlight matlab %}
N = [2*m,r,z];

cS = crystalShape(N);
plot(cS)
plot(cS,'colored')
{% endhighlight %}
<center>
{% include inline_image.html file="CrystalShapes_10.png" %}
</center>
<p>Next in a typical Quartz crystal the negative rhomboedron is a bit smaller then the positive rhomboedron. Lets correct for this.</p>
<p>Next in a typical Quartz crystal the negative rhododendron is a bit smaller then the positive rhododendron. Lets correct for this.</p>
{% highlight matlab %}
% collect the face normal with the right scaling
N = [2*m,r,0.9*z];

cS = crystalShape(N);
plot(cS)
plot(cS,'colored')
{% endhighlight %}
<center>
{% include inline_image.html file="CrystalShapes_11.png" %}
Expand All @@ -301,33 +301,12 @@ <h2 id="11">Defining complicated crystal shapes</h2>
N = [2*m,r,0.9*z,0.7*s1,0.3*x1];

cS = crystalShape(N);
plot(cS)
{% endhighlight %}
<center>
{% include inline_image.html file="CrystalShapes_12.png" %}
</center>
<h2 id="18">Marking crystal faces</h2>
<p>We may colorize the faces according to their lattice planes using the command</p>
{% highlight matlab %}
plot(cS,'colored')
{% endhighlight %}
<center>
{% include inline_image.html file="CrystalShapes_13.png" %}
</center>
<p>or even label the faces directly</p>
{% highlight matlab %}
plot(cS)
N = unique(cS.N.symmetrise,'noSymmetry','stable');
fC = cS.faceCenter;

for i = 1:length(N)
text3(fC(i),char(round(N(i)),'latex'),'scaling',1.1,'interpreter','latex')
end
{% endhighlight %}
<center>
{% include inline_image.html file="CrystalShapes_14.png" %}
{% include inline_image.html file="CrystalShapes_12.png" %}
</center>
<h2 id="20">Defining complicated crystals more simple</h2>
<h2 id="18">Defining complicated crystals more simple</h2>
<p>We see that defining a complicated crystal shape is a tedious work. To this end MTEX allows to model the shape with a habitus and a extension parameter. This approach has been developed by J. Enderlein in <a href="https://library.wolfram.com/infocenter/Articles/3279">A package for displaying crystal morphology. Mathematical Journal, 7(1), 1997</a>. The two parameters are used to model the distance of a face from the origin. Setting all parameters to one we obtain</p>
{% highlight matlab %}
% take the face normals unscaled
Expand All @@ -339,16 +318,16 @@ <h2 id="20">Defining complicated crystals more simple</h2>
plot(cS,'colored')
{% endhighlight %}
<center>
{% include inline_image.html file="CrystalShapes_15.png" %}
{% include inline_image.html file="CrystalShapes_13.png" %}
</center>
<p>The scale parameter models the inverse extension of the crystal in each dimension. In order to make the crystal a bit longer and the negative rhomboedrons smaller we could do</p>
<p>The scale parameter models the inverse extension of the crystal in each dimension. In order to make the crystal a bit longer and the negative rhododendrons smaller we could do</p>
{% highlight matlab %}
extension = [0.9 1.1 1];
extension = [1 1.2 1.1];
cS = crystalShape(N,habitus,extension);
plot(cS,'colored')
{% endhighlight %}
<center>
{% include inline_image.html file="CrystalShapes_16.png" %}
{% include inline_image.html file="CrystalShapes_14.png" %}
</center>
<p>Next the habitus parameter describes how close faces with mixed hkl are to the origin. If we increase the habitus parameter the trapezohedron and the bipyramid become more and more dominant</p>
{% highlight matlab %}
Expand All @@ -365,49 +344,52 @@ <h2 id="20">Defining complicated crystals more simple</h2>
plot(cS,'colored')
{% endhighlight %}
<center>
{% include inline_image.html file="CrystalShapes_17.png" %}
{% include inline_image.html file="CrystalShapes_15.png" %}
</center>
<center>
{% include inline_image.html file="CrystalShapes_18.png" %}
{% include inline_image.html file="CrystalShapes_16.png" %}
</center>
<center>
{% include inline_image.html file="CrystalShapes_19.png" %}
{% include inline_image.html file="CrystalShapes_17.png" %}
</center>
<h2 id="23">Select faces</h2>
<h2 id="21">Select faces</h2>
<p>A specific face of the crystal shape may be selected by its normal vector</p>
{% highlight matlab %}
plot(cS)
hold on
plot(cS(Miller(0,-1,1,0,cs)),'FaceColor','DarkRed')
hold off

% zoom a bit out to fit the screen
camzoom(0.7)
{% endhighlight %}
<center>
{% include inline_image.html file="CrystalShapes_20.png" %}
{% include inline_image.html file="CrystalShapes_18.png" %}
</center>
<h2 id="24">Gallery of hardcoded crystal shapes</h2>
<h2 id="22">Gallery of hardcoded crystal shapes</h2>
{% highlight matlab %}
plot(crystalShape.olivine,'colored')
{% endhighlight %}
<center>
{% include inline_image.html file="CrystalShapes_21.png" %}
{% include inline_image.html file="CrystalShapes_19.png" %}
</center>
{% highlight matlab %}
plot(crystalShape.garnet,'colored')
{% endhighlight %}
<center>
{% include inline_image.html file="CrystalShapes_22.png" %}
{% include inline_image.html file="CrystalShapes_20.png" %}
</center>
{% highlight matlab %}
plot(crystalShape.topaz,'colored')
{% endhighlight %}
<center>
{% include inline_image.html file="CrystalShapes_23.png" %}
{% include inline_image.html file="CrystalShapes_21.png" %}
</center>
{% highlight matlab %}
plot(crystalShape.plagioclase,'colored')
{% endhighlight %}
<center>
{% include inline_image.html file="CrystalShapes_24.png" %}
{% include inline_image.html file="CrystalShapes_22.png" %}
</center>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion pages/documentation_matlab/EBSDIPFMap.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ <h2 id="7">Basic Properties</h2>
<center>
{% include inline_image.html file="EBSDIPFMap_07.png" %}
</center>
<p>Instead of colorizing which crystal axis is pointing out of the specimen surface we may also colorizing which crystal axis is pointing towards the rolling or folliation direction or any other specimen fixed direction. This reference direction is stored as the property <code class="language-plaintext highlighter-rouge">inversePoleFigureDirection</code> in the color key.</p>
<p>Instead of colorizing which crystal axis is pointing out of the specimen surface we may also colorizing which crystal axis is pointing towards the rolling or foliation direction or any other specimen fixed direction. This reference direction is stored as the property <code class="language-plaintext highlighter-rouge">inversePoleFigureDirection</code> in the color key.</p>
{% highlight matlab %}
% set the reference direction to X
ipfKey.inversePoleFigureDirection = vector3d.X;
Expand Down
34 changes: 18 additions & 16 deletions pages/documentation_matlab/EBSDOrientationAnalysis.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@
<div>
<!--introduction-->
<!--/introduction-->
<p>Here we discuss tools for the analysis of EBSD data which are independent of its spatial coordinates. For spatial analysis, we refer to <a href="xxx.html">this page</a>. Let us first import some EBSD data:</p>
<p>Here we discuss tools for the analysis of EBSD data which are independent of its spatial coordinates. For spatial analysis, we refer to <a href="EBSDProfile.html">this page</a>. Let us first import some EBSD data:</p>
{% highlight matlab %}
plotx2east
ebsd = EBSD.load(fullfile(mtexDataPath,'EBSD','Forsterite.ctf'),...
'convertEuler2SpatialReferenceFrame');
mtexdata forsterite silent

plotx2east
plot(ebsd)
{% endhighlight %}
<center>
Expand Down Expand Up @@ -69,9 +68,7 @@ <h2 id="2">Orientation plot</h2>
rOrth = perp(r)

% output
hold on
plot(rOrth)
hold off
plot(rOrth,'add2all','Marker','square','markerColor','DarkRed')
{% endhighlight %}

{% highlight plaintext %}
Expand All @@ -89,7 +86,15 @@ <h2 id="2">Orientation plot</h2>
<center>
{% include inline_image.html file="EBSDOrientationAnalysis_03.png" %}
</center>
<p>we can check how large is the number of orientations that are in the (100) pole figure within a 10-degree fibre around the great circle with center <code class="language-plaintext highlighter-rouge">rOrth</code>. The following line gives the result in percent</p>
<p>we can check how large is the number of orientations that are in the (100) pole figure within a 10-degree fibre around the great circle with center <code class="language-plaintext highlighter-rouge">rOrth</code>, i.e., in the region bounded by the two small circles</p>
{% highlight matlab %}
nextAxis(1)
circle(rOrth,80 * degree,'lineColor','darkred','linewidth',5,'EdgeAlpha',0.5)
{% endhighlight %}
<center>
{% include inline_image.html file="EBSDOrientationAnalysis_04.png" %}
</center>
<p>The following line gives the result in percent</p>
{% highlight matlab %}
100 * sum(angle(r,rOrth)>80*degree) / length(ori)
{% endhighlight %}
Expand All @@ -104,13 +109,10 @@ <h2 id="2">Orientation plot</h2>
mtexColorbar
{% endhighlight %}
<center>
{% include inline_image.html file="EBSDOrientationAnalysis_04.png" %}
{% include inline_image.html file="EBSDOrientationAnalysis_05.png" %}
</center>
<p>From the inverse pole figure, it becomes clear that the orientations are close to the fibre <code class="language-plaintext highlighter-rouge">Miller(0,1,0)</code>, <code class="language-plaintext highlighter-rouge">rOrth</code>. Let's check this by computing the fibre volume in percent</p>
{% highlight matlab %}
%From the inverse pole figure, it becomes clear that the orientations are
% close to the fibre |Miller(0,1,0)|, |rOrth|. Let's check this by computing
% the fibre volume in percent

% define the fibre
f = fibre(Miller(0,1,0,cs),rOrth);

Expand All @@ -127,7 +129,7 @@ <h2 id="2">Orientation plot</h2>
odf = calcDensity(ebsd('Forsterite').orientations)

% plot the odf along the fibre
plot(odf,f)
plot(odf,f,'linewidth',2)
ylim([0,26])
{% endhighlight %}

Expand All @@ -137,15 +139,15 @@ <h2 id="2">Orientation plot</h2>
weight: 1
{% endhighlight %}
<center>
{% include inline_image.html file="EBSDOrientationAnalysis_05.png" %}
{% include inline_image.html file="EBSDOrientationAnalysis_06.png" %}
</center>
<p>We see that to ODF is far from being constant along the fibre. Thus, together with an observation about the small fibre volume, we would reject the hypothesis of a fibre texture.</p>
<p>Let's finally plot the ODF in orientation space to verify our decision</p>
{% highlight matlab %}
plot(odf,'sigma')
{% endhighlight %}
<center>
{% include inline_image.html file="EBSDOrientationAnalysis_06.png" %}
{% include inline_image.html file="EBSDOrientationAnalysis_07.png" %}
</center>
<p>Here we see the typical large individual spots that are typical for large grains. Thus the ODF estimated from the EBSD data and all our previous analysis suffer from the fact that too few grains have been measured. For texture analysis, it would have been favorable to measure at a lower resolution but a larger region.</p>
</div>
Expand Down
19 changes: 11 additions & 8 deletions pages/documentation_matlab/GrainGraphBasedReconstruction.html
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ <h2 id="15">Merge similar grains and inclusions</h2>
% plot the result
plot(job.parentGrains,job.parentGrains.meanOrientation)
{% endhighlight %}
<center>
{% include inline_image.html file="GrainGraphBasedReconstruction_10.png" %}
</center>
<p>We may be still a bit unsatisfied with the result as the large parent grains contain many poorly indexed inclusions where we failed to assign to a parent orientation. We may use the command <a href="parentGrainReconstructor.mergeInclusions.html"><code class="language-plaintext highlighter-rouge">mergeInclusions</code></a> to merge all inclusions with fever pixels then a certain threshold into the surrounding parent grains.</p>
{% highlight matlab %}
job.mergeInclusions('maxSize',50);
Expand All @@ -330,7 +333,7 @@ <h2 id="15">Merge similar grains and inclusions</h2>
plot(job.parentGrains,job.parentGrains.meanOrientation)
{% endhighlight %}
<center>
{% include inline_image.html file="GrainGraphBasedReconstruction_10.png" %}
{% include inline_image.html file="GrainGraphBasedReconstruction_11.png" %}
</center>
<h2 id="17">Compute Child Variants</h2>
<p>Knowing the parent grain orientations we may compute the variants and packets of each child grain using the command <a href="parentGrainReconstructor.calcVariants.html"><code class="language-plaintext highlighter-rouge">calcVariants</code></a>. The values are stored with the properties <code class="language-plaintext highlighter-rouge">job.transformedGrains.variantId</code> and <code class="language-plaintext highlighter-rouge">job.transformedGrains.packetId</code>. The <code class="language-plaintext highlighter-rouge">packetId</code> is defined as the closest {111} plane in austenite to the (011) plane in martensite.</p>
Expand All @@ -353,7 +356,7 @@ <h2 id="17">Compute Child Variants</h2>
hold off
{% endhighlight %}
<center>
{% include inline_image.html file="GrainGraphBasedReconstruction_11.png" %}
{% include inline_image.html file="GrainGraphBasedReconstruction_12.png" %}
</center>
<p>We can also directly identify the child grains belonging to the selected parent grains. Remember that the initial grains are stored in <code class="language-plaintext highlighter-rouge">job.grainsPrior</code> and that the vector <code class="language-plaintext highlighter-rouge">job.mergeId</code> stores for every initial grain the <code class="language-plaintext highlighter-rouge">id</code> of the corresponding parent grain. Combining these two information we do</p>
{% highlight matlab %}
Expand All @@ -369,7 +372,7 @@ <h2 id="17">Compute Child Variants</h2>
hold off
{% endhighlight %}
<center>
{% include inline_image.html file="GrainGraphBasedReconstruction_12.png" %}
{% include inline_image.html file="GrainGraphBasedReconstruction_13.png" %}
</center>
<p>In order to check our parent grain reconstruction we chose the single parent grain outlined in the above map and plot all child variants of its reconstructed parent orientation together with the actually measured child orientations inside the parent grain. In order to compute the <code class="language-plaintext highlighter-rouge">variantId</code> and <code class="language-plaintext highlighter-rouge">packetId</code> we use the command <a href="calcVariantId.html"><code class="language-plaintext highlighter-rouge">calcVariantId</code></a>.</p>
{% highlight matlab %}
Expand Down Expand Up @@ -397,7 +400,7 @@ <h2 id="17">Compute Child Variants</h2>
hold off
{% endhighlight %}
<center>
{% include inline_image.html file="GrainGraphBasedReconstruction_13.png" %}
{% include inline_image.html file="GrainGraphBasedReconstruction_14.png" %}
</center>
<h2 id="20">Parent EBSD reconstruction</h2>
<p>So far our analysis was at the grain level. However, once parent grain orientations have been computed we may also use them to compute parent orientations of each pixel in our original EBSD map. This is done by the command <a href="parentGrainReconstructor.calcParentEBSD.html"><code class="language-plaintext highlighter-rouge">calcParentEBSD</code></a>
Expand All @@ -409,7 +412,7 @@ <h2 id="20">Parent EBSD reconstruction</h2>
plot(parentEBSD('Iron fcc'),parentEBSD('Iron fcc').orientations,'figSize','large')
{% endhighlight %}
<center>
{% include inline_image.html file="GrainGraphBasedReconstruction_14.png" %}
{% include inline_image.html file="GrainGraphBasedReconstruction_15.png" %}
</center>
<p>We obtain even a measure <code class="language-plaintext highlighter-rouge">parentEBSD.fit</code> for the correspondence between the parent orientation reconstructed from the single pixel and the parent orientation of the grain. Lets visualize this fit</p>
{% highlight matlab %}
Expand All @@ -425,7 +428,7 @@ <h2 id="20">Parent EBSD reconstruction</h2>
hold off
{% endhighlight %}
<center>
{% include inline_image.html file="GrainGraphBasedReconstruction_15.png" %}
{% include inline_image.html file="GrainGraphBasedReconstruction_16.png" %}
</center>
<h2 id="22">Denoise the parent map</h2>
<p>Finally, we may apply filtering to the parent map to fill non indexed or not reconstructed pixels. To this end we first run grain reconstruction on the parent map</p>
Expand All @@ -446,7 +449,7 @@ <h2 id="22">Denoise the parent map</h2>
hold off
{% endhighlight %}
<center>
{% include inline_image.html file="GrainGraphBasedReconstruction_16.png" %}
{% include inline_image.html file="GrainGraphBasedReconstruction_17.png" %}
</center>
<p>and then use the command <a href="EBSD.smooth.html"><code class="language-plaintext highlighter-rouge">smooth</code></a> to fill the holes in the reconstructed parent map</p>
{% highlight matlab %}
Expand All @@ -463,7 +466,7 @@ <h2 id="22">Denoise the parent map</h2>
hold off
{% endhighlight %}
<center>
{% include inline_image.html file="GrainGraphBasedReconstruction_17.png" %}
{% include inline_image.html file="GrainGraphBasedReconstruction_18.png" %}
</center>
</div>
</body>
Expand Down
4 changes: 1 addition & 3 deletions pages/documentation_matlab/IsotropicTheory.html
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,7 @@ <h2 id="11">Hashin Shtrikman Bounds</h2>
{% endhighlight %}

{% highlight plaintext %}
Warning: Tensor is not positive definite
Warning: Tensor is not positive definite
Elapsed time is 2.440417 seconds.
Elapsed time is 2.234683 seconds.
{% endhighlight %}
<center>
{% include inline_image.html file="IsotropicTheory_01.png" %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ <h2 id="4">Crystal Symmetries</h2>

close all
plot(oR_all)
axis off
hold on
plot(oR,'color','r')
hold off
Expand Down
Loading

0 comments on commit 6da9952

Please sign in to comment.