Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/log_error_mon_handle' into log_e…
Browse files Browse the repository at this point in the history
…rror_mon_handle

# Conflicts:
#	mantidimaging/gui/windows/operations/presenter.py
  • Loading branch information
ashmeigh committed Aug 12, 2024
2 parents 604d4d0 + 4206873 commit ceec683
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def filter_func(images: ImageStack, progress=None) -> ImageStack:
"""
:return: The ImageStack object which has been normalised.
"""

if images.num_projections == 1:
# we can't really compute the preview as the image stack copy
# passed in doesn't have the logfile in it
Expand Down
15 changes: 6 additions & 9 deletions mantidimaging/gui/windows/operations/presenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,15 +275,12 @@ def _post_filter(self, updated_stacks: list[ImageStack], task):
# otherwise check with user which one to keep
if self.view.safeApply.isChecked():
use_new_data = self._wait_for_stack_choice(stack, stack.id)
# if the stack that was kept happened to have a proj180 stack - apply the filter to that too
if self.model.selected_filter.allow_for_180_projection:
# Apply to proj180 synchronously if necessary
if use_new_data and not self.applying_to_all and stack.has_proj180deg():
# Apply to proj180 synchronously - this function is already running async
# and running another async instance causes a race condition in the parallel module
# where the shared data can be removed in middle of the operation of another operation
self._do_apply_filter_sync([stack.proj180deg])

# if the stack that was kept happened to have a proj180 stack - then apply the filter to that too
if stack.has_proj180deg() and use_new_data and not self.applying_to_all:
# Apply to proj180 synchronously - this function is already running async
# and running another async instance causes a race condition in the parallel module
# where the shared data can be removed in the middle of the operation of another operation
self._do_apply_filter_sync([stack.proj180deg])
if np.any(stack.data < 0):
negative_stacks.append(stack)

Expand Down

0 comments on commit ceec683

Please sign in to comment.