name | arguments | returns |
__init__ | bins=None, active=False, chem_labels=None, frequency=1 | |
:param bins: List of bin addresses for which history is to be kept; use None to mean all
:param active: Flag indicating whether the history is enabled
:param chem_labels: List of chemicals for which history is to be kept; use None to mean all
:param frequency: How many simulation cycles to wait until taking another data snapshoot
|
name | arguments | returns |
enable_history | frequency=1, chem_labels=None, bins=None | None |
Request history capture, with the specified parameters.
If history was already enabled, this function can be used to alter its capture parameters.
:param frequency:
:param chem_labels: [OPTIONAL] List of chemicals to include in the history;
if None (default), include them all.
:param bins: [OPTIONAL] Bin address, or list of them;
if None (default), include them all.
:return: None
|
name | arguments | returns |
save_snapshot | system_time, data_snapshot, step_count=None, caption="" | None |
EXAMPLE of data_snapshot (for 1D) systems:
{ 6: {"A": 1.3, "B": 3.9},
8: {"A": 4.6, "B": 2.7}
}
EXAMPLE of data_snapshot (for 2D) systems:
{ (0,0): {"A": 1.3, "B": 3.9},
(3,5): {"A": 4.6, "B": 2.7}
}
:param system_time:
:param data_snapshot:
:param step_count:
:param caption: [OPTIONAL] String to save alongside this snapshot
:return: None
|
name | arguments | returns |
bin_history | bin_address, include_captions=False | |
Return the history at the given bin, as a Pandas dataframe.
The first column is "SYSTEM TIME", and the other ones are the various chemicals for which
history had been enabled.
If no historical data is located, an informational string is returned
:param bin_address: A single bin address. EXAMPLES, in 1D: 8 In 2D : (3,3)
:param include_captions: If True, the captions are returned as an extra "caption" column at the end
:return: A Pandas data frame, or a string if no historical data is present
|
name | arguments | returns |
__init__ | rxns=None, active=False, chem_labels=None, frequency=1 | |
:param rxns: List of reactions (identified by their index) for which history is to be kept; use None to mean all
:param active: Flag indicating whether the history is enabled
:param chem_labels: List of chemicals for which history is to be kept; use None to mean all
:param frequency: How many simulation cycles to wait until taking another data snapshoot
|
name | arguments | returns |
enable_history | frequency=1, chem_labels=None, rxns=None | None |
Request history capture, with the specified parameters.
If history was already enabled, this function can be used to alter its capture parameters.
:param frequency:
:param chem_labels: [OPTIONAL] List of chemicals to include in the history;
if None (default), include them all.
:param rxns:
:return: None
|
name | arguments | returns |
save_snapshot | system_time, data_snapshot, step_count=None, caption="" | None |
EXAMPLE of data_snapshot:
{"rxn1_rate": 6.3, "rxn2_rate": 14.3}
:param system_time:
:param data_snapshot:
:param step_count:
:param caption: [OPTIONAL] String to save alongside this snapshot
:return: None
|
name | arguments | returns |
__init__ | active=False, chem_labels=None, frequency=1 | |
:param active: Flag indicating whether the history is enabled
:param chem_labels: List of chemicals for which history is to be kept; use None to mean all
:param frequency: How many simulation cycles to wait until taking another data snapshoot
|
name | arguments | returns |
enable_history | frequency=1, chem_labels=None | None |
Request history capture, with the specified parameters.
If history was already enabled, this function can be used to alter its capture parameters.
:param frequency:
:param chem_labels: [OPTIONAL] List of chemicals to include in the history;
if None (default), include them all.
:return: None
|
name | arguments | returns |
save_snapshot | system_time, data_snapshot, step_count=None, caption="" | None |
:param system_time:
:param data_snapshot: EXAMPLE: {"A": 1.3, "B": 4.9}
:param step_count:
:param caption: [OPTIONAL] String to save alongside this snapshot
:return: None
|