Source code for rsrtx.Implementations.Cursor.Ydelta.Slope

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


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

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

[docs] def set(self, delta_slope: float, cursor=repcap.Cursor.Default) -> None: """ ``CURSor<*>:YDELta:SLOPe`` \n Snippet: ``driver.cursor.ydelta.slope.set(delta_slope = 1.0, cursor = repcap.Cursor.Default)`` \n Returns the inverse value of the voltage difference - the reciprocal of the vertical distance of two horizontal cursor lines: 1/ΔV. :param delta_slope: -100E+24 to 100E+24 :param cursor: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cursor') """ param = Conversions.decimal_value_to_str(delta_slope) cursor_cmd_val = self._cmd_group.get_repcap_cmd_value(cursor, repcap.Cursor) self._core.io.write_with_opc(f'CURSor{cursor_cmd_val}:YDELta:SLOPe {param}')
[docs] def get(self, cursor=repcap.Cursor.Default) -> float: """ ``CURSor<*>:YDELta:SLOPe`` \n Snippet: ``value: float = driver.cursor.ydelta.slope.get(cursor = repcap.Cursor.Default)`` \n Returns the inverse value of the voltage difference - the reciprocal of the vertical distance of two horizontal cursor lines: 1/ΔV. :param cursor: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cursor') :return: delta_slope: -100E+24 to 100E+24 """ cursor_cmd_val = self._cmd_group.get_repcap_cmd_value(cursor, repcap.Cursor) response = self._core.io.query_str_with_opc(f'CURSor{cursor_cmd_val}:YDELta:SLOPe?') return Conversions.str_to_float(response)