diff --git a/src/hdf5_lib.py b/src/hdf5_lib.py index cab8554..a7ab09b 100644 --- a/src/hdf5_lib.py +++ b/src/hdf5_lib.py @@ -481,7 +481,7 @@ import os #import src.hdf5_lib as h5lib import src.g5505_utils as utils import h5py - +import src.metadata_review_lib as metadata_lib def save_processed_dataframe_to_hdf5(df, annotator, src_hdf5_path, script_date, script_name): """ Save processed dataframe columns with annotations to an HDF5 file. @@ -516,6 +516,10 @@ def save_processed_dataframe_to_hdf5(df, annotator, src_hdf5_path, script_date, # Prepare data level attributes data_level_attributes = metadata_dict['metadata']['datasets'] + for key, value in data_level_attributes.items(): + if isinstance(value,dict): + data_level_attributes[key] = metadata_lib.parse_attribute(value) + # Generate output filename parent_file_name = os.path.split(src_hdf5_path)[1] output_filename = f'data_products/processed/fig_{script_date}_{parent_file_name}'