KAM map for PAGs of interest #96
-
|
Dear @AzdiarGazder, Sorry to bother you. I’m a beginner with MTEX and ORTools, currently using the latest developer version of ORTools, MTEX v5.11.2, and MATLAB R2024b. Using ORTools — Example 7, I’ve generated the Bain map and the CP map for a single reconstructed prior austenite grain. However, I’m not sure how to produce the corresponding KAM map. Could you please help me with this? Thank you! Originally posted by @503048019-lab in #85 (reply in thread) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Hi @503048019-lab, Not a worry - we are always happy to help.
%% Define the parent grain of interest
pGrainId = 483;
pGrain = job.parentGrains(job.parentGrains.id == pGrainId);
pEBSD = job.ebsd(pGrain);
pEBSD = pEBSD(job.csParent);
%% Define the child grains
cGrains = job.grainsPrior(job.mergeId == pGrainId);
cGrains = cGrains(job.csChild);
cEBSD = job.ebsdPrior(job.ebsdPrior.id2ind(pEBSD.id));
cEBSD = cEBSD(job.csChild);
%% Calculate first order KAM using the ebsd data of the child grains
% Based on https://mtex-toolbox.github.io/EBSDKAM.html
% Choose a denoising filter
F = halfQuadraticFilter;
F.alpha = 0.5;
% Denoise the ebsd data of the child grains
cEBSD_S = smooth(cEBSD,F,'fill',cGrains);
% Plot the first order KAM using the ebsd data of the child grains
figure
plot(cEBSD_S,...
cEBSD_S.KAM('threshold',2.5*degree)./ degree,...
'micronbar','off');
setColorRange([0,2])
mtexColorbar
mtexColorMap jet
hold all
plot(cGrains.boundary,'lineWidth',1.5)
hold off**Lastly, and importantly, if an explanation from the maintainers resolves your issue, please press the "Mark as answer" button on the appropriate response. Your assistance in this regard enables us to close discussions as complete. ** Hope this helps. Warm regards, |
Beta Was this translation helpful? Give feedback.

Hi @503048019-lab,
Not a worry - we are always happy to help.
As a note for the future, please do not add your questions to old discussions.
Instead please open new issues/discussions.
In that way - new users such as yourself can easily find answers.
To show you an example how to plot a KAM map of the ebsd data of child grains within a parent austenite grain of interest, I first ran ORTools_example01 up to line 152.
Then I used these commands given below: