Source code for RsSmw.Implementations.Source.Iq.Impairment

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ImpairmentCls:
	"""
	| Commands in total: 5
	| Subgroups: 3
	| Direct child commands: 1
	"""

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

	@property
	def iqRatio(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_iqRatio'):
			from .IqRatio import IqRatioCls
			self._iqRatio = IqRatioCls(self._core, self._cmd_group)
		return self._iqRatio

	@property
	def leakage(self):
		"""
		| Commands in total: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		if not hasattr(self, '_leakage'):
			from .Leakage import LeakageCls
			self._leakage = LeakageCls(self._core, self._cmd_group)
		return self._leakage

	@property
	def quadrature(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_quadrature'):
			from .Quadrature import QuadratureCls
			self._quadrature = QuadratureCls(self._core, self._cmd_group)
		return self._quadrature

[docs] def get_state(self) -> bool: """ ``[SOURce<HW>]:IQ:IMPairment:[STATe]`` \n Snippet: ``value: bool = driver.source.iq.impairment.get_state()`` \n Activates the impairment or correction values LEAKage, QUADrature and IQRatio for the corresponding stream. :return: state: 1 | ON | 0| OFF """ response = self._core.io.query_str('SOURce<HwInstance>:IQ:IMPairment:STATe?') return Conversions.str_to_bool(response)
[docs] def set_state(self, state: bool) -> None: """ ``[SOURce<HW>]:IQ:IMPairment:[STATe]`` \n Snippet: ``driver.source.iq.impairment.set_state(state = False)`` \n Activates the impairment or correction values LEAKage, QUADrature and IQRatio for the corresponding stream. :param state: 1 | ON | 0| OFF """ param = Conversions.bool_to_str(state) self._core.io.write(f'SOURce<HwInstance>:IQ:IMPairment:STATe {param}')
def clone(self) -> 'ImpairmentCls': """ 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 = ImpairmentCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group