grain area 0

82 views
Skip to first unread message

Kerry

unread,
Jun 7, 2016, 12:17:40 PM6/7/16
to MTEX
Hi everyone. I'm running  MTEX 4.4.alpha.2, and I am experiencing the following issue

When I plot my grain area histogram, my results reflect many grains with 0 grain area. I assumed it was due to the outer boundary grains. Thus, I removed the outer boundary grains and still receive grains with 0 area. Any advice here, thanks!

Thomas Simm

unread,
Jun 7, 2016, 5:10:53 PM6/7/16
to MTEX
Hi,

Is this from using histogram(grains.area) ?
Or if you do min(grains.area) you get 0?

I get lots of small grains, area<.2, which can be removed by e.g. ind = grains.area>.5; grains = grains(ind)
But 0 seems unusual

Is it causing any other problems? Could you not just do: histogram(grains.area,10:20:max(grains.area))

Andrew Cross

unread,
Jun 8, 2016, 12:24:55 AM6/8/16
to MTEX
Hi Kerry,

Are you performing a smooth(grains) operation before constructing the histogram? Grain smoothing can shrink small grains to an apparent grain area of zero.

On Tuesday, June 7, 2016 at 11:17:40 AM UTC-5, Kerry wrote:

Kerry

unread,
Jun 8, 2016, 9:59:53 AM6/8/16
to MTEX
Hi! And thanks for responding. The commands I use are: 

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

Kerry

unread,
Jun 8, 2016, 10:01:32 AM6/8/16
to MTEX
Hello and thank you for responding! Yes, I've tried using those commands and still get grains with area 0

ruediger Kilian

unread,
Jun 8, 2016, 10:12:07 AM6/8/16
to MTEX
Hi Kerry,
> When I plot my grain area histogram, my results reflect many grains with 0 grain area.
In which way does the histogram reflect this? Population in the smallest bin?

What was the output of Thomas’ suggestion min(grains.area) or the output of grains(grains.area==0) ?
What happens when you calculate your grains with [grains,ebsd.grainId] = calcGrains(ebsd,’unitcell’) ?

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

Kerry

unread,
Jun 8, 2016, 12:50:02 PM6/8/16
to MTEX, ruedige...@unibas.ch

Hi and thanks for the reply!!!
I've attached a figure of my histogram. 
when I run the commands, I get the following outputs:

min(grains.area) 

ans =

    0.0100

>>  grains(grains.area==0) 
 
ans = grain2d (show methods, plot)
 
  no grains here!
 
 Id

Thomas Simm

unread,
Jun 8, 2016, 1:48:55 PM6/8/16
to MTEX, ruedige...@unibas.ch
This is quite common,

A few things hist is a function Matlab is trying to replace with histogram if you put this functions word in the matlab help you can see its functionality
If you've plotted as you said then your y-axis is labelled incorrectly.
I think you want something like this?


vars = zeros(1,length(ebsd)); vars = grains(ebsd.grainId).area ; 
histogram(vars)

Now the frequency is related to its area on the map rather than the number of grains

Kerry

unread,
Jun 8, 2016, 2:16:16 PM6/8/16
to MTEX, ruedige...@unibas.ch
Thank you! I will look at Matlab help. The figure from the previous post is generated with the Mtex commands from the documentation:  
ebsd = ebsd('indexed');
[grains,ebsd.grainId] = calcGrains(ebsd)
hist(grains)

When I run your commands 
vars = zeros(1,length(ebsd));
vars = grains(ebsd.grainId).area ; 
histogram(vars)


I still get 0 grain area (see figure 2)

Thomas Simm

unread,
Jun 8, 2016, 4:07:55 PM6/8/16
to mtex...@googlegroups.com, ruedige...@unibas.ch
This is a good example of the problem of using ebsd for size measurements.
You can get around some of the problems by cleaning the data e.g. ebsd = smooth(ebsd) 

And also getting rid of sizes you think are unreliable- a possible way to do this is to plot by size e.g. plot(grains(grains.area<XA), grains(grains.area<XA).boundary) and have a look what is/is not reliable

Ralf discusses cleaning here https://www-user.tu-chemnitz.de/~rahi/mtexWorkshop16/presentations/denoising.pdf but because it's a presentation I think some details are missed of the capabilities he discusses 

Not sure if anyone know a way around this issue?

Ralf Hielscher

unread,
Jun 8, 2016, 4:10:10 PM6/8/16
to MTEX
Hi Kerry,

I think there is everything right with your histogram. You have to read it correctly. It tells you that about 50 percent of all area belongs to grains with area 10 or less, about 25 percent belong to grains with area between 10 an 20, about 10 percent of all area belong to grains with area between 20 and 30, and so on.

It does not tell you that there is any grain with area 0.

I hope this helps.

Ralf.

Rüdiger Kilian

unread,
Jun 8, 2016, 4:11:36 PM6/8/16
to mtex...@googlegroups.com
No, as you verified before, there are no grains with an area of 0. That's basically how histograms work.
You can specify your bin centers in hist, if you are irritated that the histograms starts at 0.
Cheers,
Rüdiger



From: 'Kerry' via MTEX [mtex...@googlegroups.com]
Sent: Wednesday, June 08, 2016 8:16 PM
To: MTEX
Cc: Rüdiger Kilian
Subject: Re: {MTEX} Re: grain area 0

Kerry

unread,
Jun 8, 2016, 4:16:53 PM6/8/16
to MTEX
Oh my! I'm embarrassed. Thank you for the information!

Thomas Simm

unread,
Jun 9, 2016, 2:49:58 PM6/9/16
to MTEX
Hi,

That's okay, good to try to help. Share your knowledge to colleagues and on here as you get more experienced. It takes time as Matlab and MTEX terminology isn't easy 
Good luck,

Tom
Reply all
Reply to author
Forward
0 new messages