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

gtCalculateGrain: use sample shifts in grain center calculation for topotomo

parent dbd63cfb
No related branches found
No related tags found
No related merge requests found
......@@ -421,8 +421,16 @@ for det_ind = app.det_ind
shifts_sam = 0;
end
gcsam_v = gcsam(ones(1, size(rot_l2s, 3)), :) + shifts_sam;
gclab_v_t = gtGeoSam2Lab(gcsam_v, rot_s2l, labgeo, samgeo, false)';
gcsam_v = gcsam(ones(1, size(rot_s2l, 3)), :) + shifts_sam;
if (is_dct)
gclab_v_t = gtGeoSam2Lab(gcsam_v, rot_s2l, labgeo, samgeo, false)';
elseif (is_topotomo)
rot_s2l_tr = gtGeoDiffractometerTensor(diff, 'sam2lab', false, ...
'angles_sam_tilt', tilts, 'angles_rotation', om, 'angles_basetilt', ph);
gclab_v_t = gtGeoSam2Lab(gcsam_v, rot_s2l_tr, labgeo, samgeo, false)';
gclab_v_t(:, 3:4:end)
end
% Lorentz factor for the given projections (note that eq. 4.1 from page 36
% in Henning's book is not correct)
......
......@@ -493,11 +493,17 @@ for det_ind = app.det_ind
shifts_sam = 0;
end
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) + shifts_sam;
gclab_v_t = gtGeoSam2Lab(gcsam_v, rot_s2l, labgeo, samgeo, false)';
if (is_dct)
gclab_v_t = gtGeoSam2Lab(gcsam_v, rot_s2l, labgeo, samgeo, false)';
elseif (is_topotomo)
rot_s2l_tr = gtGeoDiffractometerTensor(diff, 'sam2lab', false, ...
'angles_sam_tilt', tilts, 'angles_rotation', om, 'angles_basetilt', ph);
gclab_v_t = gtGeoSam2Lab(gcsam_v, rot_s2l_tr, labgeo, samgeo, false)';
end
% Lorentz factor for the given projections (note that eq. 4.1 from page 36
% in Henning's book is not correct)
......
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