-
Notifications
You must be signed in to change notification settings - Fork 128
Fix bug in retrieving exponential correction parameters in auto detection mode of Reflectometry Reduction One Auto algorithm #38438
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested the changes using both an INTER (polynomial correction) and SURF (exponential correction) example and both are working really well - the correct algorithm is selected and the parameters are looked up successfully from the parameter file.
Just a small thing I noticed (sorry, I couldn't seem to add a comment on the specific line because it's outside the changes in the PR) - the error message on line 610 refers to polynomial correction, but I think the error could technically have been thrown for either correction. It looks like this wasn't made more generic when the exponential correction was added in, so could we update this while we're here?
It's really great to have some tests added to cover this functionality. I've just included a comment to think about how we might make these robust against any future changes in instrument parameter file settings.
Framework/Reflectometry/test/ReflectometryReductionOneAuto3Test.h
Outdated
Show resolved
Hide resolved
Thanks for the careful review and the useful tips. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for investigating using a test parameter file in the unit tests, it's great to have that working and it should hopefully help to make the test more robust over the long-term. It looks like there's an import in the unit test file that's left over from before the recent changes that I think we could remove, but otherwise all the code changes are looking really good!
I think the CI failures are unrelated to your changes, there seem to be failures on a few PRs, so I'll flag to the Dev Ops team just in case.
Framework/Reflectometry/test/ReflectometryReductionOneAuto3Test.h
Outdated
Show resolved
Hide resolved
Framework/Reflectometry/test/ReflectometryReductionOneAuto3Test.h
Outdated
Show resolved
Hide resolved
…algorithm properties with update parameters value
…describe that can be either exponential or polynomial
…ions in unit-testing folder
…s for retrieving algorithmic correction parameters
2027321
to
658d9ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much Adrian for your hard work getting the test parameter file to work in the unit tests. All the code changes are looking good, the fix is working well and all review comments have been addressed, so this looks good to go in. 👍
Description of work
The issue is explained in #38204 : parameters for exponential correction were not being correctly retrieved when in autodetect mode, as the instrument parameters were being retrieved as string, but in the case of the exponential parameters, these are better retrieved as numbers. On the other hand, the polynomial parameters have the flexibility of being input as a double list or string with comma separated values for the parameters.
Additional changes:
ReflectometryReductionOneAuto
.AutoDetect
mode both for exponential corrections and polynomial corrections.Summary of work
Fixes #38204
Further detail of work
To test:
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
Functional Tests
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.