mtex-toolbox / mtex

MTEX is a free Matlab toolbox for quantitative texture analysis. Homepage:
http://mtex-toolbox.github.io/
GNU General Public License v2.0
278 stars 183 forks source link

Bug in SO3FunHarmonic/max #1967

Closed kilir closed 7 months ago

kilir commented 11 months ago

I have a set of misorientations, computing an mdf works fine, however, if computed below a certain halfwith, max() returns something non-sensical. Since I cannot reproduce it with synthetic data, real data is attached below.

load('badmoris.mat')

%% getting the max of an mdf
mdf = calcDensity(bad_moris,'halfwidth',8*degree) % that works fine

plot(mdf,'contourf','axisAngle')

[~,mmori]=max(mdf)

hold on
plot(mmori,'MarkerFaceColor','r','axisAngle','MarkerSize',20 )
hold off

%% same for smaller halfwidth
mdf = calcDensity(bad_moris,'halfwidth',5*degree) % that is not fine

plot(mdf,'contourf','axisAngle')

[~,mmori]=max(mdf)

hold on
plot(mmori,'MarkerFaceColor','r','axisAngle','MarkerSize',20 )
hold off

Ok

ok

not OK

not_ok

badmoris.mat.zip

ralfHielscher commented 8 months ago

This is a problem in geometry/@symmetry/fundamentalRegionEuler.m which return a far to small region for angle phi2. @num3RIK can you have a look at this.

Ralf.

num3RIK commented 7 months ago

There occurred a problem by computation of the fundamental sector of equispacedSO3Grid. Now it should work.

kilir commented 7 months ago

Works perfectly!