Source code for rsrtx.Implementations.Mtest.WfmRescale.Ywidth

from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from ....Internal.Types import DataType
from ....Internal.ArgSingleList import ArgSingleList
from ....Internal.ArgSingle import ArgSingle


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class YwidthCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("ywidth", core, parent)

[docs] def set(self, mask_test: str, vertical_width: float) -> None: """ ``MTESt:WFMRescale:YWIDth`` \n Snippet: ``driver.mtest.wfmRescale.ywidth.set(mask_test = 'abc', vertical_width = 1.0)`` \n Sets the width of the waveform mask in vertical direction. The specified factor in divisions is added to the y-values of the upper mask limit and subtracted from the y-values of the lower mask limit. Thus, the upper half of the mask is pulled upwards, the lower half is pulled down. :param mask_test: String containing the name of the mask test :param vertical_width: Vertical mask width in divisions """ param = ArgSingleList().compose_cmd_string(ArgSingle('mask_test', mask_test, DataType.String), ArgSingle('vertical_width', vertical_width, DataType.Float)) self._core.io.write_with_opc(f'MTESt:WFMRescale:YWIDth {param}'.rstrip())
[docs] def get(self, mask_test: str) -> float: """ ``MTESt:WFMRescale:YWIDth`` \n Snippet: ``value: float = driver.mtest.wfmRescale.ywidth.get(mask_test = 'abc')`` \n Sets the width of the waveform mask in vertical direction. The specified factor in divisions is added to the y-values of the upper mask limit and subtracted from the y-values of the lower mask limit. Thus, the upper half of the mask is pulled upwards, the lower half is pulled down. :param mask_test: String containing the name of the mask test :return: vertical_width: Vertical mask width in divisions """ param = Conversions.value_to_quoted_str(mask_test) response = self._core.io.query_str_with_opc(f'MTESt:WFMRescale:YWIDth? {param}') return Conversions.str_to_float(response)