sidpy.hdf.hdf_utils.write_dict_to_h5_group

sidpy.hdf.hdf_utils.write_dict_to_h5_group(h5_group, metadata, group_name)[source]

If the provided metadata parameter is a non-empty dictionary, this function will create a HDF5 group called group_name within the provided h5_group and write the contents of metadata into the newly created group :param h5_group: Parent group to write metadata into :type h5_group: h5py.Group :param metadata: Dictionary that needs to be written into the group :type metadata: dict :param group_name: Name of the group to write attributes into :type group_name: str

Returns:

h5_metadata_grp – Handle to the newly create group containing the metadata

Return type:

h5py.Group

Notes

Writes now (sidpy version 0.0.6) nested dictionaries to HDF5 files. Use h5_group_to_dict to read from HDF5 file.