mahos.msgs.recorder_msgs.RecorderData#

class mahos.msgs.recorder_msgs.RecorderData(params: dict | None = None, label: str = '')#

Recorded multi-channel timeseries with channel/unit metadata.

Variables:
  • units – Ordered (channel, unit) tuples defining recorded channels.

  • data – Per-channel sample buffers aligned to xdata.

  • xdata – Time-axis samples in seconds.

Call set_units() before appending measurement samples.

__init__(params: dict | None = None, label: str = '')#

Methods

__init__([params, label])

append(x, y)

Append data points at single x.

get_channels()

Get list of recorded channel names (data labels).

get_unit(ch)

Get units of channel ch.

get_unit_to_channels()

Get a map from unit to list of corresponding channel.

get_units()

Get list of units.

get_xdata()

Get X-axis data for 2D plot.

get_ydata(ch)

Get Y-axis data for 2D plot.

has_data()

Return True if data is ready and valid data could be read out.

index(ch)

Get index of channel name (data label).

init_axes()

Initialize X and Y axes label, unit, and scale.

roll(data)

Roll data if the length of recorded data exceeds params["max_len"].

set_units(units)

set units and initialize data.