Skip to content

Commit ceec683

Browse files
committed
Merge remote-tracking branch 'origin/log_error_mon_handle' into log_error_mon_handle
# Conflicts: # mantidimaging/gui/windows/operations/presenter.py
2 parents 604d4d0 + 4206873 commit ceec683

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

mantidimaging/core/operations/monitor_normalisation/monitor_normalisation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def filter_func(images: ImageStack, progress=None) -> ImageStack:
3838
"""
3939
:return: The ImageStack object which has been normalised.
4040
"""
41+
4142
if images.num_projections == 1:
4243
# we can't really compute the preview as the image stack copy
4344
# passed in doesn't have the logfile in it

mantidimaging/gui/windows/operations/presenter.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -275,15 +275,12 @@ def _post_filter(self, updated_stacks: list[ImageStack], task):
275275
# otherwise check with user which one to keep
276276
if self.view.safeApply.isChecked():
277277
use_new_data = self._wait_for_stack_choice(stack, stack.id)
278-
# if the stack that was kept happened to have a proj180 stack - apply the filter to that too
279-
if self.model.selected_filter.allow_for_180_projection:
280-
# Apply to proj180 synchronously if necessary
281-
if use_new_data and not self.applying_to_all and stack.has_proj180deg():
282-
# Apply to proj180 synchronously - this function is already running async
283-
# and running another async instance causes a race condition in the parallel module
284-
# where the shared data can be removed in middle of the operation of another operation
285-
self._do_apply_filter_sync([stack.proj180deg])
286-
278+
# if the stack that was kept happened to have a proj180 stack - then apply the filter to that too
279+
if stack.has_proj180deg() and use_new_data and not self.applying_to_all:
280+
# Apply to proj180 synchronously - this function is already running async
281+
# and running another async instance causes a race condition in the parallel module
282+
# where the shared data can be removed in the middle of the operation of another operation
283+
self._do_apply_filter_sync([stack.proj180deg])
287284
if np.any(stack.data < 0):
288285
negative_stacks.append(stack)
289286

0 commit comments

Comments
 (0)