Skip to content

Conversation

cailafinn
Copy link
Contributor

@cailafinn cailafinn commented Sep 12, 2024

This is a fix for a bug in code being introduced to this release. It should not be swapped to the 6.12 milestone after code freeze! Will need its base changing to release-next once it's been created.

Description of work

Summary of work

The equation had some incorrect terms in the calculation that was making a mess of the output. It was approximately half of what it should have been. This corrects that to produce the right outputs.

Fixes #37939

Further detail of work

To test:

  1. The honest best test for this is to use Dirk's script and check the outputs as it shows how the algorithm will be used in practice. The problem is that it's very long and requires some specific zoom files. When reviewing, just ask me for them. I'll send you a .zip.
  2. Unpack the zip and add the directory into your User directories.
  3. Open and Run the script. It'll fail early, but you'll have the workspaces you need.
  4. Plot MantidAlgorithm_efficiencyPolarizer, efficiency_polarizer_mantidlike and efficiency_polarizer_pa
  5. The MantidAlgorithm and mantidlike plots should match.

This does not require release notes because it fixes an issue in an algorithm added for this release.


Reviewer

Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.

Code Review

  • Is the code of an acceptable quality?
  • Does the code conform to the coding standards?
  • Are the unit tests small and test the class in isolation?
  • If there is GUI work does it follow the GUI standards?
  • If there are changes in the release notes then do they describe the changes appropriately?
  • Do the release notes conform to the release notes guide?

Functional Tests

  • Do changes function as described? Add comments below that describe the tests performed?
  • Do the changes handle unexpected situations, e.g. bad input?
  • Has the relevant (user and developer) documentation been added/updated?

Does everything look good? Mark the review as Approve. A member of @mantidproject/gatekeepers will take care of it.

Gatekeeper

If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.

The calcualation had an denominator that was 2x bigger than it should
have been. This has now been fixed to match the equations provided by
the instrument scientists and should stop efficiencies less than 0.5
from appearing.

RE mantidproject#37939
@cailafinn cailafinn added SANS Issues and pull requests related to SANS ISIS: LSS Issue and pull requests relating to SANS and Reflectometry (Large Scale Structures) at ISIS Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) labels Sep 12, 2024
@cailafinn cailafinn added this to the Release 6.11 milestone Sep 12, 2024
@jclarkeSTFC jclarkeSTFC changed the base branch from main to release-next September 12, 2024 15:13
@cailafinn cailafinn marked this pull request as ready for review September 12, 2024 15:48
@rbauststfc rbauststfc self-assigned this Sep 13, 2024
Copy link
Contributor

@rbauststfc rbauststfc left a comment

Choose a reason for hiding this comment

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

The calculation change looks good and appropriate docs have been updated. I've tested the result using Dirk's script and it's giving the expected result, so this is all looking good 👍

@SilkeSchomann SilkeSchomann self-assigned this Sep 13, 2024
@SilkeSchomann SilkeSchomann merged commit 74d457e into mantidproject:release-next Sep 13, 2024
10 checks passed
@cailafinn cailafinn deleted the 37939_correct_polarizer_efficiency_equation branch October 31, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) ISIS: LSS Issue and pull requests relating to SANS and Reflectometry (Large Scale Structures) at ISIS SANS Issues and pull requests related to SANS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Correct the equation and errors used in the PolarizerEfficiency algorithm
3 participants