mantidproject / mantid

Main repository for Mantid code
https://www.mantidproject.org
GNU General Public License v3.0
211 stars 124 forks source link

AsymmetryCalc should keep X bin boundaries #16858

Closed tom-perkins closed 3 years ago

tom-perkins commented 8 years ago

At present, AsymmetryCalc takes an input histogram workspace (muon data after initial processing) and produces a point data workspace as output.

This should be changed so that the output is a histogram workspace. From James Lord:

The "raw" muon data, perhaps after binning, grouping, and exponential lifetime correction, is a Histogram (counts per unit time-of-flight). The asymmetry data is still binned data with the same X boundaries, but it's meaningless to normalise Y to the bin size, there's no concept of "asymmetry per microsecond" or "total asymmetry per bin". It's the same as dividing a neutron spectrum by a monitor to get scattering probability. It's still best fitted with "histogram-aware" functions if there are any sharp features such as rapid oscillation or strong relaxation. ... Yes, I think AsymmetryCalc should keep the X bin boundaries and perhaps set a new flag to say this data isn't now "normalisable". RemoveExpDecay should do likewise. It probably doesn't make sense to overlay raw data and asymmetry as the Y units are different, but asymmetry and corrected counts from RemoveExpDecay could quite reasonably be compared.

  • RemoveExpDecay keeps the X data as whatever the input was, i.e. histo->histo - leave as is.
  • AsymmetryCalc to do the same - keep X bin boundaries
  • If you try to overlay raw data and asymmetry, you would currently get a warning that the Y units are different, as expected. But comparing asymmetry and corrected counts also gives a warning (as one is histogram, one is point data) and you should be able to do this as above.

(see also #16845)

tom-perkins commented 8 years ago

There is an option in MantidPlot to normalise Y to the bin size when plotting (View/Preferences/2D Plots/Normalize histogram to bin width). If this is set, we need to make sure that this does not happen when plotting the histogram output of AsymmetryCalc - as James explains above, this would be meaningless.

(At the moment the output of AsymmetryCalc is point data so this doesn't apply.)

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you feel this is incorrect please comment to keep it alive, with a reason why.

To prevent closure, e.g. for long-term planning issues, add the "Never Stale" label.