Skip to content

Commit

Permalink
Fixed bug in plotmap_blockwidths
Browse files Browse the repository at this point in the history
  • Loading branch information
frannie committed Nov 25, 2022
1 parent 5a0c06c commit e22891c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/plotMap_blockWidths.m
Expand Up @@ -36,7 +36,6 @@ function plotMap_blockWidths(job,varargin)

%% Define the child grain(s)
clusterGrains = job.grainsPrior(job.mergeId == pGrainId(ii));
clusterGrains(job.csChild);
% cEBSD = job.ebsdPrior(job.ebsdPrior.id2ind(pEBSD.id));
% cEBSD = cEBSD(job.csChild);

Expand All @@ -46,11 +45,17 @@ function plotMap_blockWidths(job,varargin)
[dBlock,zz,new_A_vec] = calcBlockWidth(job,pGrain,pGrainId(ii),cGrains);
else
cGrains{ii} = clusterGrains(job.csChild);
if job.isTransformed(find(job.mergeId == pGrainId(ii)))
if ~isempty(cGrains{ii})
[dBlockNew{ii},~,~] = calcBlockWidth(job,pGrain,pGrainId(ii),cGrains{ii});
else
dBlockNew{ii} = nan;
end
%
% if job.isTransformed(find(job.mergeId == pGrainId(ii)))
% [dBlockNew{ii},~,~] = calcBlockWidth(job,pGrain,pGrainId(ii),cGrains{ii});
% else
% dBlockNew{ii} = nan;
% end
end

end
Expand Down

0 comments on commit e22891c

Please sign in to comment.