from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class RfCls:
"""
| Commands in total: 10
| Subgroups: 4
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("rf", core, parent)
@property
def coffset(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_coffset'):
from .Coffset import CoffsetCls
self._coffset = CoffsetCls(self._core, self._cmd_group)
return self._coffset
@property
def dithering(self):
"""
| Commands in total: 3
| Subgroups: 0
| Direct child commands: 3
"""
if not hasattr(self, '_dithering'):
from .Dithering import DitheringCls
self._dithering = DitheringCls(self._core, self._cmd_group)
return self._dithering
@property
def iqModulator(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_iqModulator'):
from .IqModulator import IqModulatorCls
self._iqModulator = IqModulatorCls(self._core, self._cmd_group)
return self._iqModulator
@property
def linearize(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_linearize'):
from .Linearize import LinearizeCls
self._linearize = LinearizeCls(self._core, self._cmd_group)
return self._linearize
# noinspection PyTypeChecker
[docs]
def get_characteristics(self) -> enums.IqOptMode:
"""
``[SOURce<HW>]:CORRection:OPTimize:RF:CHARacteristics`` \n
Snippet: ``value: enums.IqOptMode = driver.source.correction.optimize.rf.get_characteristics()`` \n
Sets the method for optimizing the I/Q modulation.
:return: characteristic: OFF | EVM | USER OFF No dedicated I/Q modulation optimization. EVM Optimizes I/Q modulation to achieve better EVM performance. This method reduces the wideband noise and improves the nonlinear effects of amplifiers resulting in a linear gain. USER Sets a user-defined optimization as the I/Q modulation method.
"""
response = self._core.io.query_str('SOURce<HwInstance>:CORRection:OPTimize:RF:CHARacteristics?')
return Conversions.str_to_scalar_enum(response, enums.IqOptMode)
[docs]
def set_characteristics(self, characteristic: enums.IqOptMode) -> None:
"""
``[SOURce<HW>]:CORRection:OPTimize:RF:CHARacteristics`` \n
Snippet: ``driver.source.correction.optimize.rf.set_characteristics(characteristic = enums.IqOptMode.EVM)`` \n
Sets the method for optimizing the I/Q modulation.
:param characteristic: OFF | EVM | USER OFF No dedicated I/Q modulation optimization. EVM Optimizes I/Q modulation to achieve better EVM performance. This method reduces the wideband noise and improves the nonlinear effects of amplifiers resulting in a linear gain. USER Sets a user-defined optimization as the I/Q modulation method.
"""
param = Conversions.enum_scalar_to_str(characteristic, enums.IqOptMode)
self._core.io.write(f'SOURce<HwInstance>:CORRection:OPTimize:RF:CHARacteristics {param}')
[docs]
def get_headroom(self) -> bool:
"""
``[SOURce<HW>]:CORRection:OPTimize:RF:HEADroom`` \n
Snippet: ``value: bool = driver.source.correction.optimize.rf.get_headroom()`` \n
Enables automatic adjustments of the I/Q modulator after each RF frequency change or RF level change.
:return: state: 1 | ON | 0| OFF
"""
response = self._core.io.query_str('SOURce<HwInstance>:CORRection:OPTimize:RF:HEADroom?')
return Conversions.str_to_bool(response)
[docs]
def set_headroom(self, state: bool) -> None:
"""
``[SOURce<HW>]:CORRection:OPTimize:RF:HEADroom`` \n
Snippet: ``driver.source.correction.optimize.rf.set_headroom(state = False)`` \n
Enables automatic adjustments of the I/Q modulator after each RF frequency change or RF level change.
:param state: 1 | ON | 0| OFF
"""
param = Conversions.bool_to_str(state)
self._core.io.write(f'SOURce<HwInstance>:CORRection:OPTimize:RF:HEADroom {param}')
def clone(self) -> 'RfCls':
"""
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 = RfCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group