Skip to content
Snippets Groups Projects
Commit 74a34bd5 authored by pswain's avatar pswain
Browse files

change(dataloader): over_write_dict is now overwrite_dict; minimal

g2a_dict with bud info
parent 5b1d522c
No related branches found
No related tags found
No related merge requests found
...@@ -163,7 +163,7 @@ class dataloader: ...@@ -163,7 +163,7 @@ class dataloader:
extra_g2a_dict=None, extra_g2a_dict=None,
pxsize=0.182, pxsize=0.182,
use_tsv=False, use_tsv=False,
over_write_dict=False, overwrite_dict=False,
hours=True, hours=True,
bud_fluorescence=False, bud_fluorescence=False,
): ):
...@@ -197,7 +197,7 @@ class dataloader: ...@@ -197,7 +197,7 @@ class dataloader:
Pixel size in microns, which is used to convert volumes. Pixel size in microns, which is used to convert volumes.
use_tsv: boolean use_tsv: boolean
If True, always load the data from a tsv file. 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. If True, overwrite the internal dictionary with extra_g2a_dict.
hours: boolean hours: boolean
If True, convert times to hours (dividing by 60). If True, convert times to hours (dividing by 60).
...@@ -223,10 +223,19 @@ class dataloader: ...@@ -223,10 +223,19 @@ class dataloader:
self.load_tsv(dataname) self.load_tsv(dataname)
else: else:
# update dictionary # 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} self.g2a_dict = {**self.g2a_dict, **extra_g2a_dict}
elif extra_g2a_dict: elif extra_g2a_dict:
self.g2a_dict = 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()} self.a2g_dict = {v: k for (k, v) in self.g2a_dict.items()}
# create instance of grouper # create instance of grouper
grouper = self.get_grouper(dataname) grouper = self.get_grouper(dataname)
......
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