Skip to content
Snippets Groups Projects
Commit 128134f6 authored by Tamino Huxohl's avatar Tamino Huxohl
Browse files

MuMapDataset allows to modify if bed is removed on copy

parent dc1fd24f
No related branches found
No related tags found
No related merge requests found
......@@ -113,7 +113,7 @@ class MuMapDataset(Dataset):
self.reconstructions = {}
self.mu_maps = {}
def copy(self, split_name: str):
def copy(self, split_name: str, **kwargs) -> MuMapDataset:
"""
Create a copy of the dataset and modify parameters.
......@@ -121,14 +121,20 @@ class MuMapDataset(Dataset):
----------
split_name: str
the split which with which the copy is created
kwargs:
Modify parameters by name.
Currently, only `bed_contours_file` is supported.
"""
if "bed_contours_file" not in kwargs:
kwargs["bed_contours_file"] = os.path.basename(self.bed_contours_file)
return MuMapDataset(
dataset_dir=self.dir,
csv_file=os.path.basename(self.csv_file),
split_file=os.path.basename(self.split_file),
split_name=split_name,
images_dir=os.path.basename(self.dir_images),
bed_contours_file=os.path.basename(self.bed_contours_file),
bed_contours_file=kwargs["bed_contours_file"],
discard_mu_map_slices=self.discard_mu_map_slices,
align=self.align,
scatter_correction=self.scatter_correction,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment