Source code for RsFsw.Implementations.Sense.Npratio.Mode

from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ModeCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("mode", core, parent)

[docs] def set(self, mode: enums.NpRatioMode) -> None: """ ``[SENSe]:NPRatio:MODE`` \n Snippet: ``driver.sense.npratio.mode.set(mode = enums.NpRatioMode.DENSity)`` \n Determines whether the power measured in a channel or notch is indicated as a power or a density value. :param mode: POWer | DENSity DENSity Power measured in channel or notch divided by the 'Channel BW'/'Integration BW' in dBm/Hz POWer Absolute power measured in channel or notch in current amplitude unit """ param = Conversions.enum_scalar_to_str(mode, enums.NpRatioMode) self._core.io.write(f'SENSe:NPRatio:MODE {param}')
# noinspection PyTypeChecker
[docs] def get(self) -> enums.NpRatioMode: """ ``[SENSe]:NPRatio:MODE`` \n Snippet: ``value: enums.NpRatioMode = driver.sense.npratio.mode.get()`` \n Determines whether the power measured in a channel or notch is indicated as a power or a density value. :return: mode: POWer | DENSity DENSity Power measured in channel or notch divided by the 'Channel BW'/'Integration BW' in dBm/Hz POWer Absolute power measured in channel or notch in current amplitude unit """ response = self._core.io.query_str(f'SENSe:NPRatio:MODE?') return Conversions.str_to_scalar_enum(response, enums.NpRatioMode)