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

Display normalized values in spectrum viewer image view #2481

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

Conversation

ashleymeigh2
Copy link
Collaborator

Issue Closes #2456

Description

  • Updated spectrum viewer to display normalized values in the image view when normalization is enabled.
  • Added get_normalized_averaged_image() to the model for normalized image data.
  • Updated presenter to fetch and display the correct image based on normalization state.

Developer Testing

  • Verified unit tests pass: python -m pytest -vs
  • Tested normalized and non-normalized image rendering in the spectrum viewer.

Acceptance Criteria

  • Unit tests pass: python -m pytest -vs
  • Normalized values display when normalization is enabled.
  • Non-normalized values display when normalization is disabled.
  • Edge cases (e.g., missing stacks) handled correctly.

@ashmeigh ashmeigh force-pushed the 2456_normalised-image-in-spectrum-view branch from ef39340 to 3f2ecf9 Compare January 28, 2025 14:17
Copy link
Collaborator

@samtygier-stfc samtygier-stfc 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 the test is failing because self.view.normalisation_enabled() will be true by default in the mocked view. Might fix it to add self.view.normalisation_enabled.return_value = False in to the test.

mantidimaging/gui/windows/spectrum_viewer/model.py Outdated Show resolved Hide resolved
@samtygier-stfc
Copy link
Collaborator

And it would be good to have a test for the new function in model_test.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show normalised image in spectrum view
3 participants