vivyd.data.Signal#

class Signal(*, name, data, units, time)[source]#

Bases: object

A class representing a signal, which is a time series of data points.

Parameters:
  • name (str) – The name of the signal.

  • time (NDArray) – The time points of the signal.

  • data (NDArray) – The data points of the signal. The first dimension should correspond to time, and the remaining dimensions can be used for multi-dimensional signals (e.g., multi-channel recordings).

  • units (UnitQuantity | Quantity) – The units of the value, as defined by the quantities library.

Attributes#

Signal.name: str#
Signal.data: ndarray[tuple[Any, ...], dtype[_ScalarT]]#
Signal.units: UnitQuantity | Quantity#
Signal.time: ndarray[tuple[Any, ...], dtype[_ScalarT]]#

Methods#

Signal.tree(indent=2)[source]#
Parameters:

indent (int, optional) – The number of spaces to indent the tree representation of the signal. Default is 2.

Returns:

The tree representation of the signal.

Return type:

str