-
Notifications
You must be signed in to change notification settings - Fork 128
Include spectrum number in sequential fit output workspaces names #39605
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
base: main
Are you sure you want to change the base?
Conversation
Sorry for taking so long to review this. I've just done some functional testing, and it's not clear to me what the numbers appended to each workspace are. You say in the PR that they are spectrum numbers. The range input into the table appears to be workspace index. If I do a range of 4:6, I see workspaces appended 3, 4 and 5. I would have expected 4, 5, 6. Are the numbers in the table in spectrum number, and the numbers appended to the workspace in workspace index? It makes sense to me to align these. |
Yes, the range in the table is workspace index, and numbers appended to the output names are the spectrum numbers. It is implemented like that because the |
I don't think this is working in that way. Intentionally or not, the numbers in the table are spectrum numbers. The logic is here:
The numbers then appended to the workspace are the workspace index. The tool tip in the SequentialFitDialog window is unclear, can we improve it? It references a numeric axes, which the underlying algorithm |
@MialLewis The sequential fit dialogue & tooltip appears to be written for several workspaces. For a single workspace with many spectra they are incomprehensible. Hence my request! |
Yes, you are correct, thanks for spotting that. I got confused and switched the two numbers. I will unify the number used in the interface with the one appended to the names. The tests were mainly written to test if the output names are correct, but I will add a test to cover the numeric axis case |
Currently in
|
37f9131
to
92d9204
Compare
92d9204
to
b5d312c
Compare
b2a71d1
to
c018f74
Compare
Description of work
This PR updates the names of the PlotPeakByLogValue output workspaces to include the spectrum number, clarifying which workspace corresponds to each spectrum. The naming convention was approved by Spencer.
Fixes #39294
Further detail of work
The implementation involves enabling the
alwaysStoreInAds
option in the child Fit algorithms. It turned out that because this option was not enabled, the output workspace returned by the Fit algorithm was an empty string. This is why the output names are the same as the group workspace name, numbered by their position.To test:
1- Load any data (e.g. iris26176_graphite002_red)
2- Go to Plot Spectrum and click Fit
3- Add a peak (e.g. Lorentzian)
4- Press Sequential Fit, and a dialogue will open
5- Check the
Create Output
check box6- In the table view, set
Range
to any preferred workspace index range (e.g. 4-6)7- Press Fit
8- You will see 3 output group workspaces suffixed with "_Parameters", "_NormalisedCovarianceMatrices" and "_Workspaces"
9- Each group workspace will have the same number of spectra in the selected range
10- You can see that each workspace name includes the spectrum number and is suffixed with "_Parameters", "_NormalisedCovarianceMatrix" and "_Workspace" in each group, respectively (e.g. iris26176_graphite002_red_res_3_Parameters)
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.