diff --git a/dataloader.py b/dataloader.py index 233d25f179b5dd7408dc3a11417c9d68c63fd8a3..caea102cf296ee1fe9a7edd06c37fa1a86f3cd6d 100644 --- a/dataloader.py +++ b/dataloader.py @@ -163,7 +163,7 @@ class dataloader: extra_g2a_dict=None, pxsize=0.182, use_tsv=False, - over_write_dict=False, + overwrite_dict=False, hours=True, bud_fluorescence=False, ): @@ -197,7 +197,7 @@ class dataloader: Pixel size in microns, which is used to convert volumes. use_tsv: boolean If True, always load the data from a tsv file. - over_write_dict: boolean + overwrite_dict: boolean If True, overwrite the internal dictionary with extra_g2a_dict. hours: boolean If True, convert times to hours (dividing by 60). @@ -223,10 +223,19 @@ class dataloader: self.load_tsv(dataname) else: # update dictionary - if extra_g2a_dict and not over_write_dict: + if extra_g2a_dict and not overwrite_dict: self.g2a_dict = {**self.g2a_dict, **extra_g2a_dict} elif extra_g2a_dict: self.g2a_dict = extra_g2a_dict + for key, value in zip( + [ + "postprocessing/buddings/extraction_general_None_volume", + "postprocessing/bud_metric/extraction_general_None_volume", + ], + ["buddings", "bud_volume"], + ): + if key not in self.g2a_dict: + self.g2a_dict[key] = value self.a2g_dict = {v: k for (k, v) in self.g2a_dict.items()} # create instance of grouper grouper = self.get_grouper(dataname)