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

Use Minus() to subtract masses from total ncp #150

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

GuiMacielPereira
Copy link
Collaborator

@GuiMacielPereira GuiMacielPereira commented Dec 6, 2024

Description of work:
Using Minus algorithm makes sure that workspaces are compatible with each other, which is important for scientists when sometimes they have to subtract one workspace from another.

It also improves readability of the code.

To test:
Code review.

Manual testing:
Activate an environment with mantidworkbench installed:

  • Checkout this branch and install with pip install .
  • run mvesuvio config
  • Open Mantid workbench and open file ~/.mvesuvio/analysis_inputs.py
  • Click Run
  • Plot workspace analysis_inputs_fwd_0_total_ncp_sum
  • Drag analysis_inputs_fwd_0_1.0079_ncp_sum onto open plot
  • Drag analysis_inputs_fwd_0_total_ncp_except_lightest_sum onto open plot
  • Looking at the plot, check that total ncp sum matches the sum of the other two profiles

Using Minus algorithm makes sure that workspaces are compatible
with each other, which is important for scientists when sometimes
they have to subtract one workspace from another.

It also improves readability of the code.
Before overwriting the benchmarks I checked that my changes
did not fail the previous system tests that were in place.
Updated the inputs and the benchmarks of the system tests,
because the previous inputs had workspaces that had unmatching
units of Y and X.
@SilkeSchomann
Copy link
Collaborator

There is no workspace called analysis_inputs_fwd_0_total_ncp_except_lightest_sum when I run analysis_inputs.

@SilkeSchomann
Copy link
Collaborator

image

Copy link
Collaborator

@SilkeSchomann SilkeSchomann left a comment

Choose a reason for hiding this comment

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

The code is more readable now and manual testing produces the expected results.

@GuiMacielPereira GuiMacielPereira merged commit be50cc3 into main Dec 13, 2024
1 check passed
@GuiMacielPereira GuiMacielPereira deleted the isolate-mass-using-minus branch December 13, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants