from ........Internal.Core import Core
from ........Internal.CommandsGroup import CommandsGroup
from ........Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ToleranceCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("tolerance", core, parent)
[docs]
def set(self, level: float) -> None:
"""
``[SENSe]:POWer:RLEVel:VERify:TOLerance`` \n
Snippet: ``driver.applications.k40PhaseNoise.sense.power.refLevel.verify.tolerance.set(level = 1.0)`` \n
Defines a relative level tolerance for level verification
:param level: Numeric value in dB, relative to the nominal level. Unit: DB
"""
param = Conversions.decimal_value_to_str(level)
self._core.io.write(f'SENSe:POWer:RLEVel:VERify:TOLerance {param}')
[docs]
def get(self) -> float:
"""
``[SENSe]:POWer:RLEVel:VERify:TOLerance`` \n
Snippet: ``value: float = driver.applications.k40PhaseNoise.sense.power.refLevel.verify.tolerance.get()`` \n
Defines a relative level tolerance for level verification
:return: level: Numeric value in dB, relative to the nominal level. Unit: DB
"""
response = self._core.io.query_str(f'SENSe:POWer:RLEVel:VERify:TOLerance?')
return Conversions.str_to_float(response)