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

CrystVector2STT: fixed small issue with permutation mode


(The problem still exists in the function gtVectorLab2Cryst, which has a non homogeneous definition of 'mode')

Signed-off-by: default avatarNicola Vigano <nicola.vigano@esrf.fr>
parent f94076b4
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,8 @@ function [rgb, Vsst, Vsst_p, Vc_symm] = gtCrystVector2SST(Vc, crystal_system, sy
% Here we want to do a vectorized call to get Vc_symm = symm * Vc
% It is simportant to get symmetry operator index as first index
Vc_symm = gtVectorLab2Cryst(Vc, symm, [2 3 1]);
Vc_symm = gtVectorLab2Cryst(Vc, symm, 1:3);
Vc_symm = permute(Vc_symm, [2 3 1]);
x = Vc_symm(:, :, 1);
y = Vc_symm(:, :, 2);
......@@ -60,24 +61,24 @@ function [rgb, Vsst, Vsst_p, Vc_symm] = gtCrystVector2SST(Vc, crystal_system, sy
% psi : angle from 001 axis to Vc vector
Vc_psi = acosd(z);
switch crystal_system
case {'cubic', 'cub'}
anglesR = 45 - Vc_chi; % red color proportional to (45 - chi)
minAngleR = 0;
maxAngleR = 45;
anglesB = Vc_phi; % blue color proportional to phi
minAngleB = 0;
maxAngleB = 45;
case {'hexagonal', 'hex'}
anglesR = 90 - Vc_psi; % red color proportional to (90 - psi)
minAngleR = 0;
maxAngleR = 90;
anglesB = Vc_phi; % blue color proportional to phi
minAngleB = 0;
maxAngleB = 30;
otherwise
gtError('gtCrystVector2SST:wrong_crystal_system', ...
'Unsupported crystal system!');
switch (crystal_system)
case {'cubic', 'cub'}
anglesR = 45 - Vc_chi; % red color proportional to (45 - chi)
minAngleR = 0;
maxAngleR = 45;
anglesB = Vc_phi; % blue color proportional to phi
minAngleB = 0;
maxAngleB = 45;
case {'hexagonal', 'hex'}
anglesR = 90 - Vc_psi; % red color proportional to (90 - psi)
minAngleR = 0;
maxAngleR = 90;
anglesB = Vc_phi; % blue color proportional to phi
minAngleB = 0;
maxAngleB = 30;
otherwise
gtError('gtCrystVector2SST:wrong_crystal_system', ...
'Unsupported crystal system!');
end
% Pick equiv that is in our triangle
......
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