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

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 XwidthCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, mask_test: str, horiz_wdt: float) -> None: """ ``MTESt:WFMRescale:XWIDth`` \n Snippet: ``driver.mtest.wfmRescale.xwidth.set(mask_test = 'abc', horiz_wdt = 1.0)`` \n Sets the width of the mask in horizontal direction. The specified factor in divisions is added to the positive x-values and subtracted from the negative x-values of the mask limits in relation to the source waveform of the mask. :param mask_test: String containing the name of the mask test :param horiz_wdt: 0 to 1000 """ param = ArgSingleList().compose_cmd_string(ArgSingle('mask_test', mask_test, DataType.String), ArgSingle('horiz_wdt', horiz_wdt, DataType.Float)) self._core.io.write_with_opc(f'MTESt:WFMRescale:XWIDth {param}'.rstrip())
[docs] def get(self, mask_test: str) -> float: """ ``MTESt:WFMRescale:XWIDth`` \n Snippet: ``value: float = driver.mtest.wfmRescale.xwidth.get(mask_test = 'abc')`` \n Sets the width of the mask in horizontal direction. The specified factor in divisions is added to the positive x-values and subtracted from the negative x-values of the mask limits in relation to the source waveform of the mask. :param mask_test: String containing the name of the mask test :return: horiz_wdt: 0 to 1000 """ param = Conversions.value_to_quoted_str(mask_test) response = self._core.io.query_str_with_opc(f'MTESt:WFMRescale:XWIDth? {param}') return Conversions.str_to_float(response)