-
Notifications
You must be signed in to change notification settings - Fork 7
Fix Monitor Normalization Error for 180-Degree Stack #2287
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
if not self.model.selected_filter.log_180_degree: | ||
if task.progress: | ||
task.progress("Skipping normalization for the 180-degree stack.") | ||
continue |
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.
This should move inside the other if statement.
if use_new_data and not self.applying_to_all and not self.is_a_proj180deg(stack):
if not self.model.selected_filter.allow_for_180_projection:
if use_new_data and not self.applying_to_all: | ||
if self.is_a_proj180deg(stack): | ||
if self.model.selected_filter.allow_for_180_projection: | ||
self._do_apply_filter_sync([stack.proj180deg]) | ||
else: | ||
if task.progress: | ||
task.progress("Skipping normalization for the 180-degree stack.") | ||
continue |
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.
This just needs the if self.model.selected_filter.allow_for_180_projection:
check added. The self.is_a_proj180deg(stack):
is breaking the tests (makes this never run). Also the task.progress
message is not needed.
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.
All looks good now. I am going to do a rebase because the history got a bit complex
99ae981
to
2fc72ec
Compare
Issue
Fix Monitor Normalization Error for 180-Degree Stack (#2222)
Description
Added a condition to check if the stack name contains '180deg'.
If the stack is identified as the 180-degree stack, normalization is skipped, and a progress message is reported.
This prevents errors related to missing log files for the 180-degree stack.
Testing
Load a Dataset with a Log File: Loaded a dataset that includes both sample and 180-degree stacks with appropriate log files for the sample stack.
Perform Monitor Normalization:
Expected Behavior: Normalization is applied only to the sample stack.
Observed Behavior: The function successfully skips the 180-degree stack and applies normalization to the sample stack without errors.
Acceptance Criteria
Load a Dataset: Ensure that the dataset includes both sample and 180-degree stacks, with the log file available for the sample stack only.
Run Monitor Normalization: Execute the monitor normalization operation.
Check for Errors: Verify that no errors occur during the normalization process.
Documentation
Updated the release notes to include the bug fix for monitor normalization.