Skip to content

Commit

Permalink
Merge pull request #21 from Rohde-Schwarz/14-metadata-of-wv-files-mak…
Browse files Browse the repository at this point in the history
…e-some-properties-public

Adding samples and reflevel to meta data wv
  • Loading branch information
floschl authored Apr 23, 2024
2 parents 546a5e1 + c4b491a commit e448641
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/RsWaveform/meta/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"control_list": None,
"rms": None,
"peak": None,
"samples": None,
"reflevel": None,
}

META_IQTAR_DEFAULTS = {
Expand Down
22 changes: 20 additions & 2 deletions src/RsWaveform/meta/meta_wv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit e448641

Please sign in to comment.