Source code for rsmxo.Implementations.Export.Hmeasurement.Normalize

from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import repcap


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

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

[docs] def set(self, normalization: bool, measIndex=repcap.MeasIndex.Default) -> None: """ ``EXPort:HMEasurement<*>:NORMalize`` \n Snippet: ``driver.export.hmeasurement.normalize.set(normalization = False, measIndex = repcap.MeasIndex.Default)`` \n If normalization is off, the number of samples in a given bin is exported as integer values. With normalization, the ratio of samples in a given bin to the sum of all samples is exported as float value. The sum of all normalized values is 1. The command affects all histogram exports. :param normalization: OFF | ON :param measIndex: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Hmeasurement') """ param = Conversions.bool_to_str(normalization) measIndex_cmd_val = self._cmd_group.get_repcap_cmd_value(measIndex, repcap.MeasIndex) self._core.io.write(f'EXPort:HMEasurement{measIndex_cmd_val}:NORMalize {param}')
[docs] def get(self, measIndex=repcap.MeasIndex.Default) -> bool: """ ``EXPort:HMEasurement<*>:NORMalize`` \n Snippet: ``value: bool = driver.export.hmeasurement.normalize.get(measIndex = repcap.MeasIndex.Default)`` \n If normalization is off, the number of samples in a given bin is exported as integer values. With normalization, the ratio of samples in a given bin to the sum of all samples is exported as float value. The sum of all normalized values is 1. The command affects all histogram exports. :param measIndex: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Hmeasurement') :return: normalization: OFF | ON """ measIndex_cmd_val = self._cmd_group.get_repcap_cmd_value(measIndex, repcap.MeasIndex) response = self._core.io.query_str(f'EXPort:HMEasurement{measIndex_cmd_val}:NORMalize?') return Conversions.str_to_bool(response)