export_data¶
- classmethod HDF5.export_data(network=None, phases=[], element=['pore', 'throat'], filename='', interleave=True, flatten=False, categorize_by=[])[source]¶
Creates an HDF5 file containing data from the specified objects, and categorized according to the given arguments.
- Parameters
network (GenericNetwork) – The network containing the desired data
phases (list[GenericPhase]s (optional, default is none)) – A list of phase objects whose data are to be included
element (str or list[str]) – An indication of whether ‘pore’ and/or ‘throat’ data are desired. The default is both.
interleave (bool (default is
True
)) – WhenTrue
(default) the data from all Geometry objects (and Physics objects ifphases
are given) is interleaved into a single array and stored as a network property (or Phase property for Physics data). WhenFalse
, the data for each object are stored under their own dictionary key, the structuring of which depends on the value of theflatten
argument.flatten (bool (default is
True
)) – WhenTrue
, all objects are accessible from the top level of the dictionary. WhenFalse
objects are nested under their parent object. Ifinterleave
isTrue
this argument is ignored.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:
’objects’ : If specified the dictionary keys will be stored under a general level corresponding to their type (e.g. ‘network/net_01/pore.all’). If
interleave
isTrue
then only the only categories are network and phase, since geometry and physics data get stored under their respective network and phase.’data’ : If specified the data arrays are additionally categorized by
label
andproperty
to separate boolean from numeric data.’elements’ : If specified the data arrays are additionally categorized by
pore
andthroat
, meaning that the propnames are no longer prepended by a ‘pore.’ or ‘throat.’