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

Add output label option to ISIS Energy Transfer tab of Data Reduction #38607

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

MohamedAlmaki
Copy link
Contributor

@MohamedAlmaki MohamedAlmaki commented Jan 15, 2025

Description of work

This PR adds an output label option to the ISIS Energy Transfer tab in the Indirect Data Reduction interface. The output label will be appended to the output name and doesn't override previous outputs.

Summary of work

Fixes #38410.

To test:

1- Open Indirect Data Reduction interface
2- Go to ISIS Energy Transfer tab
3- Select IRIS, graphite 002
4- Load run 26176
5- Choose an output label
6- Click Run
7- The output label should be appended to the output name
8- Choose a different output label
9- Click Run
10- It should not override the previous data which was output in the ADS


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.

@MohamedAlmaki MohamedAlmaki changed the title Specify output label on Energy Transfer tab of Data Reduction Add output label option to ISIS Energy Transfer tab of Data Reduction Jan 15, 2025
@MohamedAlmaki MohamedAlmaki added Indirect/Inelastic Issues and pull requests related to indirect or inelastic ISIS Team: Spectroscopy Issue and pull requests managed by the Spectroscopy subteam at ISIS labels Jan 15, 2025
@MohamedAlmaki MohamedAlmaki added this to the Release 6.12 milestone Jan 15, 2025
@MohamedAlmaki MohamedAlmaki force-pushed the 38410_specify_output branch 3 times, most recently from a7a1734 to 47d69dd Compare January 15, 2025 12:21
@MohamedAlmaki MohamedAlmaki marked this pull request as ready for review January 15, 2025 12:30
@GuiMacielPereira GuiMacielPereira self-assigned this Jan 15, 2025
@GuiMacielPereira GuiMacielPereira self-requested a review January 15, 2025 13:48
@MohamedAlmaki
Copy link
Contributor Author

Working on resolving the test failure

Copy link
Contributor

@GuiMacielPereira GuiMacielPereira left a comment

Choose a reason for hiding this comment

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

I think this is a great solution to make sure workspaces are not overwritten and it is working well.

The only problem that I see is that using the OutputNameView widget also displays the 'current output name' which suggests that an workspace with that name will be created. However, because the mehtod m_outputNamePresenter.setOutputWsBasename() is never called, the name that the OutputName widget displays does not have a basename, eg. iris26176_graphite002, so instead of displaying the expected iris26176_graphite002_some-label_red, it's only showing _some-label.

I think this is quite tricky to fix before code freeze, so what I think the simpler solution is is to just hide this part:
image

Since in OutputNameView.cpp you have the example of enableLabelEditor() I think you can write a similar function to disable the other text box?

If this proves to be too much, I am also happy to aprove as it is before code freeze, because ultimately I think the new functunality justifies it, and we can always improve it later in the nightly.

@MohamedAlmaki
Copy link
Contributor Author

Yes, it should be hidden, how did you reproduce this? In my machine it is not shown. enableLabelEditor should only enable the input box and not the warning label

@GuiMacielPereira
Copy link
Contributor

I am running on Linux, Ubuntu 20.04. I just built mantid as usual and opened the interface.

@MohamedAlmaki
Copy link
Contributor Author

Ok, I will check it thanks

@sf1919
Copy link
Contributor

sf1919 commented Jan 17, 2025

The release note structure for v6.13 has been created. You can now rebase your branch and move the release note in this PR.

@GuiMacielPereira GuiMacielPereira self-requested a review January 17, 2025 12:04
Copy link
Contributor

@GuiMacielPereira GuiMacielPereira left a comment

Choose a reason for hiding this comment

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

The changes look much better towards displaying the workspace name in the OutputName widget, however I still get a discrepancy with the name that is displayed and the name of the workspace that is actually created:
image
So you can see that the name of the creted workspace doesn't have _ between graphite and 002, and the suffix is red instead of Reduced

@@ -27,6 +27,13 @@ void OutputNamePresenter::setOutputWsBasename(std::string const &outputBasename,
handleUpdateOutputLabel();
}

void OutputNamePresenter::enableEditing() {
m_view->enableLabelEditor();
// m_view->hideWarning();
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// m_view->hideWarning();

Choose a reason for hiding this comment

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

File name should not have _ betweed graphite & 002 ie graphite002 and suffix should be red not Reduced.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it is a bit confusing but the name here is the output group name, not the workspace name.
There are three grouping options:
1- Grouped: the group output name will be IRIS26176-26177_graphite_002_label_Reduced and each workspace name will follow the name convention iris26176_graphite002_lable_red and iris26177_graphite002_label_red
2- Ungrouped: the output here will be ungrouped so you will see two workspaces in the GUI: iris26176_graphite002_lable_red and iris26177_graphite002_label_red
3- Sample Changer Grouped: similar to 2 iris26176_graphite002_lable_red and iris26177_graphite002_label_red

Choose a reason for hiding this comment

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

Ok I see the complication. But you still need to be consistent with graphite002 without _. It is our naming convention for reflections.

Choose a reason for hiding this comment

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

I've noticed that nightly build has graphite_002, so bug has been there for some time. Also when I select OSIRIS I don't get the 3 options for output, just grouped.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm how did you get the one with graphite_002?
Yes, that was intentional because Osiris supports "Grouped" or "Ungrouped" so we replaced the dropdown with a chequebook, not like IRIS which supports additional "Sample Changer Grouped"

Choose a reason for hiding this comment

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

‘graphite 002’ is in the group name - the members are correctly ‘graphite’.
Isn’t OSIRIS going to use the sample changer? I’m surprised.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've modified it in this pull request (last year): #35186
The request was from Sanghamitra as far as I remember. Sample changer is only enabled for IRIS

Choose a reason for hiding this comment

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

That PR is for sample changer I’m doing simple grouping. So she sees no future for sample changing then!! For consistency I’d rather see the menu but having it greyed out for OSIRIS. Then should it be needed it’s easier to change. Users of both instruments might get confused to see it different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indirect/Inelastic Issues and pull requests related to indirect or inelastic ISIS Team: Spectroscopy Issue and pull requests managed by the Spectroscopy subteam at ISIS
Projects
Status: Waiting response
Development

Successfully merging this pull request may close these issues.

Specify output label on Energy Transfer tab of Data Reduction
4 participants