-
Notifications
You must be signed in to change notification settings - Fork 7
2362 update operation window value warnings #2807
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
2362 update operation window value warnings #2807
Conversation
This PR introduces changes to the Applitools screenshot tests |
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.
Thank you for adding more clarity to the value warnings. The changes look good and are cleanly implemented. I have functionally tested with real data and ran tests locally and all works well. I have left one small suggestion I would like to get your opinion on, but I don't feel too strongly for the suggested change.
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've just given this a quick look and have some questions.
- Is it needed for
VALUE_CHECKS
to include a nan check? I think all the places that previously usedenable_nonpositive_check()
also hadenable_nan_check()
, so that is already being checked. - Is the conversion to float needed?
- Do
_is_zero()
and_is_negative()
need internal nan checks? Those seem redundant, if a value is zero we already know it is not nan.
Also is there any performance hit. I think with the extra conversions and nan checks there might be.
You could do
def check_for_bad_data(self) -> None:
with ExecutionTimer(msg="check_for_bad_data()"):
current_slice = self._get_current_slice()
if current_slice is not None:
for test in self.enabled_checks.values():
test.do_check(current_slice)
To get the run time of the checks and switch it to ExecutionProfiler
to see where the time is spent. (You might need to turn on preformance logging in the settings)
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.
Working well locally for me. Thanks for the fixes.
Requested changes by Jack and I have been made, and I don't think Jack had any further comments. (If there are any those can be resolved when he's back)
Issue Closes #2362
Description
Renamed
enable_nonpositive_check
toenable_value_check
and updated the function to do warning checks specific to zero, negative and NaN values.Updated the overlay colors to be user friendly:
Zero values
Negative values
Invalid values: Not a number
Updated the
test_negative_nan_overlay
test to check against value warning messages.Replaced all the references of
enable_nonpositive_check
toenable_value_check
in the code base.Developer Testing
python -m unittest -v mantidimaging.eyes_tests.reconstruct_window_test
Acceptance Criteria and Reviewer Testing
python -m pytest -vs
python -m unittest -v mantidimaging.eyes_tests.reconstruct_window_test
and verify all tests passDocumentation and Additional Notes