Skip to content

Commit

Permalink
Re #1750 comments on situation when symmetry operation should or shou…
Browse files Browse the repository at this point in the history
…ld not be used.
  • Loading branch information
abuts committed Sep 27, 2024
1 parent 3cad911 commit 9995d07
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions horace_core/sqw/@sqw/private/cut_accumulate_data_.m
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@
t_proj_start = tic;
end

% multiple projections here can appear only from multiple symmetries, so
% if only one projection is there, no symmetries will be used
apply_symmetries = num_proj > 1;

for iter = 1:num_chunks
% Get pixels that will likely contribute to the cut
chunk = block_chunks{iter};
Expand All @@ -215,14 +219,14 @@
iter, num_chunks, candidate_pix.num_pixels);
end

apply_symmetries = num_proj > 1;
for i = 1:num_proj

% Pix not sorted here
[npix, s, e, pix_ok, unique_runid_l, pix_indx, selected] = ...
targ_proj(i).bin_pixels(targ_axes(i), candidate_pix, npix, s, e);

if apply_symmetries
% if there are symmetries, we need to transform pixels and tag used
% pixels to avoid multiple usage of the same pixels.
if apply_symmetries
candidate_pix = sym{i}.transform_pix(candidate_pix, {}, selected);
candidate_pix = candidate_pix.tag(selected);
end
Expand Down

0 comments on commit 9995d07

Please sign in to comment.