From c4b491a8be8f47490c524376f6152dda4fcfa90e Mon Sep 17 00:00:00 2001 From: Carsten Sauerbrey Date: Tue, 23 Apr 2024 12:30:08 +0200 Subject: [PATCH] Adding samples and reflevel to meta data wv --- src/RsWaveform/meta/defaults.py | 2 ++ src/RsWaveform/meta/meta_wv.py | 22 ++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/RsWaveform/meta/defaults.py b/src/RsWaveform/meta/defaults.py index 3aacdd0..543700b 100644 --- a/src/RsWaveform/meta/defaults.py +++ b/src/RsWaveform/meta/defaults.py @@ -10,6 +10,8 @@ "control_list": None, "rms": None, "peak": None, + "samples": None, + "reflevel": None, } META_IQTAR_DEFAULTS = { diff --git a/src/RsWaveform/meta/meta_wv.py b/src/RsWaveform/meta/meta_wv.py index dce1ea4..7f86d5a 100644 --- a/src/RsWaveform/meta/meta_wv.py +++ b/src/RsWaveform/meta/meta_wv.py @@ -82,7 +82,7 @@ def control_length(self, value: typing.Optional[int]) -> None: @property def rms(self) -> typing.Optional[float]: - """Read the RMS value.""" + """The RMS value of the signal.""" return self._items.get("rms") @rms.setter @@ -91,9 +91,27 @@ def rms(self, value: float) -> None: @property def peak(self) -> typing.Optional[float]: - """Read the signal peak value.""" + """The signal peak value of the signal.""" return self._items.get("peak") @peak.setter def peak(self, value: float) -> None: self._items["peak"] = value + + @property + def samples(self) -> typing.Optional[int]: + """The sample count of the waveform.""" + return self._items.get("samples") + + @samples.setter + def samples(self, value: int) -> None: + self._items["samples"] = value + + @property + def reflevel(self) -> typing.Optional[float]: + """The reference value of the signal.""" + return self._items.get("reflevel") + + @reflevel.setter + def reflevel(self, value: float) -> None: + self._items["reflevel"] = value