Any thoughts of why this (below) isn't working? The twinning law is 85º<02-21>.
Apparently the error is in the "isTwinning" line, but the code is almost the exact copy of the example in the documentation page.
Sdir = symmetrise(Miller(0,2,-2,1,ebsd('Hematite').CS,'UVTW'));
R_twin = rotation('axis',Sdir,'angle',85*degree);
isTwinning = angle(grains.boundary('He','He').misorientation,R_twin) < 5*degree;
R_twin_bounds = grains.boundary(isTwinning);
Cheers.
R_twin = orientation('axis',Sdir,'angle',85*degree,ebsd('Hematite').CS,ebsd('Hematite').CS);%// define the misorientation axis
Sdir = Miller(0,2,-2,1,ebsd('Hematite').CS,'UVTW');
%// define the twinning misorientation
R_twin = orientation('axis',Sdir,'angle',85*degree,ebsd('Hematite').CS,ebsd('Hematite').CS);
%// check the angle between boundary misorientations and twinning misorientation is small
gB_He = grains.boundary('He','He');
isTwinning = angle(gB_He.misorientation,R_twin) < 5*degree;
R_twin_bounds = gB_He(isTwinning);Hi Carlos,I think the mistake is that you symmetrise the rotational axis which gives you Sdir. As an result R_twin is a list of rotations and angle( ... ) does not know what to do.When working with misorientations MTEX automatically knows that he has to consider symmetric equivalent orientations.Please try the following
%// define the misorientation axis
Sdir = Miller(0,2,-2,1,ebsd('Hematite').CS,'UVTW');
%// define the twinning misorientation
R_twin = orientation('axis',Sdir,'angle',85*degree,ebsd('Hematite').CS,ebsd('Hematite').CS);
%// check the angle between boundary misorientations and twinning misorientation is small
isTwinning = angle(grains.boundary('He','He').misorientation,R_twin) < 5*degree;
R_twin_bounds = grains.boundary(isTwinning);
--
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 http://groups.google.com/group/mtexmail.
For more options, visit https://groups.google.com/d/optout.