Source code for rsrtx.Implementations.Deembedding.Component.SpTwo

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


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

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

[docs] def set(self, sparam_file_path_2: str, deembedding=repcap.Deembedding.Default, component=repcap.Component.Default) -> None: """ ``DEEMbedding<*>:COMPonent<*>:SPTWo`` \n Snippet: ``driver.deembedding.component.spTwo.set(sparam_file_path_2 = 'abc', deembedding = repcap.Deembedding.Default, component = repcap.Component.Default)`` \n Set the file name and path of the S-parameter file, and load the S-parameters. See also: 'S-Parameters, File type'. :param sparam_file_path_2: String with path and file name. :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.value_to_quoted_str(sparam_file_path_2) 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}:SPTWo {param}')
[docs] def get(self, deembedding=repcap.Deembedding.Default, component=repcap.Component.Default) -> str: """ ``DEEMbedding<*>:COMPonent<*>:SPTWo`` \n Snippet: ``value: str = driver.deembedding.component.spTwo.get(deembedding = repcap.Deembedding.Default, component = repcap.Component.Default)`` \n Set the file name and path of the S-parameter file, and load the S-parameters. See also: 'S-Parameters, File type'. :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') """ 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}:SPTWo?') return trim_str_response(response)