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

smooth breaks consistency between pixels and image #1583

Closed abuts closed 6 months ago

abuts commented 7 months ago

smooth algorithm works well on dnd object making image more pleasent to eye. When it is applied to sqw object, it chagnes image only so recompute_bin_data would return different result

This is not good as by default it is assumed that pixels and image are consistent between each other. smooth should be either prohibited on sqw or it should change PixelData to be consistent with image.

tgperring commented 7 months ago

Perhaps the best thing is to output a dnd object, not an sqw object? That way we avoid the inconsistency problem, and then interpolating pixels, which would contravene the independence of the pixel data.

abuts commented 7 months ago

Or may be just return DND. The question is do we need smooth pixels for any purpose

tgperring commented 7 months ago

That's exactly what I meant.

abuts commented 7 months ago

Do we need smooth pixels? If we just use resulting dnd in binary operations and plotting then certainly not. But if one wants something more advanced, like change pixels not by setting them all to image values but modifying according to some law (e.g. multiply them by some walue to have pixels avarage in cell equal to cell signal or smooth with something like option -set_pixels in remplicate) than it may be beneficial to modify pixels too.

I do not see such requests at the moment but may be @tgperring does.