Skip to content

Commit

Permalink
Remove Counts Check Method
Browse files Browse the repository at this point in the history
  • Loading branch information
JackEAllen committed May 14, 2024
1 parent 19ed02a commit 587bdb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
3 changes: 0 additions & 3 deletions mantidimaging/core/io/instrument_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,3 @@ def pulse_per_shutter_range_numbers(self) -> np.ndarray[Any, Any]:

def has_Pulse(self) -> bool:
return ShutterCountColumn.PULSE in self.data

def raise_if_counts_missing(self):
pass
10 changes: 3 additions & 7 deletions mantidimaging/gui/windows/image_load_dialog/presenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import TYPE_CHECKING

from mantidimaging.core.io.filenames import FilenameGroup
from mantidimaging.core.io.loader import load_log, load_shutter_counts
from mantidimaging.core.io.loader import load_log
from mantidimaging.core.io.loader.loader import LoadingParameters, ImageParameters, read_image_dimensions
from mantidimaging.core.utility.data_containers import FILE_TYPES, log_for_file_type, shuttercounts_for_file_type
from mantidimaging.gui.windows.image_load_dialog.field import Field
Expand Down Expand Up @@ -111,15 +111,11 @@ def do_update_shutter_counts(self, field: Field, selected_file: str) -> None:
filename_group.find_shutter_count_file()
field.set_images(list(filename_group.all_files()))
self._update_field_action(field, selected_file)
shuttercount_names = [p.name for p in filename_group.all_files()]
self.ensure_sample_shuttercount_consistency(field, selected_file, shuttercount_names)
self.ensure_sample_shuttercount_consistency(field, selected_file)

def ensure_sample_shuttercount_consistency(self, field: Field, file_name: str, image_filenames: list[str]) -> None:
def ensure_sample_shuttercount_consistency(self, field: Field, file_name: str) -> None:
if file_name is None or file_name == "":
return

shutter_count = load_shutter_counts(Path(file_name))
shutter_count.raise_if_counts_missing()
self._update_field_action(field, file_name)

def do_update_flat_or_dark(self, field: Field, selected_file: str) -> None:
Expand Down

0 comments on commit 587bdb0

Please sign in to comment.