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

feature request: set CS/SS of boundary.misorientation #154

Closed kilir closed 8 years ago

kilir commented 8 years ago

Hi Ralf, for certain reasons (actually I don't want the meanorientation calculated the way it is), instead of merging twinned grains, I set the ebsd to higher symmetry, calc grains, and set it back again. This works pretty well for this type of twinning, except that grainsD('q').boundary('q','q').misorientation.CS and ....SS still return the higher symmetry. Setting it manually informs me that: "In class 'grainBoundary', no set method is defined for Dependent property 'misorientation'. A Dependentproperty needs a set method to assign its value." However the meanOrientation is set as expected.

Is there any way to work around it?

csq= ebsd('q').CS
csq = crystalSymmetry (show methods, plot)
  mineral        : Quartz           
  color          : light blue       
  symmetry       : 321              
  a, b, c        : 4.9, 4.9, 5.4    
  reference frame: X||a*, Y||b, Z||c

cshq = crystalSymmetry('622','mineral', 'Quartz');
ebsd('q').CS=cshq;
[grainsD,ebsd.grainId,ebsd.mis2mean] = calcGrains(ebsd,'angle',10*degree);
ebsd('q').CS=csq;
grainsD('q').CS=csq;

grainsD('q').CS
ans = crystalSymmetry (show methods, plot)
  mineral        : Quartz           
  color          : light blue       
  symmetry       : 321              
  a, b, c        : 4.9, 4.9, 5.4    
  reference frame: X||a*, Y||b, Z||c

However:

grainsD('q').boundary('q','q').misorientation.CS
ans = crystalSymmetry (show methods, plot)
  mineral        : Quartz           
  symmetry       : 622              
  a, b, c        : 1, 1, 1          
  reference frame: X||a*, Y||b, Z||c

All the best, Rüdiger

kilir commented 8 years ago

Hi Ralf, just tried the fix, but for the above it doesn't do any difference. ...misorientation.CS is still not changed when the grain is assigned a different crystal symmetry. Is there anything else I have to consider? Cheers, Rüdiger

ralfHielscher commented 8 years ago

You are right. I missed something. Can you try it again?

Ralf.

kilir commented 8 years ago

Hello Ralf, yes, now it's working as expected. Thanks a lot, Rüdiger