Source code for rsmxo.Implementations.Mdefaults.Settings.Eye.Threshold

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


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

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

[docs] def set(self, meas_lev_thres: float, settings=repcap.Settings.Default) -> None: """ ``MDEFaults:SETTings<*>:EYE:THReshold`` \n Snippet: ``driver.mdefaults.settings.eye.threshold.set(meas_lev_thres = 1.0, settings = repcap.Settings.Default)`` \n Sets the threshold that is used to separate peaks. Two peaks are separated if they are split by a valley of height Threshold * Maximal_histogram_value. :param meas_lev_thres: 1 to 99 :param settings: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Settings') """ param = Conversions.decimal_value_to_str(meas_lev_thres) settings_cmd_val = self._cmd_group.get_repcap_cmd_value(settings, repcap.Settings) self._core.io.write(f'MDEFaults:SETTings{settings_cmd_val}:EYE:THReshold {param}')
[docs] def get(self, settings=repcap.Settings.Default) -> float: """ ``MDEFaults:SETTings<*>:EYE:THReshold`` \n Snippet: ``value: float = driver.mdefaults.settings.eye.threshold.get(settings = repcap.Settings.Default)`` \n Sets the threshold that is used to separate peaks. Two peaks are separated if they are split by a valley of height Threshold * Maximal_histogram_value. :param settings: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Settings') :return: meas_lev_thres: 1 to 99 """ settings_cmd_val = self._cmd_group.get_repcap_cmd_value(settings, repcap.Settings) response = self._core.io.query_str(f'MDEFaults:SETTings{settings_cmd_val}:EYE:THReshold?') return Conversions.str_to_float(response)