from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class BandwidthCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("bandwidth", core, parent)
[docs]
def set(self, frequency: float) -> None:
"""
``[SENSe]:NPRatio:CHANnel:INTegration:BWIDth`` \n
Snippet: ``driver.sense.npratio.channel.integration.bandwidth.set(frequency = 1.0)`` \n
Defines the bandwidth to be used for total power calculation as an absolute value. This value is only considered for
method ``RsFsw.sense.npratio.channel.integration.auto.set()`` OFF. The entire specified bandwidth is used, including any
defined notches.
:param frequency: Unit: HZ
"""
param = Conversions.decimal_value_to_str(frequency)
self._core.io.write(f'SENSe:NPRatio:CHANnel:INTegration:BWIDth {param}')
[docs]
def get(self) -> float:
"""
``[SENSe]:NPRatio:CHANnel:INTegration:BWIDth`` \n
Snippet: ``value: float = driver.sense.npratio.channel.integration.bandwidth.get()`` \n
Defines the bandwidth to be used for total power calculation as an absolute value. This value is only considered for
method ``RsFsw.sense.npratio.channel.integration.auto.set()`` OFF. The entire specified bandwidth is used, including any
defined notches.
:return: frequency: Unit: HZ
"""
response = self._core.io.query_str(f'SENSe:NPRatio:CHANnel:INTegration:BWIDth?')
return Conversions.str_to_float(response)