from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class CenterCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("center", core, parent)
[docs]
def get_offset(self) -> float:
"""
``[SOURce<HW>]:AWGN:FREQuency:CENTer:OFFSet`` \n
Snippet: ``value: float = driver.source.awgn.frequency.center.get_offset()`` \n
Defines the frequency offset of the noise signal relative to the carrier center frequency.
:return: center_freq_offset: float Range: -40E6 to 40E6
"""
response = self._core.io.query_str('SOURce<HwInstance>:AWGN:FREQuency:CENTer:OFFSet?')
return Conversions.str_to_float(response)
[docs]
def set_offset(self, center_freq_offset: float) -> None:
"""
``[SOURce<HW>]:AWGN:FREQuency:CENTer:OFFSet`` \n
Snippet: ``driver.source.awgn.frequency.center.set_offset(center_freq_offset = 1.0)`` \n
Defines the frequency offset of the noise signal relative to the carrier center frequency.
:param center_freq_offset: float Range: -40E6 to 40E6
"""
param = Conversions.decimal_value_to_str(center_freq_offset)
self._core.io.write(f'SOURce<HwInstance>:AWGN:FREQuency:CENTer:OFFSet {param}')