From 9995d07bb7b7df9b3e06bf14c804387832580e92 Mon Sep 17 00:00:00 2001 From: abuts Date: Fri, 27 Sep 2024 13:36:00 +0100 Subject: [PATCH] Re #1750 comments on situation when symmetry operation should or should not be used. --- horace_core/sqw/@sqw/private/cut_accumulate_data_.m | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/horace_core/sqw/@sqw/private/cut_accumulate_data_.m b/horace_core/sqw/@sqw/private/cut_accumulate_data_.m index 61ce84f068..1eb85d243b 100644 --- a/horace_core/sqw/@sqw/private/cut_accumulate_data_.m +++ b/horace_core/sqw/@sqw/private/cut_accumulate_data_.m @@ -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}; @@ -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