Finished the simulation part of the method sections.

This commit is contained in:
j-hartling
2026-05-13 17:07:51 +02:00
parent 5ef09bef6c
commit 688f153bef
10 changed files with 1349 additions and 1161 deletions

View File

@@ -45,7 +45,8 @@ def reduce_kernel_set(data, inds, keys=None, combis=None):
data[key] = data[key][:, inds, ...]
return data
def sort_files_by_rec(paths, sources=['BM04', 'BM93', 'DJN', 'GBC', 'FTN']):
def sort_files_by_rec(paths, sources=['BM04', 'BM93', 'DJN', 'GBC', 'FTN'],
return_dict=False):
# Separate by source:
sorted_paths = {}
for source in sources:
@@ -73,7 +74,11 @@ def sort_files_by_rec(paths, sources=['BM04', 'BM93', 'DJN', 'GBC', 'FTN']):
# Open new recording-specific slot:
sorted_paths[source].append([])
sorted_paths[source][sub_id - 1].append(path)
# Keep source separation:
if return_dict:
return sorted_paths
# Re-sort song files by recording only (discarding source separation):
sorted_paths = [path for paths in sorted_paths.values() for path in paths]
return sorted_paths