Source code for RsSmw.Implementations.Source.Iq.Dpd

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class DpdCls:
	"""
	| Commands in total: 53
	| Subgroups: 10
	| Direct child commands: 5
	"""

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

	@property
	def amam(self):
		"""
		| Commands in total: 4
		| Subgroups: 1
		| Direct child commands: 1
		"""
		if not hasattr(self, '_amam'):
			from .Amam import AmamCls
			self._amam = AmamCls(self._core, self._cmd_group)
		return self._amam

	@property
	def amPm(self):
		"""
		| Commands in total: 4
		| Subgroups: 1
		| Direct child commands: 1
		"""
		if not hasattr(self, '_amPm'):
			from .AmPm import AmPmCls
			self._amPm = AmPmCls(self._core, self._cmd_group)
		return self._amPm

	@property
	def gain(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_gain'):
			from .Gain import GainCls
			self._gain = GainCls(self._core, self._cmd_group)
		return self._gain

	@property
	def inputPy(self):
		"""
		| Commands in total: 3
		| Subgroups: 0
		| Direct child commands: 3
		"""
		if not hasattr(self, '_inputPy'):
			from .InputPy import InputPyCls
			self._inputPy = InputPyCls(self._core, self._cmd_group)
		return self._inputPy

	@property
	def lrf(self):
		"""
		| Commands in total: 4
		| Subgroups: 1
		| Direct child commands: 2
		"""
		if not hasattr(self, '_lrf'):
			from .Lrf import LrfCls
			self._lrf = LrfCls(self._core, self._cmd_group)
		return self._lrf

	@property
	def measurement(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_measurement'):
			from .Measurement import MeasurementCls
			self._measurement = MeasurementCls(self._core, self._cmd_group)
		return self._measurement

	@property
	def output(self):
		"""
		| Commands in total: 6
		| Subgroups: 2
		| Direct child commands: 3
		"""
		if not hasattr(self, '_output'):
			from .Output import OutputCls
			self._output = OutputCls(self._core, self._cmd_group)
		return self._output

	@property
	def pin(self):
		"""
		| Commands in total: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		if not hasattr(self, '_pin'):
			from .Pin import PinCls
			self._pin = PinCls(self._core, self._cmd_group)
		return self._pin

	@property
	def setting(self):
		"""
		| Commands in total: 4
		| Subgroups: 0
		| Direct child commands: 4
		"""
		if not hasattr(self, '_setting'):
			from .Setting import SettingCls
			self._setting = SettingCls(self._core, self._cmd_group)
		return self._setting

	@property
	def shaping(self):
		"""
		| Commands in total: 19
		| Subgroups: 3
		| Direct child commands: 1
		"""
		if not hasattr(self, '_shaping'):
			from .Shaping import ShapingCls
			self._shaping = ShapingCls(self._core, self._cmd_group)
		return self._shaping

[docs] def get_am_first(self) -> bool: """ ``[SOURce<HW>]:IQ:DPD:AMFirst`` \n Snippet: ``value: bool = driver.source.iq.dpd.get_am_first()`` \n Sets that the AM/AM predistortion is applied before the AM/PM. :return: am_am_first_state: 1 | ON | 0| OFF """ response = self._core.io.query_str('SOURce<HwInstance>:IQ:DPD:AMFirst?') return Conversions.str_to_bool(response)
[docs] def set_am_first(self, am_am_first_state: bool) -> None: """ ``[SOURce<HW>]:IQ:DPD:AMFirst`` \n Snippet: ``driver.source.iq.dpd.set_am_first(am_am_first_state = False)`` \n Sets that the AM/AM predistortion is applied before the AM/PM. :param am_am_first_state: 1 | ON | 0| OFF """ param = Conversions.bool_to_str(am_am_first_state) self._core.io.write(f'SOURce<HwInstance>:IQ:DPD:AMFirst {param}')
# noinspection PyTypeChecker
[docs] def get_lreference(self) -> enums.DpdPowRef: """ ``[SOURce<HW>]:IQ:DPD:LREFerence`` \n Snippet: ``value: enums.DpdPowRef = driver.source.iq.dpd.get_lreference()`` \n Sets whether a dynamic (BDPD | ADPD) or a static (SDPS) adaptation of the range the selected DPD is applied on. :return: level_reference: BDPD | ADPD | SDPD """ response = self._core.io.query_str('SOURce<HwInstance>:IQ:DPD:LREFerence?') return Conversions.str_to_scalar_enum(response, enums.DpdPowRef)
[docs] def set_lreference(self, level_reference: enums.DpdPowRef) -> None: """ ``[SOURce<HW>]:IQ:DPD:LREFerence`` \n Snippet: ``driver.source.iq.dpd.set_lreference(level_reference = enums.DpdPowRef.ADPD)`` \n Sets whether a dynamic (BDPD | ADPD) or a static (SDPS) adaptation of the range the selected DPD is applied on. :param level_reference: BDPD | ADPD | SDPD """ param = Conversions.enum_scalar_to_str(level_reference, enums.DpdPowRef) self._core.io.write(f'SOURce<HwInstance>:IQ:DPD:LREFerence {param}')
[docs] def preset(self) -> None: """ ``[SOURce<HW>]:IQ:DPD:PRESet`` \n Snippet: ``driver.source.iq.dpd.preset()`` \n Sets the default DPD settings (``*RST`` values specified for the commands) . Not affected is the state set with the method ``RsSmw.source.iq.dpd.state()`` . """ self._core.io.write(f'SOURce<HwInstance>:IQ:DPD:PRESet')
[docs] def preset_with_opc(self, opc_timeout_ms: int = -1) -> None: """ ``[SOURce<HW>]:IQ:DPD:PRESet`` \n Snippet: ``driver.source.iq.dpd.preset_with_opc()`` \n Sets the default DPD settings (``*RST`` values specified for the commands) . Not affected is the state set with the method ``RsSmw.source.iq.dpd.state()`` . Same as preset, but waits for the operation to complete before continuing further. Use the RsSmw.utilities.opc_timeout_set() to set the timeout value. :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call. """ self._core.io.write_with_opc(f'SOURce<HwInstance>:IQ:DPD:PRESet', opc_timeout_ms)
# noinspection PyTypeChecker
[docs] def get_scale(self) -> enums.IqOutEnvScale: """ ``[SOURce<HW>]:IQ:DPD:SCALe`` \n Snippet: ``value: enums.IqOutEnvScale = driver.source.iq.dpd.get_scale()`` \n Determines the units used on the x and y-axis. :return: scale: POWer | VOLTage """ response = self._core.io.query_str('SOURce<HwInstance>:IQ:DPD:SCALe?') return Conversions.str_to_scalar_enum(response, enums.IqOutEnvScale)
[docs] def set_scale(self, scale: enums.IqOutEnvScale) -> None: """ ``[SOURce<HW>]:IQ:DPD:SCALe`` \n Snippet: ``driver.source.iq.dpd.set_scale(scale = enums.IqOutEnvScale.POWer)`` \n Determines the units used on the x and y-axis. :param scale: POWer | VOLTage """ param = Conversions.enum_scalar_to_str(scale, enums.IqOutEnvScale) self._core.io.write(f'SOURce<HwInstance>:IQ:DPD:SCALe {param}')
[docs] def get_state(self) -> bool: """ ``[SOURce<HW>]:IQ:DPD:STATe`` \n Snippet: ``value: bool = driver.source.iq.dpd.get_state()`` \n Enabels/disables the generation of digitally pre-distorted signals. :return: state: 1 | ON | 0| OFF """ response = self._core.io.query_str('SOURce<HwInstance>:IQ:DPD:STATe?') return Conversions.str_to_bool(response)
[docs] def set_state(self, state: bool) -> None: """ ``[SOURce<HW>]:IQ:DPD:STATe`` \n Snippet: ``driver.source.iq.dpd.set_state(state = False)`` \n Enabels/disables the generation of digitally pre-distorted signals. :param state: 1 | ON | 0| OFF """ param = Conversions.bool_to_str(state) self._core.io.write(f'SOURce<HwInstance>:IQ:DPD:STATe {param}')
def clone(self) -> 'DpdCls': """ 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 = DpdCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group