[grains,ebsd.grainId] = calcGrains(ebsd('Copper'),'angle',15*degree);gb = grains.boundary('Copper','Copper'); gbo1=grains(gb.grainId(:,1)).meanOrientation; %pairwise orientations along boundarygbo2=grains(gb.grainId(:,2)).meanOrientation; mori=gbo1.\gbo2;
%get CSL boundaries based on Brandon's Criterioncondition3=angle(mori,CSL(3,ebsd('Copper').CS))<8.66*degree;condition5=angle(mori,CSL(5,ebsd('Copper').CS))<6.7*degree;condition7=angle(mori,CSL(7,ebsd('Copper').CS))<5.67*degree;condition9=angle(mori,CSL(9,ebsd('Copper').CS))<5*degree;condition11=angle(mori,CSL(11,ebsd('Copper').CS))<4.523*degree;%condition13=angle(mori,CSL(13,ebsd('Copper').CS))<4.16*degree;condition15=angle(mori,CSL(15,ebsd('Copper').CS))<3.873*degree;%condition17=angle(mori,CSL(17,ebsd('Copper').CS))<3.638*degree;%condition19=angle(mori,CSL(19,ebsd('Copper').CS))<3.44*degree;%condition21=angle(mori,CSL(21,ebsd('Copper').CS))<3.273*degree;condition23=angle(mori,CSL(23,ebsd('Copper').CS))<3.128*degree;%condition25=angle(mori,CSL(25,ebsd('Copper').CS))<3*degree;%condition27=angle(mori,CSL(27,ebsd('Copper').CS))<2.887*degree;%condition29=angle(mori,CSL(29,ebsd('Copper').CS))<2.785*degree;
plot(gb,'lineColor','black','linewidth',1.5,'DisplayName','HAGB');hold on;plot(gb(condition3),'lineColor','g','linewidth',1.5,'DisplayName','\Sigma3');plot(gb(condition5),'lineColor','y','linewidth',1.5);plot(gb(condition7),'lineColor','y','linewidth',1.5);plot(gb(condition9),'lineColor','b','linewidth',1.5,'DisplayName','\Sigma9');plot(gb(condition11),'lineColor','y','linewidth',1.5);plot(gb(condition15),'lineColor','y','linewidth',1.5);plot(gb(condition23),'lineColor','y','linewidth',1.5,'DisplayName','\Sigma<=29');hold off;csl27 = CSL(27,ebsd2('Copper').CS);csl27(3) = [];
condition3=angle(mori,CSL(3,ebsd2('Copper').CS))<8.66*degree;condition5=angle(mori,CSL(5,ebsd2('Copper').CS))<6.7*degree;condition7=angle(mori,CSL(7,ebsd2('Copper').CS))<5.67*degree;condition9=angle(mori,CSL(9,ebsd2('Copper').CS))<5*degree;condition11=angle(mori,CSL(11,ebsd2('Copper').CS))<4.523*degree;%condition13=angle(mori,CSL(13,ebsd2('Copper').CS))<4.16*degree; %dual anglescondition15=angle(mori,CSL(15,ebsd2('Copper').CS))<3.873*degree;%condition17=angle(mori,CSL(17,ebsd2('Copper').CS))<3.638*degree; %dual angles%condition19=angle(mori,CSL(19,ebsd2('Copper').CS))<3.44*degree; %dual angles%condition21=angle(mori,CSL(21,ebsd2('Copper').CS))<3.273*degree; %dual anglescondition23=angle(mori,CSL(23,ebsd2('Copper').CS))<3.128*degree;%condition25=angle(mori,CSL(25,ebsd2('Copper').CS))<3*degree; %dual anglescondition27=angle(mori,(csl27))<2.887*degree; %dual angles%condition29=angle(mori,CSL(29,ebsd2('Copper').CS))<2.785*degree; %dual anglesangle(mori,csl27)angle_outer(mori,csl27) condition27=any(angle_outer(mori,csl27)<2.887*degree,2)condition27 = gB.isTwinning(csl27,2.887*degree)gbo1=grains(gb.grainId(:,1)).meanOrientation; %pairwise orientations along boundarygbo2=grains(gb.grainId(:,2)).meanOrientation; mori=gbo1.\gbo2;
condition27=angle(mori,CSL(27,ebsd('Copper').CS))<2.887*degree;
%courtesy of RüdigerThanks Ralf,I understand, but the problem that I was encountering when using "condition27 = gB.isTwinning(csl27,2.887*degree)" was that it colours grain boundaries based on local misorientation between grains. I was looking to colour grain boundaries based on mean grain orientation, which is why I started doing "condition27=angle(mori,CSL(27,ebsd('Copper').CS))<2.887*degree;"Defining my grain boundaries like so defines the CSL boundaries by mean grain orientation.
--
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+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/mtexmail.
For more options, visit https://groups.google.com/d/optout.
lowangle = gB.misorientation.angle./ degree;binc = [0,15,60];[~,id] = histc(lowangle,binc);
plot(gB(id==1),'lineColor',[0.8 0.8 0.8],'linewidth',1,'DisplayName','Low')
gbo1=grains(gb.grainId(:,1)).meanOrientation; gbo2=grains(gb.grainId(:,2)).meanOrientation; mori=gbo1.\gbo2;
binc = [0,15,60];[~,id] = histc(mori,binc);To unsubscribe from this group and stop receiving emails from it, send an email to mtexmail+u...@googlegroups.com.
> To unsubscribe from this group and stop receiving emails from it, send an email to mtexmail+unsubscribe@googlegroups.com.
> Visit this group at https://groups.google.com/group/mtexmail.
> For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com.
sigma3length = condition3.segLength