from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class NoiseCls:
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("noise", core, parent)
[docs]
def get_total(self) -> float:
"""
``[SOURce<HW>]:AWGN:POWer:NOISe:TOTal`` \n
Snippet: ``value: float = driver.source.awgn.power.noise.get_total()`` \n
Queries the noise level in the total bandwidth.
:return: total: float Range: -145 to 20
"""
response = self._core.io.query_str('SOURce<HwInstance>:AWGN:POWer:NOISe:TOTal?')
return Conversions.str_to_float(response)
[docs]
def get_value(self) -> float:
"""
``[SOURce<HW>]:AWGN:POWer:NOISe`` \n
Snippet: ``value: float = driver.source.awgn.power.noise.get_value()`` \n
Sets the power of the noise signal in the system respectively total bandwidth.
:return: noise: float
"""
response = self._core.io.query_str('SOURce<HwInstance>:AWGN:POWer:NOISe?')
return Conversions.str_to_float(response)
[docs]
def set_value(self, noise: float) -> None:
"""
``[SOURce<HW>]:AWGN:POWer:NOISe`` \n
Snippet: ``driver.source.awgn.power.noise.set_value(noise = 1.0)`` \n
Sets the power of the noise signal in the system respectively total bandwidth.
:param noise: float
"""
param = Conversions.decimal_value_to_str(noise)
self._core.io.write(f'SOURce<HwInstance>:AWGN:POWer:NOISe {param}')