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
274 stars 182 forks source link

why is plottingConvention a handle class? #2048

Closed vtvivian closed 1 month ago

vtvivian commented 5 months ago

What do you want to do? Load EBSD data with different plotting conventions

What data do you have? EBSD maps from multiple SEMs and manufacturers

What code do you use? Please provide minimalist code with code in the following form

% load the data
ebsd1 = EBSD.load('file1.txt');
ebsd1.plottingConvention.east = -xvector;
ebsd1.plottingConvention.outOfScreen = zvector;

ebsd2 = EBSD.load('file2.txt');
ebsd2.plottingConvention.north= vector3d.X;
ebsd2.plottingConvention.outOfScreen=vector3d.Z;

What result do you get when I set the plotting convention for ebsd2, ebsd1 changes as well, because plottingConvention is defined as a handle class

ebsd1.plottingConvention

ans = plottingConvention

  outOfScreen: (0,0,1) 
  north      : (1,0,0) 
  east       : (0,-1,0)

ebsd2.plottingConvention

ans = plottingConvention

  outOfScreen: (0,0,1) 
  north      : (1,0,0) 
  east       : (0,-1,0)

What result do you expect ebsd1 and ebsd2 are independent objects and should store their plotting conventions independently

ebsd1.plottingConvention

ans = plottingConvention

  outOfScreen: (0,0,1) 
  north      : (0,-1,0)
  east       : (-1,0,0)

ebsd2.plottingConvention

ans = plottingConvention

  outOfScreen: (0,0,1) 
  north      : (1,0,0) 
  east       : (0,-1,0)

What MTEX version do you use? 6.0.beta2