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

added to gallery

parent 75d0aff7
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -26,4 +26,4 @@ for dataname in datasets:
)
# dl.save()
# If use_tsv=True, tpkl files are created as backup only.
# If use_tsv=True, pkl files are created as backup only.
......@@ -320,7 +320,11 @@ class dataloader:
if self.a2g_dict[key_index] not in signals_available:
raise Exception(f"The key index {key_index} is unavailable.")
# get indices for all buds
bud_indices = self.get_bud_indices(grouper, key_index)
bud_indices = self.get_bud_indices(
grouper=grouper,
key_index=key_index,
tmax_in_mins_dict=tmax_in_mins_dict,
)
# get key_index data
r_df = self.get_key_index_data(
grouper=grouper,
......@@ -425,11 +429,15 @@ class dataloader:
else:
raise Exception(f"{key_index_path} cannot be found.")
def get_bud_indices(self, grouper, key_index):
def get_bud_indices(self, grouper, key_index, tmax_in_mins_dict):
"""Use key_index to get a multi-index for all buds."""
key_index_path = self.a2g_dict[key_index]
print("Getting data to identify bud indices...")
record = grouper.concat_signal(key_index_path, mode="raw_daughters")
record = grouper.concat_signal(
key_index_path,
mode="raw_daughters",
tmax_in_mins_dict=tmax_in_mins_dict,
)
bud_indices = record.droplevel("mother_label").index
return bud_indices
......
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