Measurement#
- class Measurement(
- channel_data: dict[str, list[float] | list[str]],
- timestamps: list[int],
- tags: dict[str, str] | None = None,
Bases:
objectData structure to hold measurement data. All channels have a common timebase.
- Variables:
channel_data (dict[str, list[float] | list[str]]) – Maps channel names (or numbers, as strings) to that channel’s samples. Every value in a channel’s list is the same type, either
floatorstr, never mixed; a categorical read such as a mode name or state is a string-valued list.timestamps (list[int]) – Timestamps in integer nanoseconds since the Unix epoch, one per sample and aligned with the values in
channel_data. Its length matches the length of every list inchannel_data.tags (dict[str, str] | None) – Optional metadata for the acquisition, such as a test ID, operator name, or environmental qualifier. Used for search, provenance, and analysis.
See
Commandfor the write counterpart, which carries one datapoint per channel.- static create_timestamps_from_dt( ) list[int][source]#
Build a
length-long timestamp list atdtns spacing starting att0(ns since epoch).With
backstamp=True, shiftt0back bydt * (length - 1)so the last sample lands at the originalt0(useful whent0is the completion time of a finite acquisition).