observation

behaviour.observation

What an Observation record does: load by file or database name, render and build its backend monitor, and draw itself.

Classes

Name Description
ObservationBehaviour A declared observation model’s factory constructors, backend rendering and plots, on both generated forms.

ObservationBehaviour

behaviour.observation.ObservationBehaviour()

A declared observation model’s factory constructors, backend rendering and plots, on both generated forms.

Methods

Name Description
execute Convert this observation to a backend monitor object.
plot Plot a visual summary of this observation model.
render_code Generate backend code that creates this monitor.
execute
behaviour.observation.ObservationBehaviour.execute(format='tvb')

Convert this observation to a backend monitor object.

Parameters
Name Type Description Default
format str Target backend. Currently "tvb" is supported. 'tvb'
Returns
Name Type Description
The configured tvb.simulator.monitors.Monitor instance.
plot
behaviour.observation.ObservationBehaviour.plot(ax=None, **kwargs)

Plot a visual summary of this observation model.

The plot type is derived purely from the pipeline structure:

  • kernel step present (step with time_range): evaluates and plots the kernel function.
  • all other cases: draws an annotated pipeline flowchart where each box is tagged with its structural operation type, one of the keys of _OP_COLORS.
Parameters
Name Type Description Default
ax Matplotlib axes to draw into. A new figure is returned when ax is None. None
**kwargs Forwarded to the underlying plot call. {}
render_code
behaviour.observation.ObservationBehaviour.render_code(format='tvb')

Generate backend code that creates this monitor.

Parameters
Name Type Description Default
format str Target backend. Currently "tvb" is supported. 'tvb'
Returns
Name Type Description
Executable Python code string.