-
Notifications
You must be signed in to change notification settings - Fork 128
Update available fit functions on Function Q interface according to data #37883
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
Update available fit functions on Function Q interface according to data #37883
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.
When adding both width and ESIF spectra and then deleting the ESIF spectra, the fit functions remain as "all" instead of just the "Width" functions. However, deleting the width spectra works fine and the functions are updated with just "ESIF" functions. Also, adding just "Width" spectra works fine and updates the function list with just the "Width" list
…ataPresenter class, and refactor chooseFunctionQFunctions members to properly update when removing data from table
46cf9fb
to
f7d684a
Compare
Thanks for testing this @MohamedAlmaki. It should be ready for another look! |
Thanks for the changes, it works as expected now. I will approve once the CI is green, I think these failures are unrelated the PR |
@robertapplin there is a minor sign warning issue, could you please fix it |
f65b792
to
94dbd25
Compare
disabled auto-merge so this doesn't miss out on getting in to |
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.
Happy to approve, thanks for the changes
The base branch was changed.
Description of work
Fixes the issue described in #37671 . Whenever new data is added to the data table in the Function (Q) tab of the QENS Fitting interface, the list of available fit functions in the fit property browser should be updated dynamically to show which functions are available to fit according to the data on the table. This should be updated also whenever data is removed from the table.
Summary of work
In order to add this feature, I have added a virtual function to the FitDataPresenter class that is redefined in the derived classes (in this case
FunctionQDataPresenter
) and that updates the available functions list from the remove handle in theFitTab
class when the signal for removing data is sent.I have refactored the function
chooseFunctionQFunctions
on theFunctionQDataPresenter
to be able to update properly when data is removed from the table (it was only implemented for added data).Fixes #37671 .
Further detail of work
To test:
Follow the test instructions of #37671, making sure now that the available functions are updated appropiately (the available functions for
EISF
data all start with the prefixEISF
).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.