- project_to_dict(project, categorize_by=['name'], flatten=False, element=None, delim=' | ')[source]#
Returns a single dictionary object containing data from the given OpenPNM project, with the keys organized differently depending on optional arguments.
project (list) – An OpenPNM project object
categorize_by (str or list[str]) –
Indicates how the dictionaries should be organized. The list can contain any, all or none of the following strings:
’object’ : If specified the dictionary keys will be stored under a general level corresponding to their type (e.g. ‘network/net_01/pore.all’).
’name’ : If specified, then the data arrays are additionally categorized by their name. This is enabled by default.
’data’ : If specified the data arrays are additionally categorized by
propertyto separate boolean from numeric data.
’element’ : If specified the data arrays are additionally categorized by
throat, meaning that the propnames are no longer prepended by a ‘pore.’ or ‘throat.’
A dictionary with the data stored in a hierarchical data structure, the
actual format of which depends on the arguments to the function.