Skip to content
Snippets Groups Projects
Commit 54345c43 authored by Laura Nervo's avatar Laura Nervo Committed by Nicola Vigano
Browse files

gtGetReflections : replaced sym with symm, not to be confused with the...

gtGetReflections : replaced sym with symm, not to be confused with the function sym() which uses the symbolic toolbox licence

Signed-off-by: default avatarLaura Nervo <laura.nervo@esrf.fr>

git-svn-id: https://svn.code.sf.net/p/dct/code/trunk@630 4c865b51-4357-4376-afb4-474e03ccb993
parent 3ef96488
No related branches found
No related tags found
No related merge requests found
function hkl_reflections = gtnewGetReflections(hkl)
function hkl_reflections = gtGetReflections(hkl)
% from input hkl [h k l], return matrix(n x 3) of all symmetry related
% reflections. Uses Riso script GetCubicSymOp
%get symmetry operators
sym = gtGetCubicSymOp;
symm = gtGetCubicSymOp();
%apply to input reflection
for i=1:length(sym)
hkl_reflections(i,:) = hkl*sym(i).g;
for i=1:length(symm)
hkl_reflections(i,:) = hkl*symm(i).g;
end
% %remove duplicates
% dummy=[];counter=1;
% for i=1:length(sym)
% for j=(i+1):length(sym)
% if hkl_reflections(i,:) == hkl_reflections(j,:)
% dummy(counter)=i;
% counter=counter+1;
% end
% end
% end
% hkl_reflections(dummy,:)=[];
hkl_reflections=unique(hkl_reflections, 'rows');
end
......@@ -6,7 +6,7 @@ function hkil_reflections = gtGetReflections_sab(hkil)
load('parameters.mat');
if parameters.cryst.spacegroup==663 || parameters.cryst.spacegroup==194 || parameters.cryst.spacegroup==167
sym = gtGetHexagonalSymOp_sab();
symm = gtGetHexagonalSymOp_sab();
else
disp('spacegroup not supported')
return
......@@ -14,21 +14,14 @@ end
%apply to input reflection
for i=1:length(sym)
hkil_reflections(i,:) = hkil*sym(i).g;
for i=1:length(symm)
if size(hkil,2) == 4
hkil_reflections(i,:) = hkil*symm(i).g;
elseif size(hkil,2) == 3
hkil_reflections(i,:) = hkil*symm(i).g3;
end
end
hkil_reflections=unique(hkil_reflections, 'rows');
% %remove duplicates
% dummy=[];counter=1;
% for i=1:length(sym)
% for j=(i+1):length(sym)
% if hkil_reflections(i,:) == hkil_reflections(j,:)
% dummy(counter)=i;
% counter=counter+1;
% end
% end
% end
% hkil_reflections(dummy,:)=[];
end
\ No newline at end of file
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