pace-neutrons / Horace

Horace is a suite of programs for the visualization and analysis of large datasets from time-of-flight neutron inelastic scattering spectrometers.
https://pace-neutrons.github.io/Horace/stable/
GNU General Public License v3.0
8 stars 5 forks source link

Pixels not fully transformed in cut_sym #1620

Closed oerc0122 closed 6 months ago

oerc0122 commented 6 months ago

Currently cut with symmetry does not transform the pixels when they are rebinned in a symmetrised cut. This means that the pixels are binned appropriately, but the connection between pixels and image is broken.

The solution to this is to pass the symmetry operations all the way through to cut_accumulate_data_ which should transform the pixels following the cut akin to how symmetrise_sqw transforms the pixels.

abuts commented 6 months ago

A projection uses generic bin_pixels and generic transform_pix_to_img to bin pixels

pix_transformed = obj.transform_pix_to_img(pix_candidates);

transform_pix_to_img should be modified to form: [pix_transformed,pix_candidates] = obj.transform_pix_to_img(pix_candidates);

and if projection has symmetry operation attached to it (in additional property), pix_candidates should be transformed using symmetry too.

Alternatively, overload line_proj to line_proj_rotation & line_proj_folding which have transform_pix_to_img specialized.