EBSD analysis reference to Documentation in MTEX #58
-
Hi, % create an EBSD variable containing the data % and plot the orientation data Best wish! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @wuwuhd, I understand where you're coming from but there is sound rationale for doing so.
% clear variables
clc; clear all; clear hidden; close all;
% start Mtex
startup_mtex;
% define Mtex plotting convention as X = right, Y = up
setMTEXpref('xAxisDirection','east');
setMTEXpref('zAxisDirection','outOfPlane');
setMTEXpref('FontSize', 14);
% import the dataset
ebsd = EBSD.load('Duplex.ctf','interface','ctf',...
'convertEuler2SpatialReferenceFrame');
ebsd = ebsd('indexed');
%% calculate the grains
% identify grains
[grains,ebsd.grainId,ebsd.mis2mean] = calcGrains(ebsd,'angle',5*degree);
% remove small clusters
ebsd(grains(grains.grainSize <= 5)) = [];
% re-calculate grains
[grains,ebsd.grainId,ebsd.mis2mean] = calcGrains(ebsd,'angle',5*degree);
% smooth grains
grains = smooth(grains,5);
% calculate the grain boundaries
gB = grains.boundary;
% define the fcc phase
ebsd_fcc = ebsd('Fe-FCC');
grains_fcc = grains('Fe-FCC');
gB_fcc = gB('Fe-FCC','Fe-FCC');
cond = gB_fcc.misorientation.angle > 57 * degree;
figure
plot(ebsd_fcc,ebsd_fcc.orientations);
hold all;
plot(gB_fcc,'lineWidth',2);
plot(gB_fcc(cond),'lineWidth',2,'lineColor','w');
hold off;
figure
gbnd1 = calcGBPD(gB_fcc(cond),ebsd_fcc);
gbnd2 = calcGBPD(gB_fcc(~cond),ebsd_fcc);
contourf(gbnd1);
mtexTitle('GBPD for misorientation angle \(> 57^{\circ}\)');
mtexColorMap parula;
nextAxis;
contourf(gbnd2);
mtexTitle('GBPD for misorientation angle \(< 57^{\circ}\)');
mtexColorMap parula;
mtexColorbar; Hope this helps. **Lastly, and importantly, if an explanation from the maintainers resolves your issue, please press the "Mark as answer" button on the appropriate response. Your help in this regard enables us to close discussions as complete. ** Warm regards, |
Beta Was this translation helpful? Give feedback.
Hi @wuwuhd,
I understand where you're coming from but there is sound rationale for doing so.
MTEX was created to work for all users with different kinds of maps from different vendors, convention systems, map grid types, and phases. So the easiest way to script for a very large audience with different datasets is to modularise the functions so that it works for everyone and not just for a few specific cases.
Many functions inherently deal with a single phase because they are quantifying phenomena specific to a single crystal system. Consequently, the MTEX documentation shows examples on how to work with these functions using single phase maps (for the most part).
For example, in your …