grainMean edit page

grain average property from ebsd properties

Syntax

% recover grains and store grainId
[grains,ebsd.grainId] = calcGrains(ebsd)
% compute average grain property
meanPropG = grainMean(ebsd, ebsd.ci, grains);
plot(grains,meanPropG)
% compute average grain property for each EBSD pixel
meanPropE = grainMean(ebsd, ebsd.ci, grains);
plot(ebsd,meanPropE)
% take not the mean but the maximum per grain
meanPropG = grainMean(ebsd, ebsd.ci, grains, @max);
plot(grains,meanPropG)

Input

ebsd EBSD (which must contain a grainId)
prop property to average, same size as ebsd
grains grain2d
method function_handle

Output

meanPropG average property, sorted as grains
meanPropE average property, sorted as EBSD

Options

ulim upper limit to consider (upper limit)
llim lower limit to consider (lower limit)