Source code for rsmxo.Implementations.Cursor.X1Envelope

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 X1EnvelopeCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, envlp_curve_sel_source_1: enums.EnvelopeCurve, cursor=repcap.Cursor.Default) -> None: """ ``CURSor<*>:X1ENvelope`` \n Snippet: ``driver.cursor.x1Envelope.set(envlp_curve_sel_source_1 = enums.EnvelopeCurve.BOTH, cursor = repcap.Cursor.Default)`` \n Define which horizontal cursor is positioned to the maximum and which to the minimum envelope values. Prerequisites: Sets the acquisition and average count, which has a double effect: \n - method ``RsMxo.acquire.type_py()`` is set to ENVElope or PDETect. - method ``RsMxo.cursor.tracking.state.set()`` is set to ON. - method ``RsMxo.cursor.function.set()`` is set to PAIRed. :param envlp_curve_sel_source_1: MIN | MAX \n - MIN: The horizontal cursor is set to the crossing point of the vertical cursor with the minimum waveform envelope. - MAX: The horizontal cursor is set to the crossing point of the vertical cursor with the maximum waveform envelope. :param cursor: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cursor') """ param = Conversions.enum_scalar_to_str(envlp_curve_sel_source_1, enums.EnvelopeCurve) cursor_cmd_val = self._cmd_group.get_repcap_cmd_value(cursor, repcap.Cursor) self._core.io.write(f'CURSor{cursor_cmd_val}:X1ENvelope {param}')
# noinspection PyTypeChecker
[docs] def get(self, cursor=repcap.Cursor.Default) -> enums.EnvelopeCurve: """ ``CURSor<*>:X1ENvelope`` \n Snippet: ``value: enums.EnvelopeCurve = driver.cursor.x1Envelope.get(cursor = repcap.Cursor.Default)`` \n Define which horizontal cursor is positioned to the maximum and which to the minimum envelope values. Prerequisites: Sets the acquisition and average count, which has a double effect: \n - method ``RsMxo.acquire.type_py()`` is set to ENVElope or PDETect. - method ``RsMxo.cursor.tracking.state.set()`` is set to ON. - method ``RsMxo.cursor.function.set()`` is set to PAIRed. :param cursor: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cursor') """ cursor_cmd_val = self._cmd_group.get_repcap_cmd_value(cursor, repcap.Cursor) response = self._core.io.query_str(f'CURSor{cursor_cmd_val}:X1ENvelope?') return Conversions.str_to_scalar_enum(response, enums.EnvelopeCurve)