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

Surface Plotting from Multiple Single-Spectrum Workspaces #38599

Open
wants to merge 7 commits into
base: release-next
Choose a base branch
from

Conversation

Despiix
Copy link
Collaborator

@Despiix Despiix commented Jan 14, 2025

Description of work

Summary of work

Made it possible to plot a surface from a number of workspaces with 1 spectrum each, with one axis of the plot being a log value.

Fixes #38171.

Report to:
@RichardWaiteSTFC @PascalManuel

Further detail of work

To test:

  1. Follow instructions from Issue 3D plot for multiple workspaces with 1 spectrum each #38171 to reproduce.
  2. Check that data is plotted correctly.
  3. Check that nothing else breaks
  4. Read code

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.

@Despiix Despiix added the ISIS Team: Core Issue and pull requests managed by the Core subteam at ISIS label Jan 14, 2025
@Despiix Despiix added this to the Release 6.12 milestone Jan 14, 2025
@jclarkeSTFC jclarkeSTFC self-assigned this Jan 16, 2025
Copy link
Contributor

@jclarkeSTFC jclarkeSTFC left a comment

Choose a reason for hiding this comment

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

Looks good, just a couple of small things. Also, I think that the Contour option should have the Plot All option available, because you can type in a spectrum number and the OK button works, and the plot looks fine.

The other thing is that the linked issue also lists a problem with the wireframe plot, which hasn't been fixed.

def check_num_spectra(self):
if not self._ui.specNums.text():
if any(ws.getNumberHistograms() == 1 for ws in self._workspaces):
self._ui.specNums.setText("1")
Copy link
Contributor

Choose a reason for hiding this comment

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

Although the workspaces all have one spectrum, it doesn't necessarily mean that the spectrum numbers are all 1. You could call ws.getSpectrumNumbers()[0] to get the spectrum number for each workspace. Actually the spectrum numbers in the workspaces could all be different.

If the spectrum numbers are different in the different workspaces I think you may have to disable the spectrum box, since the Plot All and the workspace index box options are still available.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I commited this fix as well, let me know if this is not what you meant.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I also removed the "1". Now it sets the default value as the first valid spectrum number.

Set the default value as the first valid spectrum number
@jclarkeSTFC jclarkeSTFC changed the base branch from main to release-next January 16, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ISIS Team: Core Issue and pull requests managed by the Core subteam at ISIS
Projects
Status: Awaiting Approval
Development

Successfully merging this pull request may close these issues.

3D plot for multiple workspaces with 1 spectrum each
2 participants