get_ds_dictionaries#

mochada_kit.hdf5_metadata_tools.get_ds_dictionaries(name, node)#

Callable as input for h5py.Group.visititems().

See docs for that function here: https://docs.h5py.org/en/stable/high/group.html#h5py.Group.visititems.

This function will be called at every node contained within a Group and will act on a dict “ds_dict”, which must be defined outside this function. If the current node is an h5py.Dataset, a key/value pair will be added to “ds_dict”, where the key is the name of the dataset and the value is a string containing the contents of the dataset. If the dataset is larger than a certain size in more than 1D, the value states this and gives the shape of the node - this is to avoid large amounts of data being present in the json diagram later, which would make it less easy to read.

Parameters:
nameSTR

The name of the node.

nodeh5py.Dataset or p5py.Group

The current node (dataset or group).