Recorder
Recorder(self)Data structure to record activities during a simulation.
Example:
recorder = Recorder()
for t in range(1000):
# ...
recorder.record({
'rc': rc.output(),
'readout': readout.output(),
})
data = recorder.get()Methods
| Name | Description |
|---|---|
| clear | Clears the data. |
| get | Returns a dictionary with the recorded data. |
| record | Accumulates the content of the dictionary. Keys are created if needed. |
clear
Recorder.clear()Clears the data.
get
Recorder.get()Returns a dictionary with the recorded data.
The next call to record() with clear the data.
Returns
| Name | Type | Description |
|---|---|---|
| dict | a dictionary of numpy arrays. |
record
Recorder.record(data)Accumulates the content of the dictionary. Keys are created if needed.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| data | dict | dictionary of numpy arrays to record. | required |