Export Misorientation Data to file

75 views
Skip to first unread message

Xin Xu

unread,
Dec 6, 2017, 12:05:18 PM12/6/17
to MTEX
I was trying to save the misorientation information of grain boundary in the type of .txt or .csv

The EBSD data and code were attached. The code is to plot the misorientation of grain boundaries within 5 degree of a specific rotation (110)/30 degree. I would like to extract the misorientation information of those grain boundaries such as euler angles, etc. How would I do it? I tried fprintf(fileID, gB_Ce(ind)). It seems not working.

Thank you so much!

cs = ebsd('Ce O2').CS;
[grains,ebsd.grainId,ebsd.mis2mean] = calcGrains(ebsd('Ce O2'),'angle',0.5*degree);
gB=grains.boundary;
gB_Ce = grains.boundary('Ce O2','Ce O2');
rot = rotation('axis',vector3d(1,1,0),'angle',30*degree,cs);
ind = angle(gB_Ce.misorientation,rot)<5*degree;
close all
plot(gB,'micronbar','off')
hold on
plot(gB_Ce(ind),'lineWidth',2.5,'lineColor','r')
950_12H_F_2map14 4.crc

ruediger Kilian

unread,
Dec 6, 2017, 12:41:57 PM12/6/17
to mtex...@googlegroups.com
Hi Xin,
what exactly do you want to write to the file? The misorientations given as Euler angle?
E.g. dlmwrite('yourfile',grains.boundary('c','c').misorientation.Euler) ?

Are you sure that you want your definition of rot to be the way you’ve written it there?

Cheers,
Rüdiger



Xin Xu

unread,
Dec 6, 2017, 2:46:04 PM12/6/17
to MTEX
Hi Rüdiger,

Yes, I would like the misorientation infomation associated each GB. Euler angles should be enough.

E.g

GB Position or label     Misorientation in Euler Angle
#1,   (x, y)                          67 degree, 88 degree, 24 degree
....

I'm wondering if there is anything wrong with the definition of rot?

Should I write it like this rot = rotation('axis',Miller(1,1,0,cs),'angle',30*degree,cs,cs);?

Thank you!

Xin




在 2017年12月6日星期三 UTC-6上午11:41:57,ruediger Kilian写道:

ruediger Kilian

unread,
Dec 6, 2017, 4:00:17 PM12/6/17
to mtex...@googlegroups.com

> I'm wondering if there is anything wrong with the definition of rot?
>
> Should I write it like this rot = rotation('axis',Miller(1,1,0,cs),'angle',30*degree,cs,cs);?

I think if you use orientation('axis',Miller(1,1,0,cs),'angle',30*degree,cs,cs), instead of rotation it should be fine.
Cheers,
Rüdiger
Reply all
Reply to author
Forward
0 new messages