Source code for rsmxo.Implementations.Measurement.Eye.Algorithm

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


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

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

[docs] def set(self, algorithm: enums.EyeMeasAlgorithm, measIndex=repcap.MeasIndex.Default) -> None: """ ``MEASurement<*>:EYE:ALGorithm`` \n Snippet: ``driver.measurement.eye.algorithm.set(algorithm = enums.EyeMeasAlgorithm.ACTHeight, measIndex = repcap.MeasIndex.Default)`` \n Selects the algorithm for the measurement of the eye height and eye width. :param algorithm: ACTHeight | MAXHeight | ACTWidth | AWMWindow | MAXWidth | TSIGma \n - TSIGma: Three sigma: The eye height is measured with the settings defined with MDEFaults:Settings:EYE commands.The eye width is measured at the crossing level. - ACTHeight: The actual height is the vertical distance between the top and the bottom of the eye opening at the sampling point. The default window is 40% - 60% of the eye period. Specific start and stop values are used for calculation. - ACTWidth: The eye width is measured at the crossing level. Refers to Crossing level in the GUI. - MAXHeight: The maximum height is theoretical maximum vertical distance between the highest possible 1 level and the lowest possible 0 level. The default measurement window is 40% - 60% of the eye period. Specific start and stop values are used for maximum calculation. - MAXWidth: The maximum width of an eye diagram is the maximum horizontal distance between the points where the ideal eye opening crosses the decision threshold level. Specific start and stop values are used for maximum calculation. - AWMWindow: The eye width is measured as the horizontal distance between the points where the eye opening crosses the threshold level. Specific start and stop values are used for calculation. :param measIndex: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement') """ param = Conversions.enum_scalar_to_str(algorithm, enums.EyeMeasAlgorithm) measIndex_cmd_val = self._cmd_group.get_repcap_cmd_value(measIndex, repcap.MeasIndex) self._core.io.write(f'MEASurement{measIndex_cmd_val}:EYE:ALGorithm {param}')
# noinspection PyTypeChecker
[docs] def get(self, measIndex=repcap.MeasIndex.Default) -> enums.EyeMeasAlgorithm: """ ``MEASurement<*>:EYE:ALGorithm`` \n Snippet: ``value: enums.EyeMeasAlgorithm = driver.measurement.eye.algorithm.get(measIndex = repcap.MeasIndex.Default)`` \n Selects the algorithm for the measurement of the eye height and eye width. :param measIndex: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement') :return: algorithm: ACTHeight | MAXHeight | ACTWidth | AWMWindow | MAXWidth | TSIGma \n - TSIGma: Three sigma: The eye height is measured with the settings defined with MDEFaults:Settings:EYE commands.The eye width is measured at the crossing level. - ACTHeight: The actual height is the vertical distance between the top and the bottom of the eye opening at the sampling point. The default window is 40% - 60% of the eye period. Specific start and stop values are used for calculation. - ACTWidth: The eye width is measured at the crossing level. Refers to Crossing level in the GUI. - MAXHeight: The maximum height is theoretical maximum vertical distance between the highest possible 1 level and the lowest possible 0 level. The default measurement window is 40% - 60% of the eye period. Specific start and stop values are used for maximum calculation. - MAXWidth: The maximum width of an eye diagram is the maximum horizontal distance between the points where the ideal eye opening crosses the decision threshold level. Specific start and stop values are used for maximum calculation. - AWMWindow: The eye width is measured as the horizontal distance between the points where the eye opening crosses the threshold level. Specific start and stop values are used for calculation. """ measIndex_cmd_val = self._cmd_group.get_repcap_cmd_value(measIndex, repcap.MeasIndex) response = self._core.io.query_str(f'MEASurement{measIndex_cmd_val}:EYE:ALGorithm?') return Conversions.str_to_scalar_enum(response, enums.EyeMeasAlgorithm)