MetaData - the metrologically enabled time-series metadata scheme

The module time_series_metadata.scheme contains the main class of the package. It provides the Python implementation of the scheme.

This module contains the following class:

  • MetaData: Wrapper class for metrologically enabled time-series metadata

MetaData

class time_series_metadata.scheme.MetaData(device_id: str = '', time_name: str = 'time', time_unit: str = 'om:second', quantity_names: Union[str, Tuple[str, ...]] = '', quantity_units: Union[str, Tuple[str, ...]] = '', misc: Optional[Any] = None)[source]
get_quantity(index: int = 0, name: str = None) → Dict[KT, VT][source]

Return the metadata for one of the quantities

Parameters:
  • index (int, optional) – Index of the quantity in the initial tuple (default = 0). If name is set, index is ignored.
  • name (str, optional) – Name of the quantity. If name is set, index is ignored.
Returns:

metadata – the metadata for the specified quantity

Return type:

dict

metadata

Return the metadata as a whole

Returns:metadata – the metadata dictionary as a whole
Return type:Dict
misc

Return the additionally provided metadata

Returns:metadata – all misc metadata key value pairs
Return type:dict
quantities

Return all quantities metadata

Returns:metadata – all quantity metadata key value pairs
Return type:dict
time

Return the time metadata

Returns:metadata – all time metadata key value pairs
Return type:dict