mantid icon indicating copy to clipboard operation
mantid copied to clipboard

Results table should give average for co-add

Open AnthonyLim23 opened this issue 4 years ago • 7 comments

Load EMU 20918-20 Click co-Add Go to fitting and do a fit Go the results table tab and tick sample temp Press the Output Results Look at the table and the value is 200, it should be the average (180+190+200)/3

AnthonyLim23 avatar Apr 27 '21 14:04 AnthonyLim23

Related to #30254

Matt-Cumber avatar Apr 27 '21 15:04 Matt-Cumber

the sample logs for the co-added data is wrong. So the problem is at the loading stage with the plus alg


a = Load("EMU20918")
b = Load("EMU20919")


c = a+b

for ws in [a,b,c]:
    run = ws[0].run()
    print(run.getLogData('sample_temp').value)

so we will need to manually average the sample logs when combining the data

https://github.com/mantidproject/mantid/blob/master/scripts/Muon/GUI/Common/utilities/load_utils.py#L276

AnthonyLim23 avatar Jun 22 '21 15:06 AnthonyLim23

https://docs.mantidproject.org/nightly/algorithms/MergeRuns-v1.html might be a good solution instead of using plus. We would need to make sure we copy all of the logs over correctly

AnthonyLim23 avatar Jun 22 '21 16:06 AnthonyLim23

I've been looking into this and MergeRuns could be a good solution. It looks like it uses the Instrument Parameter File for the default merging behaviour for sample logs. Otherwise you can add to or override the defaults to:-

  • Sum
  • Combine as a time series
  • Combine as a list
  • Rebin if the bins are different

As well as allowing to set warnings/failure notifications as relevant.

However it does not look like we can override and average anything. Could this be something we set in the Instrument Parameter file & would we want to?

If not then we'd need to look at using MergeRuns with some additional code to handle anything that falls outside of the extras MergeRuns currently offers. It still seems like a better solution than writing a completely new piece of code that is potentially duplicating MergeRuns.

sf1919 avatar Jun 29 '21 14:06 sf1919

This issue has been automatically marked as stale because it has not had activity in 6 months. It will be closed in 7 days if no further activity occurs. Allowing issues to close as stale helps us filter out issues which can wait for future development time. All issues closed by stale bot act like normal issues; they can be searched for, commented on or reopened at any point. If you'd like a closed stale issue to be considered, feel free to either re-open the issue directly or contact a developer. To extend the lifetime of an issue please comment below, it helps us see that this is still affecting you and you want it fixed in the near-future. Extending the lifetime of an issue may cause the development team to prioritise it over other issues, which may be closed as stale instead.

stale[bot] avatar Dec 27 '21 12:12 stale[bot]

This issue has been closed automatically. If this still affects you please re-open this issue with a comment or contact us so we can look into resolving it.

stale[bot] avatar Jan 03 '22 12:01 stale[bot]

This issue has been automatically marked as stale because it has not had activity in 6 months. It will be closed in 7 days if no further activity occurs. Allowing issues to close as stale helps us filter out issues which can wait for future development time. All issues closed by stale bot act like normal issues; they can be searched for, commented on or reopened at any point. If you'd like a closed stale issue to be considered, feel free to either re-open the issue directly or contact a developer. To extend the lifetime of an issue please comment below, it helps us see that this is still affecting you and you want it fixed in the near-future. Extending the lifetime of an issue may cause the development team to prioritise it over other issues, which may be closed as stale instead.

github-actions[bot] avatar May 12 '24 00:05 github-actions[bot]

This issue has been closed automatically. If this still affects you please re-open this issue with a comment or contact us so we can look into resolving it.

github-actions[bot] avatar May 22 '24 00:05 github-actions[bot]