In order to be able to use this module import it like this:
import mpacts.io.datasave #or assign it to a shorter name import mpacts.io.datasave as dat
DataSaveCommand(name, parent=None, **kwargs)¶
Saves all data contained in a simulation tree to output files in a save format intended for postprocessing. The main goal is to provide a uniform interface to access data from the simulation while leaving the save files as small as possible.
- name (str) – Name of this command
- parent (
mpacts.core.baseobject.BaseObject) – Parent to which this command should be added
Optional key word arguments:
root: Root node of the simulation that will be saved. If not specified, ‘parent’ will be used.
gate: Optional mpacts gate for conditional execution
Arrayobjects will not be saved, dramatically reducing the size of saved files.
directory: (optional) directory in which the output will be saved. Default=’./’
filename: (optional) name of the files prefix. Default = name of the root
exclude_paths: (optional) one path or a list of paths (from given root) that will be omitted from saving
- Data files saved with this command do not contain sufficient information
to reconstruct the ‘full’ state of a simulation, hence they can not
be used to load and restart a previous simulation. For this, the more
SaveCommandshould be used.
DataSaveCommand(name, parent, **kwargs)¶