from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class IdenticalCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("identical", core, parent)
[docs]
def set(self, matched_paths: bool, deembedding=repcap.Deembedding.Default, component=repcap.Component.Default) -> None:
"""
``DEEMbedding<*>:COMPonent<*>:IDENtical`` \n
Snippet: ``driver.deembedding.component.identical.set(matched_paths = False, deembedding = repcap.Deembedding.Default, component = repcap.Component.Default)`` \n
The setting is relevant if the measurement setup is a 4-port, and the component is a 2- port. Usually, these components
are cables and adapters, which are described by s2p files. In case of a 4-port setup, 2 cables or 2 adapters are used. If
they are identical, for example, when a matched-pair cable is used, they can be described by the same file. In this case,
set the command to ON.
:param matched_paths: OFF | ON
:param deembedding: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Deembedding')
:param component: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Component')
"""
param = Conversions.bool_to_str(matched_paths)
deembedding_cmd_val = self._cmd_group.get_repcap_cmd_value(deembedding, repcap.Deembedding)
component_cmd_val = self._cmd_group.get_repcap_cmd_value(component, repcap.Component)
self._core.io.write_with_opc(f'DEEMbedding{deembedding_cmd_val}:COMPonent{component_cmd_val}:IDENtical {param}')
[docs]
def get(self, deembedding=repcap.Deembedding.Default, component=repcap.Component.Default) -> bool:
"""
``DEEMbedding<*>:COMPonent<*>:IDENtical`` \n
Snippet: ``value: bool = driver.deembedding.component.identical.get(deembedding = repcap.Deembedding.Default, component = repcap.Component.Default)`` \n
The setting is relevant if the measurement setup is a 4-port, and the component is a 2- port. Usually, these components
are cables and adapters, which are described by s2p files. In case of a 4-port setup, 2 cables or 2 adapters are used. If
they are identical, for example, when a matched-pair cable is used, they can be described by the same file. In this case,
set the command to ON.
:param deembedding: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Deembedding')
:param component: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Component')
:return: matched_paths: OFF | ON
"""
deembedding_cmd_val = self._cmd_group.get_repcap_cmd_value(deembedding, repcap.Deembedding)
component_cmd_val = self._cmd_group.get_repcap_cmd_value(component, repcap.Component)
response = self._core.io.query_str_with_opc(f'DEEMbedding{deembedding_cmd_val}:COMPonent{component_cmd_val}:IDENtical?')
return Conversions.str_to_bool(response)