Last active
April 11, 2023 09:25
-
-
Save SubhadityaMukherjee/a8647e7b5d33826502e995a1af1f9976 to your computer and use it in GitHub Desktop.
tbprocess
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def process_runs(main_path, save_ims=False) -> pd.DataFrame: | |
"""Process all runs and return a dataframe of all results""" | |
all_files = get_event_files(main_path=main_path, save_ims=False) | |
all_dict = {} | |
for files in tqdm(all_files, total=len(all_files)): | |
try: | |
# Process each file using the EventAccumulator and save to a dictionary | |
event_acc = EventAccumulator(files) | |
event_acc.Reload() | |
temp_dict = process_event_acc(event_acc, save_ims=save_ims) | |
all_dict[files] = temp_dict | |
except IndexError: | |
pass | |
return pd.DataFrame.from_records(all_dict).T.reset_index() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment