Giter VIP home page Giter VIP logo

mtextools's People

Contributors

azdiargazder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mtextools's Issues

How to distinguish ferrite and li'zhuang bainite according to kam

hello guys
I need help with a Matlab® code developed that uses the MTEX toolbox to first define grain boundaries based on selected grain tolerance angles and then calculate the KAM for each pixel. If the misorientation of a pixel exceeds 3°, the program classifies the grains as granular bainite; otherwise, it is classified as polygonal ferrite. The classification algorithm then color-codes the relative sorted grains it determines and calculates the measured granular bainite and polygonal fractions. This is my purpose, I have proceeded to calculate the kam value of each pixel but the follow-up process I don't know how to do.
I would be very grateful if anyone could help!
Wang Kang

The classification algorithm color-codes the classified grains according to the determined phase and calculates the measured grain bainite and polygonal fractions

Hi!@AzdiarGazder 

The developed Matlab®code uses the MTEX toolbox [33] to define first the grain boundaries according to the selected grain tolerance angle and afterwards calculate the KAM of each pixel. The program classifies grains as granular bainite if one pixel exceeds a misorientation of 3°; otherwise it is categorized as polygonal ferrite. Subsequently, the classification algorithm color-codes the classified grains according to their determined phase and calculates the measured granular bainite and polygonal fraction.I can calculate the KAM value for each pixel, but then the classification algorithm color codes the classified grains based on the determined phase and calculates the measured grain bainitic and polygonal fractions I don't know how to do that with code.As shown in the figure below, the left is what I can achieve currently, and the right is the drawing I want to achieve.I would appreciate it if you could help me.
1693968637106
Attach the current code
%% 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
CS = {...
'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','intoPlane');

%% Specify File Names

% path to files
pname = 'D:\桌面\B钢数据\B-750\B钢\B钢EBSD\B750';

% which files to be imported
fname = [pname '\B750-1.crc'];

%% Import the Data

% create an EBSD variable containing the data
ebsd = EBSD.load(fname,CS,'interface','crc',...
'convertEuler2SpatialReferenceFrame');

% The second parameter that is involved in grain reconstruction is the threshold misorientation angle indicating a grain boundary.
grains = calcGrains(ebsd,'angle',5*degree)

[grains,ebsd.grainId] = calcGrains(ebsd('indexed'));

% remove one-three pixel grains
ebsd(grains(grains.grainSize <= 3)) = [];
[grains,ebsd.grainId] = calcGrains(ebsd('indexed'));

grains = smooth(grains,5);

plot(ebsd('indexed'),ebsd('indexed').orientations)
hold on
plot(grains.boundary,'lineWidth',1.5)
hold off

ebsd = ebsd.gridify;

kam = ebsd.KAM / degree;

% lets plot it
plot(ebsd,kam,'micronbar','off')
caxis([0,15])
mtexColorbar
mtexColorMap LaboTeX
hold on
plot(grains.boundary,'lineWidth',1.5)
hold off

plot(ebsd,ebsd.KAM('threshold',2.5*degree) ./ degree,'micronbar','off')
caxis([0,5])
mtexColorbar
mtexColorMap LaboTeX
hold on
plot(grains.boundary,'lineWidth',1.5)
hold off

% chose a denoising filter
F = halfQuadraticFilter;
F.alpha = 0.5;

% denoise the orientation map
ebsdS = smooth(ebsd,F,'fill',grains);

% plot the first order KAM
plot(ebsdS,ebsdS.KAM('threshold',2.5*degree) ./ degree,'micronbar','off')
caxis([0,5])
mtexColorbar
mtexColorMap LaboTeX
hold on
plot(grains.boundary,'lineWidth',1.5)
hold off

Best wishes
Wang Kang

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.