from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ResolutionCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("resolution", core, parent)
[docs]
def set(self, bandwidth: float) -> None:
"""
``[SENSe]:ADEMod:SPECtrum:BWIDth[:RESolution]`` \n
Snippet: ``driver.sense.ademod.spectrum.bandwidth.resolution.set(bandwidth = 1.0)`` \n
Defines the resolution bandwidth for data acquisition. From the specified RBW and the demodulation span set by method
``RsFsw.sense.ademod.spectrum.span.maximum.set()`` or method ``RsFsw.applications.k17Mcgd.sense.bandwidth.demod.set()`` ,
the required measurement time is calculated. If the available measurement time is not sufficient for the given bandwidth,
the measurement time is set to its maximum and the resolution bandwidth is increased to the resulting bandwidth.
Is identical to [SENSe:]BANDwidth[:RESolution].
:param bandwidth: Refer to specifications document. Unit: HZ
"""
param = Conversions.decimal_value_to_str(bandwidth)
self._core.io.write(f'SENSe:ADEMod:SPECtrum:BWIDth:RESolution {param}')
[docs]
def get(self) -> float:
"""
``[SENSe]:ADEMod:SPECtrum:BWIDth[:RESolution]`` \n
Snippet: ``value: float = driver.sense.ademod.spectrum.bandwidth.resolution.get()`` \n
Defines the resolution bandwidth for data acquisition. From the specified RBW and the demodulation span set by method
``RsFsw.sense.ademod.spectrum.span.maximum.set()`` or method ``RsFsw.applications.k17Mcgd.sense.bandwidth.demod.set()`` ,
the required measurement time is calculated. If the available measurement time is not sufficient for the given bandwidth,
the measurement time is set to its maximum and the resolution bandwidth is increased to the resulting bandwidth.
Is identical to [SENSe:]BANDwidth[:RESolution].
:return: bandwidth: Refer to specifications document. Unit: HZ
"""
response = self._core.io.query_str(f'SENSe:ADEMod:SPECtrum:BWIDth:RESolution?')
return Conversions.str_to_float(response)