How can i plot GaM map ?

419 views
Skip to first unread message

Danae

unread,
Jun 13, 2016, 12:06:55 PM6/13/16
to MTEX
Hello,

I am a new Mtex user and I would like to know if there is a way to plot with Mtex the Grain Average Misorientation Map (GaM). I could not manage to do it until now.

Thank you in advance for your answer.

Danae

ruediger Kilian

unread,
Jun 13, 2016, 12:24:49 PM6/13/16
to mtex...@googlegroups.com
Hi Danae,

how would you define the GAM? Should this be like the averaged KAM per grain? “Built-in” there’s something like KAM or GOS, if you know how you want to calculate your GAM, it should most likely be straight forward.

Cheers,
Rüdiger
> --
> If you want to reduce the number of emails you get through this forum login to https://groups.google.com/forum/?fromgroups=#!forum/mtexmail, click "My membership" and select "Don't send me email updates". You can still get emails on selected topics by staring them.
> ---
> You received this message because you are subscribed to the Google Groups "MTEX" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mtexmail+u...@googlegroups.com.
> Visit this group at https://groups.google.com/group/mtexmail.
> For more options, visit https://groups.google.com/d/optout.

signature.asc

Danae

unread,
Jun 14, 2016, 3:40:31 AM6/14/16
to MTEX, ruedige...@unibas.ch
Thank you very much for your answer.


Danae

Thomas Simm

unread,
Jun 15, 2016, 9:37:21 AM6/15/16
to MTEX, ruedige...@unibas.ch
Yes you're right there is not much explicitly on GOS, a bit here but not on GOS https://mtex-toolbox.github.io/files/doc/GrainReconstruction.html 
but given a grain GOS is the average of the misorientation angles of points within it, see below (edit calcGrains)

% compute mean orientation and GOS
doMeanCalc = find(grains.grainSize>1 & grains.isIndexed);
for k = 1:numel(doMeanCalc)
  
  qind = subSet(q,d(grainRange(doMeanCalc(k))+1:grainRange(doMeanCalc(k)+1)));
  mq = mean(qind);
  meanRotation = setSubSet(meanRotation,doMeanCalc(k),mq);
  GOS(doMeanCalc(k)) = mean(angle(mq,qind));
  
end

And mis2mean is the misorientation angle of points within a grain to the average

% save 
grains.prop.GOS = GOS;
grains.prop.meanRotation = reshape(meanRotation,[],1);
mis2mean = inv(rotation(q(:))) .* grains.prop.meanRotation(grainId(:));

end

davisola

unread,
Sep 30, 2016, 3:27:59 PM9/30/16
to MTEX
Currently I did the GAM calculations using the Mtex 4.3. Attached is the routine I wrote:

  After cleaning of ebsd data, calculating the grains, excluding grains with grainSize less than 10, recalculating the grains, I found GAM using the script:

 
   
[n m] = size(grains);
    clear m
;
   
for M = 1:n
    grain
= ebsd(grains(M));
    KAM
= KAM(grain('0'),'threshold',2*degree);
    KAM
(isnan(KAM))= [];
    KAM
= KAM/degree;
    GAM
(M,1) = mean(KAM);
    clear KAM grain
The GAM file has the average misorientation of each grain.
This routine could become a function on Mtex, or even a grain property, something like grains.GAM

So, it's up to you incorporate it into future versions of MTex.

Rüdiger Kilian

unread,
Oct 17, 2016, 6:30:05 PM10/17/16
to mtex...@googlegroups.com
Hi Davisola,
if you loop though each grain, it might be a little slow for large maps.
Assuming you have an ebsd with a grainId, you might do:

kam=KAM(ebsd,'threshold',5*degree);
kam(kam<lowlim)=nan;  % set all values below a lower limit to NaNs, if you like
[gid,~,eindex] = unique(ebsd.grainId);
gam = accumarray(eindex,kam,[],@nanmean);

Cheers,
Rüdiger


From: mtex...@googlegroups.com [mtex...@googlegroups.com] on behalf of davisola [davis...@gmail.com]
Sent: Friday, September 30, 2016 9:27 PM
To: MTEX
Subject: {MTEX} Re: How can i plot GaM map ?

Reply all
Reply to author
Forward
0 new messages