From 6066df482e13e27d56037ba9335146129554d66b Mon Sep 17 00:00:00 2001 From: chrisjbillington Date: Mon, 16 Feb 2026 18:09:08 +1100 Subject: [PATCH] Read attributes of subgroups of the 'data' h5 group into the dataframe This allows simple plotting of direct measurements saved here against globals in analysis routines. --- lyse/dataframe_utilities.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lyse/dataframe_utilities.py b/lyse/dataframe_utilities.py index 41100c3b..761f6737 100644 --- a/lyse/dataframe_utilities.py +++ b/lyse/dataframe_utilities.py @@ -66,6 +66,10 @@ def get_nested_dict_from_shot(filepath): for groupname in h5_file['results']: resultsgroup = h5_file['results'][groupname] row[groupname] = get_attributes(resultsgroup) + if 'data' in h5_file: + for groupname in h5_file['data']: + datagroup = h5_file['data'][groupname] + row[groupname] = get_attributes(datagroup) if 'images' in h5_file: for orientation in h5_file['images'].keys(): if isinstance(h5_file['images'][orientation], h5py.Group):