from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class DitheringCls:
"""
| Commands in total: 3
| Subgroups: 0
| Direct child commands: 3
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("dithering", core, parent)
[docs]
def get_amplitude(self) -> float:
"""
``[SOURce<HW>]:CORRection:OPTimize:RF:DITHering:AMPLitude`` \n
Snippet: ``value: float = driver.source.correction.optimize.rf.dithering.get_amplitude()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:CORRection:OPTimize:RF:DITHering:AMPLitude?')
return Conversions.str_to_float(response)
[docs]
def set_amplitude(self, amplitude: float) -> None:
"""
``[SOURce<HW>]:CORRection:OPTimize:RF:DITHering:AMPLitude`` \n
Snippet: ``driver.source.correction.optimize.rf.dithering.set_amplitude(amplitude = 1.0)`` \n
No help available
"""
param = Conversions.decimal_value_to_str(amplitude)
self._core.io.write(f'SOURce<HwInstance>:CORRection:OPTimize:RF:DITHering:AMPLitude {param}')
# noinspection PyTypeChecker
[docs]
def get_bandwidth(self) -> enums.IqOptDithBandWidth:
"""
``[SOURce<HW>]:CORRection:OPTimize:RF:DITHering:BANDwidth`` \n
Snippet: ``value: enums.IqOptDithBandWidth = driver.source.correction.optimize.rf.dithering.get_bandwidth()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:CORRection:OPTimize:RF:DITHering:BANDwidth?')
return Conversions.str_to_scalar_enum(response, enums.IqOptDithBandWidth)
[docs]
def set_bandwidth(self, bandwidth: enums.IqOptDithBandWidth) -> None:
"""
``[SOURce<HW>]:CORRection:OPTimize:RF:DITHering:BANDwidth`` \n
Snippet: ``driver.source.correction.optimize.rf.dithering.set_bandwidth(bandwidth = enums.IqOptDithBandWidth.BW0M)`` \n
No help available
"""
param = Conversions.enum_scalar_to_str(bandwidth, enums.IqOptDithBandWidth)
self._core.io.write(f'SOURce<HwInstance>:CORRection:OPTimize:RF:DITHering:BANDwidth {param}')
[docs]
def get_value(self) -> bool:
"""
``[SOURce<HW>]:CORRection:OPTimize:RF:DITHering`` \n
Snippet: ``value: bool = driver.source.correction.optimize.rf.dithering.get_value()`` \n
Enables dithering of the I/Q signal to improve the spectral purity of the RF output signal. Dithering does not lead to
improvements of the EVM performance or ACLR performance of the RF output signal. If enabled, dithering applies to all RF
paths. Disabling dithering in one path also disables dithering in all RF paths.
:return: state: 1 | ON | 0| OFF
"""
response = self._core.io.query_str('SOURce<HwInstance>:CORRection:OPTimize:RF:DITHering?')
return Conversions.str_to_bool(response)
[docs]
def set_value(self, state: bool) -> None:
"""
``[SOURce<HW>]:CORRection:OPTimize:RF:DITHering`` \n
Snippet: ``driver.source.correction.optimize.rf.dithering.set_value(state = False)`` \n
Enables dithering of the I/Q signal to improve the spectral purity of the RF output signal. Dithering does not lead to
improvements of the EVM performance or ACLR performance of the RF output signal. If enabled, dithering applies to all RF
paths. Disabling dithering in one path also disables dithering in all RF paths.
:param state: 1 | ON | 0| OFF
"""
param = Conversions.bool_to_str(state)
self._core.io.write(f'SOURce<HwInstance>:CORRection:OPTimize:RF:DITHering {param}')