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

gtCalculateGrain: updated parallel version

parent c110bd61
No related branches found
No related tags found
No related merge requests found
......@@ -184,7 +184,6 @@ theta4 = theta([1 1 1 1], :);
plcry4 = plcry(:, :, [1 1 1 1]);
plsamd4 = pl_samd(:, :, [1 1 1 1]);
if (isempty(app.ref_omind))
%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % Following the convention of the matching output, the omega value
......@@ -309,7 +308,7 @@ dvecsam = gtGeoLab2Sam(dveclab, rot_l2s, labgeo, samgeo, true);
rot_s2l = permute(rot_l2s, [2 1 3]);
gcsam_v = gcsam(ones(1, size(rot_l2s, 3)), :) + shifts_sam;
gclab_v = gtGeoSam2Lab(gcsam_v, rot_s2l, labgeo, samgeo, false);
gclab_v_t = gtGeoSam2Lab(gcsam_v, rot_s2l, labgeo, samgeo, false)';
% Lorentz factor for the given projections (note that eq. 4.1 from page 36
% in Henning's book is not correct)
......@@ -336,7 +335,7 @@ grain.allblobs.srot = rot_l2s; % Sample->Lab (!) rotation coordinate transf
for n = 1:numel(detgeo)
% u,v,w coordinates on the detector
uvw = gtFedPredictUVWMultiple([], dveclab', gclab_v', ...
uvw = gtFedPredictUVWMultiple([], dveclab', gclab_v_t, ...
detgeo(n).detrefpos', detgeo(n).detnorm', detgeo(n).Qdet, ...
[detgeo(n).detrefu, detgeo(n).detrefv]', om', labgeo.omstep)';
......
......@@ -348,11 +348,13 @@ eta = gtGeoEtaFromDiffVec(dveclab, labgeo);
dvecsam = gtGeoLab2Sam(dveclab, rot_l2s, labgeo, samgeo, true);
% Let's convert grain center Sam -> Lab
[~, shifts_sam] = gtMatchGetSampleShifts(parameters, om);
rot_s2l = permute(rot_l2s, [2 1 3]);
gcsam_v = permute(gcsam, [1 3 2]);
gcsam_v = gcsam_v(ones(1, size(rot_l2s, 3)/num_grains), :, :);
gcsam_v = reshape(gcsam_v, [], 3);
gclab_v = gtGeoSam2Lab(gcsam_v, rot_s2l, labgeo, samgeo, false);
gcsam_v = reshape(gcsam_v, [], 3) + shifts_sam;
gclab_v_t = gtGeoSam2Lab(gcsam_v, rot_s2l, labgeo, samgeo, false)';
% Lorentz factor for the given projections (note that eq. 4.1 from page 36
% in Henning's book is not correct)
......@@ -363,7 +365,7 @@ ondet = cell(num_dets, 1);
uvw = cell(num_dets, 1);
for n = 1:num_dets
% u,v,w coordinates on the detector
uvw{n} = gtFedPredictUVWMultiple([], dveclab', gclab_v', ...
uvw{n} = gtFedPredictUVWMultiple([], dveclab', gclab_v_t, ...
detgeo(n).detrefpos', detgeo(n).detnorm', detgeo(n).Qdet, ...
[detgeo(n).detrefu, detgeo(n).detrefv]', om', labgeo.omstep);
......
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