Skip to content
Snippets Groups Projects
Commit b8756b8b authored by Wolfgang Ludwig's avatar Wolfgang Ludwig
Browse files

Come back to hklsp (and other sp fields) without entries for -h-k-l reflections

parent d6be2ff1
No related branches found
No related tags found
No related merge requests found
......@@ -58,7 +58,7 @@ if exist(samplefile, 'file')
sample = GtSample.loadFromFile(samplefile);
else
disp('Can not find 4_grains/sample.mat - have you run gtSetupForwardSimulation?');
exit;
return;
end
% Get reconstruction parameters
......
......@@ -31,7 +31,7 @@ function xyz = gtCrystHKL2Cartesian(hklsp, Bmat)
% plane):
% The [b1 b2 b3] matrix is in principal equal to the B matrix as defined in
% Poulsen's 3DXRD book, Chapter 3, page 26.
xyz = Bmat * hklsp;
xyz = Bmat * double(hklsp);
% Normalise xyz
xyzl = sqrt(sum(xyz .* xyz, 1));
......
......@@ -41,6 +41,10 @@ function results = gtSymmetricReflections(cryst,energy)
% from how xop dat file is processed
[~,crystal_system,~] = gtReadSpaceGroup(cryst.spacegroup);
% Get symmetry operators
symm = gtCrystGetSymmetryOperators(crystal_system, cryst.spacegroup);
hkltypes_used = double(cryst.hkl);
if size(hkltypes_used,2) > size(hkltypes_used,1)
hkltypes_used = hkltypes_used';
......@@ -61,13 +65,13 @@ mult = [];
% 4 columns needed for hexagonal
for ii = 1:size(hkltypes_used,1)
allhkls_i = gtCrystSignedHKLs(hkltypes_used(ii,:));
nhkls = size(allhkls_i,1);
hklsp = [hklsp; allhkls_i];
allhkls_i = gtCrystSignedHKLs(hkltypes_used(ii,:), symm);
nhkls = size(allhkls_i,1)/2;
hklsp = [hklsp; allhkls_i(nhkls+1:end,:)];
hkl = [hkl; repmat(hkltypes_used(ii,:),nhkls,1)];
thtype = [thtype; repmat(ii,nhkls,1)];
intensity = [intensity; repmat(cryst.int(ii),nhkls,1)];
mult = [mult; nhkls];
mult = [mult; nhkls*2];
end
Bmat = gtCrystHKL2CartesianMatrix(cryst.latticepar);
......
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