event

classes.event

Runtime wrapper around the auto-generated :class:tvbo_datamodel.Event.

Adds an intelligent :meth:Event.plot for stimulus-type events. The signal is built generically from the event’s symbolic equation and its parameters, mirroring the pattern used by :class:tvbo.classes.dynamics.Dynamics and :class:tvbo.classes.perturbation.Stimulus.

Classes

Name Description
Event :class:tvbo_datamodel.Event plus user-facing helpers.

Event

classes.event.Event(
    name=None,
    label=None,
    description=None,
    parameters=empty_dict(),
    event_type='stimulus',
    condition=None,
    condition_states=empty_list(),
    condition_parameters=empty_list(),
    affect=None,
    affect_states=empty_list(),
    affect_parameters=empty_list(),
    affect_negative=None,
    trigger_times=empty_list(),
    target_component=None,
    equation=None,
    nodes=empty_list(),
    weights=empty_list(),
    weight_distribution=None,
    target_variable=None,
    target_regions=empty_list(),
    duration=None,
    dataLocation=None,
    sampling_rate=1.0,
    interpolation='linear',
)

:class:tvbo_datamodel.Event plus user-facing helpers.

Methods

Name Description
plot Plot the event signal vs time.
plot
classes.event.Event.plot(t=None, n=1001, ax=None, onset_kw=None, **kwargs)

Plot the event signal vs time.

Parameters

t : array-like, optional Time samples. If None, inferred from event parameters. n : int Number of samples when t is auto-generated. ax : matplotlib Axes, optional Axes to draw into. A new figure is returned when ax is None. onset_kw : dict, optional Style overrides for the onset vertical line, e.g. onset_kw={"color": "blue", "linewidth": 2}. Defaults: {"color": "red", "linestyle": "--", "linewidth": 0.7}. **kwargs Forwarded to ax.plot for the signal line.