Skip to content
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

Unify datasets 10: Remove StrictDataset #2402

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions mantidimaging/core/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def set_stack(self, file_type: FILE_TYPES, image_stack: ImageStack) -> None:
if hasattr(self, attr_name):
setattr(self, attr_name, image_stack)
else:
raise AttributeError(f"StrictDataset does not have an attribute for {attr_name}")
raise AttributeError(f"Dataset does not have an attribute for {attr_name}")

def set_stack_by_type_name(self, file_type_name: str, image_stack: ImageStack) -> None:
file_type_name = file_type_name.upper().replace(" ", "_")
Expand All @@ -201,10 +201,6 @@ def is_processed(self) -> bool:
return False


class StrictDataset(Dataset):
pass


def _get_stack_data_type(stack_id: uuid.UUID, dataset: Dataset) -> str:
"""
Find the data type as a string of a stack.
Expand Down
293 changes: 0 additions & 293 deletions mantidimaging/core/data/test/strictdataset_test.py

This file was deleted.

6 changes: 3 additions & 3 deletions mantidimaging/core/io/saver.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def image_save(images: ImageStack,

def nexus_save(dataset: Dataset, path: str, sample_name: str, save_as_float: bool) -> None:
"""
Uses information from a StrictDataset to create a NeXus file.
Uses information from a Dataset to create a NeXus file.
:param dataset: The dataset to save as a NeXus file.
:param path: The NeXus file path.
:param sample_name: The sample name.
Expand All @@ -204,9 +204,9 @@ def nexus_save(dataset: Dataset, path: str, sample_name: str, save_as_float: boo

def _nexus_save(nexus_file: h5py.File, dataset: Dataset, sample_name: str, save_as_float: bool) -> None:
"""
Takes a NeXus file and writes the StrictDataset information to it.
Takes a NeXus file and writes the Dataset information to it.
:param nexus_file: The NeXus file.
:param dataset: The StrictDataset.
:param dataset: The Dataset.
:param sample_name: The sample name.
"""
# Top-level group
Expand Down
Loading
Loading