calcCluster edit page

sort orientations into clusters

Syntax

[c,center] = calcCluster(ori,'halfwidth',2.5*degree)
[c,center] = calcCluster(ori,'numCluster',n,'method','hierarchical')
[c,center] = calcCluster(ori,'maxAngle',omega,'method','hierarchical')

Input

ori orientation
n number of clusters
omega maximum angle

Output

c list of clusters
center center of the clusters

Example

% generate orientation clustered around 5 centers
cs = crystalSymmetry('432');
center = orientation.rand(5,cs);
odf = unimodalODF(center,'halfwidth',5*degree)
ori = odf.discreteSample(1500);
odf = SO3FunRBF (432 → xyz)
 
  <strong>multimodal components</strong>
  kernel: de la Vallee Poussin, halfwidth 5°
  center: 5 orientations
 
  Bunge Euler angles in degree
     phi1     Phi    phi2  weight
  349.843 120.439 215.593     0.2
  355.671 55.3302 53.5956     0.2
  311.093 40.0329 323.897     0.2
  139.998  34.165 162.142     0.2
  163.707 83.3058  74.042     0.2
% find the clusters and its centers
[cId,centerRec] = calcCluster(ori,'silent');
...............
% visualize result
for i = 1:length(centerRec)
plot(ori(cId==i),'axisAngle')
hold on
plot(centerRec(i),'MarkerFaceColor','k','MarkerSize',15)
end
hold off