Issues in data rotation

104 views
Skip to first unread message

Maël Allard

unread,
Dec 16, 2019, 10:13:29 AM12/16/19
to MTEX
Hi mtex community,

I'm trying to rotate my ebsd data (pole figures and maps), but doing so my texture indexes (J and  M) are not the same before and after rotation as well as what is plotted in pole figures
(texture indexes being yet consistent with pole figures). Also, in the same script when I create a grain subset by selection on shape and misorientation parameters (GAM,
Equivalent Diameter and Tortuosity) it doesn't always corresponds to the same number of pixels before and after rotation.
Is the way the rotation is done wrong ?

Thanks in advance,

Maël Allard

(Nb: I'm using mtex 5.2.3 in Matlab 2018a)

% Rotate data
ebsd
= rotate(ebsd,rotation('axis',zvector,'angle',-90*degree))

% Parameters used to define the subset
% GAM
GAM
= accumarray(ebsd('indexed').grainId, KAM(ebsd('indexed'),'threshold',10*degree)./degree, size(ebsd), @nanmean);

% Equivalent diameter
Area = area(grains);
eq_diameter
= 2 * sqrt(Area / pi)

% convex hull (envelope of grains)
[ch_perim, ch_Area] = convexhull_measures(grains);
perim
= perimeter(grains);

% Tortuosity
tortuosity
= perim ./ ch_perim;


CPO_plag.jpg
CPO_plag_rotated.jpg

Rüdiger Kilian

unread,
Dec 17, 2019, 1:16:58 AM12/17/19
to mtex...@googlegroups.com
Hi Mael,
could you also add how you'd derive the J-index?
Cheers,
Rüdiger

Maël Allard

unread,
Dec 17, 2019, 3:04:26 AM12/17/19
to MTEX
Hi Rüdiger,

Yes sure, here it is:
odf_plag = calcDensity(ebsd('Plagioclase').orientations,'halfwidth',10*degree)
% J index
Jindex_plag = textureindex(odf_plag)
% M index
Mindex_plag = calcMIndex(odf_plag)


Cheers,
Maël

Ralf Hielscher

unread,
Dec 17, 2019, 3:10:34 AM12/17/19
to mtex...@googlegroups.com
Hi Maël,

obviously the J and M index should not change when rotating the sample. If this happens for your data set then this seems to be a bug. Could you provide us with a small, representative data set and a short script illustrating the issue.

Ralf.




********************************************************************
Ralf Hielscher                   Tel: +371-531-38556
Fakultät für Mathematik               +371-531-22200 (Sekr.)
Technische Universität Chemnitz  Fax: +371-531-22109
Reichenhainer Str. 39            E-mail: ralf.hi...@mathematik.tu-chemnitz.de
D-09126 Chemnitz                 http://www.tu-chemnitz.de/~rahi
********************************************************************


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/mtexmail/71177822-8364-4a46-987d-7577bebc20a7%40googlegroups.com.

Maël Allard

unread,
Dec 17, 2019, 9:42:21 AM12/17/19
to MTEX
Hi Ralf,

Files are in the downloading link:


Thanks again for your responsiveness,

Maël

Rüdiger Kilian

unread,
Dec 17, 2019, 12:23:56 PM12/17/19
to mtex...@googlegroups.com
Hi,
I think this is indeed a bug and I guess it's related to this one here
in geometry/@quaternion/times.m

Undoing it resolves it for me.

Simple test:
%some input
o = discreteSample(unimodalODF(orientation.rand(1,crystalSymmetry('432')),'halfwidth',15*degree),1000);
odf = calcDensity(o,'halfwidth',10*degree);
% rotated orientations and computer odf again
rot=rotation('axis',zvector,'angle',-90*degree);
odfr = calcDensity(rot*o,'halfwidth',10*degree);

J1 = textureindex(odf)
J2 = textureindex(odfr)


Cheers,
Rüdiger



Rüdiger Kilian

unread,
Dec 17, 2019, 12:35:40 PM12/17/19
to mtex...@googlegroups.com
Sorry, previous message was a bit premature, it not due to this commit it seems.
Rüdiger

Test with '-1' or '1' for example:

odfin = unimodalODF(orientation.rand(1,crystalSymmetry('-1')),'halfwidth',15*degree);
o=discreteSample(odfin,1000)

odf = calcDensity(o,'halfwidth',10*degree);
% rotated orientations and computer odf again
rot=rotation('axis',zvector,'angle',-90*degree);
or = rot.*o;
odfr = calcDensity(or,'halfwidth',10*degree);

Rüdiger Kilian

unread,
Dec 17, 2019, 12:40:16 PM12/17/19
to mtex...@googlegroups.com
Adding 'exact' in calcDensity seems to be a workaround.

Cheers,
Rüdiger

Ralf Hielscher

unread,
Dec 17, 2019, 3:00:24 PM12/17/19
to MTEX
Hi Mael,

this was indeed an extremely bad bug that effects many computations. I'm very grateful that you reported it. The bug fix is included in the new version MTEX 5.2.6 which I released just now.

Thank you very much.

Ralf.

Maël Allard

unread,
Dec 18, 2019, 3:03:40 AM12/18/19
to MTEX
Hi Ralf and Rüdiger,

Thanks a lot to both of you for having fix this bug !!

Gratfully,

Maël
Reply all
Reply to author
Forward
0 new messages