from .........Internal.Core import Core
from .........Internal.CommandsGroup import CommandsGroup
from .........Internal import Conversions
from ......... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ScaleCls:
"""
| Commands in total: 6
| Subgroups: 3
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("scale", core, parent)
@property
def auto(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_auto'):
from .Auto import AutoCls
self._auto = AutoCls(self._core, self._cmd_group)
return self._auto
@property
def manual(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_manual'):
from .Manual import ManualCls
self._manual = ManualCls(self._core, self._cmd_group)
return self._manual
@property
def refLevel(self):
"""
| Commands in total: 3
| Subgroups: 2
| Direct child commands: 1
"""
if not hasattr(self, '_refLevel'):
from .RefLevel import RefLevelCls
self._refLevel = RefLevelCls(self._core, self._cmd_group)
return self._refLevel
[docs]
def set(self, arg_0: float, window=repcap.Window.Default, trace=repcap.Trace.Default) -> None:
"""
``DISPlay[:WINDow<n>]:TRACe<t>:Y[:SCALe]`` \n
Snippet: ``driver.applications.k40PhaseNoise.display.window.trace.y.scale.set(arg_0 = 1.0, window = repcap.Window.Default, trace = repcap.Trace.Default)`` \n
Defines the display range of the y-axis.
:param window: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Window')
:param trace: optional repeated capability selector. Default value: Tr1 (settable in the interface 'Trace')
"""
param = Conversions.decimal_value_to_str(arg_0)
window_cmd_val = self._cmd_group.get_repcap_cmd_value(window, repcap.Window)
trace_cmd_val = self._cmd_group.get_repcap_cmd_value(trace, repcap.Trace)
self._core.io.write(f'DISPlay:WINDow{window_cmd_val}:TRACe{trace_cmd_val}:Y:SCALe {param}')
[docs]
def get(self, window=repcap.Window.Default, trace=repcap.Trace.Default) -> float:
"""
``DISPlay[:WINDow<n>]:TRACe<t>:Y[:SCALe]`` \n
Snippet: ``value: float = driver.applications.k40PhaseNoise.display.window.trace.y.scale.get(window = repcap.Window.Default, trace = repcap.Trace.Default)`` \n
Defines the display range of the y-axis.
:param window: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Window')
:param trace: optional repeated capability selector. Default value: Tr1 (settable in the interface 'Trace')
"""
window_cmd_val = self._cmd_group.get_repcap_cmd_value(window, repcap.Window)
trace_cmd_val = self._cmd_group.get_repcap_cmd_value(trace, repcap.Trace)
response = self._core.io.query_str(f'DISPlay:WINDow{window_cmd_val}:TRACe{trace_cmd_val}:Y:SCALe?')
return Conversions.str_to_float(response)
def clone(self) -> 'ScaleCls':
"""
Clones the group by creating new object from it and its whole existing subgroups.
Also copies all the existing default Repeated Capabilities setting,
which you can change independently without affecting the original group.
"""
new_group = ScaleCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group