Source code for rsmxo.Implementations.Eye.Vertical.Scale

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


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

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

[docs] def set(self, vertical_scale: float, eye=repcap.Eye.Default) -> None: """ ``EYE<*>:VERTical:SCALe`` \n Snippet: ``driver.eye.vertical.scale.set(vertical_scale = 1.0, eye = repcap.Eye.Default)`` \n Defines the vertical scale in Volts per division if method ``RsMxo.eye.vertical.couple.set()`` is OFF. If coupling is ON, the query returns the coupled value. :param vertical_scale: 1E-12 to 100000000000000 :param eye: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Eye') """ param = Conversions.decimal_value_to_str(vertical_scale) eye_cmd_val = self._cmd_group.get_repcap_cmd_value(eye, repcap.Eye) self._core.io.write(f'EYE{eye_cmd_val}:VERTical:SCALe {param}')
[docs] def get(self, eye=repcap.Eye.Default) -> float: """ ``EYE<*>:VERTical:SCALe`` \n Snippet: ``value: float = driver.eye.vertical.scale.get(eye = repcap.Eye.Default)`` \n Defines the vertical scale in Volts per division if method ``RsMxo.eye.vertical.couple.set()`` is OFF. If coupling is ON, the query returns the coupled value. :param eye: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Eye') :return: vertical_scale: 1E-12 to 100000000000000 """ eye_cmd_val = self._cmd_group.get_repcap_cmd_value(eye, repcap.Eye) response = self._core.io.query_str(f'EYE{eye_cmd_val}:VERTical:SCALe?') return Conversions.str_to_float(response)