Skip to content
Snippets Groups Projects
Commit b8f8f092 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

gtCalculateGrain: fixed missed updating of hklsp when swapping components

parent 05cf9734
No related branches found
No related tags found
No related merge requests found
......@@ -187,6 +187,7 @@ pls4(:, chind4, [1, 3]) = pls4(:, chind4, [3, 1]);
om4([1, 3], chind4) = om4([3, 1], chind4);
omind4([1, 3], chind4) = omind4([3, 1], chind4);
rot_l2s_4(:, :, chind4, [1, 3]) = rot_l2s_4(:, :, chind4, [3, 1]);
hklsp4(chind4, :, [1, 3]) = hklsp4(chind4, :, [3, 1]);
chind4 = om4(2, :) > om4(4, :);
......@@ -195,6 +196,7 @@ pls4(:, chind4, [2, 4]) = pls4(:, chind4, [4, 2]);
om4([2, 4], chind4) = om4([4, 2], chind4);
omind4([2, 4], chind4) = omind4([4, 2], chind4);
rot_l2s_4(:, :, chind4, [2, 4]) = rot_l2s_4(:, :, chind4, [4, 2]);
hklsp4(chind4, :, [2, 4]) = hklsp4(chind4, :, [4, 2]);
%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Four omegas of the plane normal (1-3 and 2-4 are the two Friedel pairs):
......
......@@ -166,7 +166,7 @@ pl_labd = gtGeoSam2Lab(pl_samd', eye(3), labgeo, samgeo, true, false)';
% Four omegas of the plane normal (1-3 and 2-4 are the two Friedel pairs):
% pls is plus or minus pl, and St is the rotation tensor per each omega
[om4, pllab4, pls4, rot4, omind4] = gtFedPredictOmegaMultiple(pl_labd, ...
[om4, pllab4, pls4, rot_l2s_4, omind4] = gtFedPredictOmegaMultiple(pl_labd, ...
sinth, labgeo.beamdir', labgeo.rotdir', rotcomp, []);
% Delete those where no reflection occurs
......@@ -214,7 +214,8 @@ pllab4(:, chind4, [1, 3]) = pllab4(:, chind4, [3, 1]);
pls4(:, chind4, [1, 3]) = pls4(:, chind4, [3, 1]);
om4([1, 3], chind4) = om4([3, 1], chind4);
omind4([1, 3], chind4) = omind4([3, 1], chind4);
rot4(:, :, chind4, [1, 3]) = rot4(:, :, chind4, [3, 1]);
rot_l2s_4(:, :, chind4, [1, 3]) = rot_l2s_4(:, :, chind4, [3, 1]);
hklsp4(chind4, :, [1, 3]) = hklsp4(chind4, :, [3, 1]);
chind4 = om4(2, :) > om4(4, :);
......@@ -222,7 +223,8 @@ pllab4(:, chind4, [2, 4]) = pllab4(:, chind4, [4, 2]);
pls4(:, chind4, [2, 4]) = pls4(:, chind4, [4, 2]);
om4([2, 4], chind4) = om4([4, 2], chind4);
omind4([2, 4], chind4) = omind4([4, 2], chind4);
rot4(:, :, chind4, [2, 4]) = rot4(:, :, chind4, [4, 2]);
rot_l2s_4(:, :, chind4, [2, 4]) = rot_l2s_4(:, :, chind4, [4, 2]);
hklsp4(chind4, :, [2, 4]) = hklsp4(chind4, :, [4, 2]);
%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Four omegas of the plane normal (1-3 and 2-4 are the two Friedel pairs):
......@@ -232,7 +234,7 @@ pllab4(:, :, [2, 3]) = pllab4(:, :, [3, 2]);
pls4(:, :, [2, 3]) = pls4(:, :, [3, 2]);
om4([2, 3], :) = om4([3, 2], :);
omind4([2, 3], :) = omind4([3, 2], :);
rot4(:, :, :, [2, 3]) = rot4(:, :, :, [3, 2]);
rot_l2s_4(:, :, :, [2, 3]) = rot_l2s_4(:, :, :, [3, 2]);
hklsp4(:, :, [2, 3]) = hklsp4(:, :, [3, 2]);
%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -250,7 +252,7 @@ pllab = reshape(permute(pllab4, [1 3 2]), 3, []);
pls = reshape(permute(pls4, [1 3 2]), 3, []);
plorig = reshape(permute(plorig4, [1 3 2]), 3, []);
rot_l2s = reshape(permute(rot4, [1 2 4 3]), 3, 3, []);
rot_l2s = reshape(permute(rot_l2s_4, [1 2 4 3]), 3, 3, []);
thetatypesp = reshape(thetatypesp4', [], 1);
hkl = reshape(permute(hkl4, [3 1 2]), [], num_hkl_indxs);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment