-
Notifications
You must be signed in to change notification settings - Fork 7
Display normalized values in spectrum viewer image view #2481
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
Conversation
ef39340
to
3f2ecf9
Compare
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.
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.
And it would be good to have a test for the new function in |
Looks like this still needs a yapf fix |
90d31c2
to
407094c
Compare
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.
Now that there is similar code in 3 places, I think it is worth pulling
averaged_image = (self.model.get_normalized_averaged_image()
if self.view.normalisation_enabled() else self.model.get_averaged_image())
if averaged_image is None:
image_shape = self.model.get_image_shape()
averaged_image = np.zeros(image_shape, dtype=np.float32)
self.view.set_image(averaged_image, autoLevels=False)
into its own method.
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.
Looks good now. Thanks
ab6b218
to
9886152
Compare
9886152
to
8b65457
Compare
Issue Closes #2456
Description
get_normalized_averaged_image()
to the model for normalized image data.Developer Testing
python -m pytest -vs
Acceptance Criteria
python -m pytest -vs