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
281 stars 185 forks source link

Euler angles of random orientations inconsistent with Crystal Symmetry #1597

Open DorianDepriester opened 1 year ago

DorianDepriester commented 1 year ago

What do you want to do? I want to randomly generate numerous orientations from a given ODF, but it seems that the corresponding Euler angles don't match with the ranges given by the crystal symmetry.

What data do you have? ODF, crystal symmetry

What code do you use?

CS=crystalSymmetry('m-3m');                              % Consider a cubic symmetry,
[phi1_max, Phi_max, phi2_max]=CS.fundamentalRegionEuler  % check the range (seems consistent with https://mtex-toolbox.github.io/EulerAngleSections.html).
u=uniformODF(CS);
oris=u.discreteSample(5000);                             % Then, generate 5000 orientations from uniform distribution.
oris.CS                                                  % Check that the orientations have cubic symmetry as well.
[phi1,Phi,phi2]=Euler(oris);
max([phi1, Phi, phi2])                                   % and show the max value of Euler angles

What result do you get

phi1_max =

   6.283185307179586

Phi_max =

   1.570796326794897

phi2_max =

   1.570796326794897

ans = crystalSymmetry (show methods, plot)

  symmetry: m-3m   
  elements: 48     
  a, b, c : 1, 1, 1

ans =

   6.282688056635115   3.105842775740757   6.282239636330132

What result do you expect Euler angles should lie within the fundamental Euler space.

What MTEX version do you use? 5.8.0