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

GtOrientationSampling: fixed small bugs

parent c70e9a9d
No related branches found
No related tags found
No related merge requests found
function w_tab = gtGrainAnglesTabularFix360deg(w_tab, ref_int_ws, parameters)
num_images = gtGetTotNumberOfImages(parameters);
% Let's treat those blobs at the w edge 360->0
% (from the sampled orientations perspective)
opposite_int_ws = mod(ref_int_ws + num_images / 2, num_images);
gt_ref_int = opposite_int_ws > num_images / 2;
lt_ref_int = ~gt_ref_int;
opposite_int_ws_repmat = opposite_int_ws(:, ones(1, size(w_tab, 2)));
w_tab(gt_ref_int, :) = w_tab(gt_ref_int, :) ...
- num_images .* (w_tab(gt_ref_int, :) > opposite_int_ws_repmat(gt_ref_int, :));
w_tab(lt_ref_int, :) = w_tab(lt_ref_int, :) ...
+ num_images .* (w_tab(lt_ref_int, :) < opposite_int_ws_repmat(lt_ref_int, :));
end
\ No newline at end of file
......@@ -542,8 +542,10 @@ classdef GtOrientationSampling < handle
function delta_omegas = get_omega_deviations(self)
grs = [self.lattice(1).gr{:}];
ab = [grs(:).allblobs];
w_tab = [ab(:).omega] / gtGetOmegaStepDeg(self.parameters);
ref_int_ws = self.ref_gr.allblobs.omega(self.ondet(self.included));
w_tab = [ab(:).omega] / gtGetOmegaStepDeg(self.parameters, self.detector_index);
ref_int_ws = self.ref_gr.allblobs.detector(self.detector_index).uvw(self.ondet(self.included), 3);
w_tab = gtGrainAnglesTabularFix360deg(w_tab, ref_int_ws, self.parameters);
delta_omegas = ceil(max(w_tab, [], 2) - min(w_tab, [], 2));
......
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