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

Replace subtraction of profiles with Minus() #110

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

GuiMacielPereira
Copy link
Collaborator

Previously the subtraction of NCP profiles was being done by extracting the data from a workspace into np arrays, doing the subtraction and the masking in the array and finally passing the arrays into a mantid workspace again.

This can be simplified by using mantid Minus().
This has the advantage of preserving workspace metadata and handling masking automatically.

Description of work:

  • Changed analysis scripts so that ncp created have the same metadata as the original workspace, by using CloneWorkspace(). Otherwise Minus() will not work.
  • Added test data to fix missing workspace metadata and added workspace with the sum of ncp

To test:

Fixes #xxxx.

Previously the subtraction of NCP profiles waas being done
by extracting the data from a workspace into np arrays,
doing the subtraction and the masking in the array and finally
passing the arrays into a mantid workspace again.

This can be simplified by using mantid Minus().
This has the advantage of preserving workspace metadata and
handling masking automatically.

- Changed analysis scripts so that ncp created have the same
metadata as the original workspace, by using CloneWorkspace().
Otherwise Minus() will not work.
- Added test data to fix missing workspace metadata and added
workspace with the sum of ncp
- Updated the y space fit test for GC
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.

1 participant