The same format file error occurs when distinguishing ferrite #7
-
Hi, @AzdiarGazder % 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 Script for EBSD Data
%
% This script was automatically created by the import wizard. You should
% run the whoole script or parts of it in order to import your data. There
% is no problem in making any changes to this script.
%% Specify Crystal and Specimen Symmetries
% crystal symmetry
CS0 = {...
'notIndexed',...
crystalSymmetry('m-3m', [2.9 2.9 2.9], 'mineral', 'Iron bcc (old)', 'color', [0.53 0.81 0.98]),...
crystalSymmetry('m-3m', [3.7 3.7 3.7], 'mineral', 'Iron fcc', 'color', [0.56 0.74 0.56])};
% plotting convention
setMTEXpref('xAxisDirection','east');
setMTEXpref('zAxisDirection','outOfPlane');
%% Specify File Names
% path to files
pname = 'D:\桌面\EBSD\B-96';
% which files to be imported
fname = [pname '\san.ctf'];
%% Import the Data
% create an EBSD variable containing the data
ebsd0 = EBSD.load(fname,CS0,'interface','ctf',...
'convertEuler2SpatialReferenceFrame');
ebsd0 = gridify(ebsd0);
% store the bcc crystal symmetry for later use
% NOTE: the CSList index changes depending on the number of the bcc
% phase in the ebsd map
CS = ebsd0.CSList{3};
CS.color = [0 0 1];
fR = fundamentalRegion(CS,CS);
% Make subsets of the zero solutions & other phases for later use
ebsd_nI = ebsd0('notindexed');
ebsd_fcc = ebsd0('Iron fcc');
% Specify the bcc phase for segmentation
ebsd_bcc = ebsd0('indexed');
ebsd_bcc = ebsd_bcc(CS.mineral)
%% Calculate the grains
% identify grains
[grains_bcc,ebsd_bcc.grainId,ebsd_bcc.mis2mean] = calcGrains(ebsd_bcc(CS.mineral),'angle',[1 5].*degree,'unitcell');
% remove small clusters
ebsd_bcc(grains_bcc(grains_bcc.grainSize <= 5)) = [];
figH = figure;
% plot(ebsd_bcc(CS.mineral),ebsd_bcc(CS.mineral).iq);
plot(ebsd_bcc(CS.mineral),ebsd_bcc(CS.mineral).bc);
colormap(gray)
set(figH,'Name','Map: Image quality','NumberTitle','on'); The response given by MATLAB after running here is:
The image displayed after running this is blank: I haven't been able to solve it, can you help me? Best wishes |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @Mikewangkang, I believe the problem has to do with the index number of your BCC phase. In each of your *.CTF ebsd map files, please write down the order of appearance of the notIndexed, BCC and FCC phases. Now edit the script by referring to these 2 sections: % crystal symmetry
CS0 = {...
'notIndexed',...
crystalSymmetry('m-3m', [2.9 2.9 2.9], 'mineral', 'Iron bcc (old)', 'color', [0.53 0.81 0.98]),...
crystalSymmetry('m-3m', [3.7 3.7 3.7], 'mineral', 'Iron fcc', 'color', [0.56 0.74 0.56])}; % store the bcc crystal symmetry for later use
% NOTE: the CSList index changes depending on the number of the bcc
% phase in the ebsd map
CS = ebsd0.CSList{3}; In the first section, the order of appearance of the phases should match the order of phases in your *.CTF file. Currently, I do not know the order of appearance of phase in your *.CTF file. In all scripts, please read the remarks I have included in the lines that begin with the "%" sign carefully and in full. They are small explanations that help you understand what the script is doing at any given point and also help you avoid errors. Hope this helps. Warm regards, |
Beta Was this translation helpful? Give feedback.
Hi @Mikewangkang,
I believe the problem has to do with the index number of your BCC phase.
In each of your *.CTF ebsd map files, please write down the order of appearance of the notIndexed, BCC and FCC phases.
Now edit the script by referring to these 2 sections:
In the first section, the o…