Source code for rsmxo.Implementations.Mtest.Automask.Ytolerance.Divisions

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import repcap


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

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

[docs] def set(self, vertical_tol: float, maskTest=repcap.MaskTest.Default) -> None: """ ``MTESt<*>:AUTomask:YTOLerance:DIVisions`` \n Snippet: ``driver.mtest.automask.ytolerance.divisions.set(vertical_tol = 1.0, maskTest = repcap.MaskTest.Default)`` \n Sets the height of the mask in vertical direction in divisions, and sets method ``RsMxo.mtest.automask.ytUnit.set()`` to DIVisions. :param vertical_tol: Tolerance value in divisions. The overall mask height is twice the specified value. :param maskTest: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Mtest') """ param = Conversions.decimal_value_to_str(vertical_tol) maskTest_cmd_val = self._cmd_group.get_repcap_cmd_value(maskTest, repcap.MaskTest) self._core.io.write(f'MTESt{maskTest_cmd_val}:AUTomask:YTOLerance:DIVisions {param}')
[docs] def get(self, maskTest=repcap.MaskTest.Default) -> float: """ ``MTESt<*>:AUTomask:YTOLerance:DIVisions`` \n Snippet: ``value: float = driver.mtest.automask.ytolerance.divisions.get(maskTest = repcap.MaskTest.Default)`` \n Sets the height of the mask in vertical direction in divisions, and sets method ``RsMxo.mtest.automask.ytUnit.set()`` to DIVisions. :param maskTest: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Mtest') :return: vertical_tol: Tolerance value in divisions. The overall mask height is twice the specified value. """ maskTest_cmd_val = self._cmd_group.get_repcap_cmd_value(maskTest, repcap.MaskTest) response = self._core.io.query_str(f'MTESt{maskTest_cmd_val}:AUTomask:YTOLerance:DIVisions?') return Conversions.str_to_float(response)