Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ewm7115 fix remove event background undersampling #456

Merged
merged 5 commits into from
Oct 24, 2024

Conversation

darshdinger
Copy link
Contributor

Description of work

This work is to facilitate the resolution of a defect in this implementation. The issue resulted in "under-binning" of the data.

Explanation of work

The logic implemented:

  1. Keep the original ws with events. Create a copy
  2. Convert the copy to histogram and fit the background
  3. Use the mantid algorithm ConvertToEventWorkspace on the background and convert this to an eventworksapce
  4. Subtract the Event Background from the original ws.

To test

CIS testing

Please follow the same steps listed within PR 449.

Link to EWM item

EWM # 7115

Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.53%. Comparing base (205b119) to head (9639d15).
Report is 2 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next     #456   +/-   ##
=======================================
  Coverage   96.53%   96.53%           
=======================================
  Files          63       63           
  Lines        4503     4503           
=======================================
  Hits         4347     4347           
  Misses        156      156           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@darshdinger darshdinger marked this pull request as ready for review September 11, 2024 15:59
"Converting TOF data to MatrixWorkspace...",
InputWorkspace=self.wsTOF,
OutputWorkspace=self.wsTOF,
self.mantidSnapper.ConvertToEventWorkspace(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if self.wsTOF is a histogram workspace?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can't be one. The only accepted input workspace type is required to be MatrixWorkspacePropery.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But MatrixWorkspaces can hold their data in either event or histogram format. That's why the isHistogramData method exists for MatrixWorkspaces.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest using the HistogramValidator with False to make sure this is event data, if the expectation is truly that it will only be event data.

@darshdinger
Copy link
Contributor Author

This was handled in another PR 472 that Reece merged.

@darshdinger darshdinger reopened this Oct 15, 2024
@darshdinger darshdinger force-pushed the ewm7115-fix-remove-event-background-undersampling branch from 0237e6d to a1aa66f Compare October 22, 2024 16:14
@darshdinger darshdinger merged commit 6170fbe into next Oct 24, 2024
8 checks passed
@darshdinger darshdinger deleted the ewm7115-fix-remove-event-background-undersampling branch October 24, 2024 17:59
rboston628 pushed a commit that referenced this pull request Oct 25, 2024
* Final update

* Updated tests.

* Final update, tested and functional. Removed undersampling

* Update tests to reflect changes in PixelDiffractionCalibration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants