Skip to content

Tables Recorder

A recorder that saves to PyTables CArray

This Recorder creates a CArray for every node passed to the constructor. Each CArray stores the data for all scenarios on the specific node. This is useful for analysis of Node statistics across multiple scenarios. API Reference

NameDescriptionRequired
modelThe model to record nodes fromOptional
h5fileThe tables file handle or filename to attach the CArray objects to. If a filename is given the object will open and close the file handlesRequired
nodesNodes to save in the tables database. Can be an iterable of Node objects or node names. It can also be a iterable of tuples with a node specific where keyword as the first item and a Node object or name as the second item. If an iterable of tuples is provided then the node specific where keyword is used in preference to the where keyword (see below)Required
parametersParameters to save. Similar to the nodes keyword, except refers to Parameter objects or names thereofRequired
whereDefault path to create the CArrays inside the databaseRequired
timeDefault full node path to save a time tables.Table. If None no table is createdOptional
scenariosDefault full node path to save a scenarios tables.Table. If None no table is createdOptional
routes_flowsRelative (to where) node path to save the routes flow CArray. If None (default) no array is createdOptional
routesFull node path to save the routes tables.Table. If None not table is createdOptional
filter_kwdsFilter keywords to pass to tables.open_file when opening a fileRequired
modeModel argument to pass to tables.open_file. Defaults to ‘w’Optional
metadataDict of user defined attributes to save on the root node (root._v_attrs)Required
create_directoriesIf a file path is given and create_directories is True then attempt to make the intermediate directories. This uses os.makedirs() underneathOptional

coming soon…

{
}