Skip to content

Conversation

ashmeigh
Copy link
Collaborator

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.

@coveralls
Copy link

coveralls commented Jul 18, 2024

Coverage Status

coverage: 74.327% (+0.001%) from 74.326%
when pulling 2fc72ec on log_error_mon_handle
into fc02f59 on main.

Comment on lines 281 to 284
if not self.model.selected_filter.log_180_degree:
if task.progress:
task.progress("Skipping normalization for the 180-degree stack.")
continue
Copy link
Collaborator

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:

Comment on lines 279 to 286
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
Copy link
Collaborator

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.

samtygier-stfc
samtygier-stfc previously approved these changes Aug 14, 2024
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.

All looks good now. I am going to do a rebase because the history got a bit complex

@samtygier-stfc samtygier-stfc added this pull request to the merge queue Aug 14, 2024
Merged via the queue into main with commit 31f6373 Aug 14, 2024
8 checks passed
@samtygier-stfc samtygier-stfc deleted the log_error_mon_handle branch August 14, 2024 16:52
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.

3 participants