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 YstretchCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("ystretch", core, parent)
[docs]
def set(self, mask_test: str, vert_stretch: float) -> None:
"""
``MTESt:WFMRescale:YSTRetch`` \n
Snippet: ``driver.mtest.wfmRescale.ystretch.set(mask_test = 'abc', vert_stretch = 1.0)`` \n
Sets the vertical scaling to stretch the mask in y-direction. The scaling axis is the horizontal line through the lowest
value of the lower mask limit.
:param mask_test: String containing the name of the mask test
:param vert_stretch: Scale factor in %
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('mask_test', mask_test, DataType.String), ArgSingle('vert_stretch', vert_stretch, DataType.Float))
self._core.io.write_with_opc(f'MTESt:WFMRescale:YSTRetch {param}'.rstrip())
[docs]
def get(self, mask_test: str) -> float:
"""
``MTESt:WFMRescale:YSTRetch`` \n
Snippet: ``value: float = driver.mtest.wfmRescale.ystretch.get(mask_test = 'abc')`` \n
Sets the vertical scaling to stretch the mask in y-direction. The scaling axis is the horizontal line through the lowest
value of the lower mask limit.
:param mask_test: String containing the name of the mask test
:return: vert_stretch: Scale factor in %
"""
param = Conversions.value_to_quoted_str(mask_test)
response = self._core.io.query_str_with_opc(f'MTESt:WFMRescale:YSTRetch? {param}')
return Conversions.str_to_float(response)