Source code for rsrtx.Implementations.Measurement.EyeJitter.GenSettings.MleHistogram.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, measurement=repcap.Measurement.Default) -> None: """ ``MEASurement<*>:EYEJitter:GENSettings:MLEHistogram:THReshold`` \n Snippet: ``driver.measurement.eyeJitter.genSettings.mleHistogram.threshold.set(meas_lev_thres = 1.0, measurement = repcap.Measurement.Default)`` \n Sets the threshold 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 measurement: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement') """ param = Conversions.decimal_value_to_str(meas_lev_thres) measurement_cmd_val = self._cmd_group.get_repcap_cmd_value(measurement, repcap.Measurement) self._core.io.write_with_opc(f'MEASurement{measurement_cmd_val}:EYEJitter:GENSettings:MLEHistogram:THReshold {param}')
[docs] def get(self, measurement=repcap.Measurement.Default) -> float: """ ``MEASurement<*>:EYEJitter:GENSettings:MLEHistogram:THReshold`` \n Snippet: ``value: float = driver.measurement.eyeJitter.genSettings.mleHistogram.threshold.get(measurement = repcap.Measurement.Default)`` \n Sets the threshold used to separate peaks: two peaks are separated if they are split by a valley of height Threshold * Maximal_histogram_value. :param measurement: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement') """ measurement_cmd_val = self._cmd_group.get_repcap_cmd_value(measurement, repcap.Measurement) response = self._core.io.query_str_with_opc(f'MEASurement{measurement_cmd_val}:EYEJitter:GENSettings:MLEHistogram:THReshold?') return Conversions.str_to_float(response)