Source code for rsmxo.Implementations.Measurement.Statistics.Histogram.AutoScale

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


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

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

[docs] def set(self, auto_scale_mode: bool, measIndex=repcap.MeasIndex.Default) -> None: """ ``MEASurement<*>:STATistics:HISTogram:AUToscale`` \n Snippet: ``driver.measurement.statistics.histogram.autoScale.set(auto_scale_mode = False, measIndex = repcap.MeasIndex.Default)`` \n If ON, the range on the x-axis is continuously adjusted to the measured values. If OFF, you can set the offset and the scale of the histogram with method ``RsMxo.measurement.statistics.histogram.horizontal.offset.set()`` and method ``RsMxo.measurement.statistics.histogram.horizontal.scale.set()`` . :param auto_scale_mode: OFF | ON :param measIndex: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement') """ param = Conversions.bool_to_str(auto_scale_mode) measIndex_cmd_val = self._cmd_group.get_repcap_cmd_value(measIndex, repcap.MeasIndex) self._core.io.write(f'MEASurement{measIndex_cmd_val}:STATistics:HISTogram:AUToscale {param}')
[docs] def get(self, measIndex=repcap.MeasIndex.Default) -> bool: """ ``MEASurement<*>:STATistics:HISTogram:AUToscale`` \n Snippet: ``value: bool = driver.measurement.statistics.histogram.autoScale.get(measIndex = repcap.MeasIndex.Default)`` \n If ON, the range on the x-axis is continuously adjusted to the measured values. If OFF, you can set the offset and the scale of the histogram with method ``RsMxo.measurement.statistics.histogram.horizontal.offset.set()`` and method ``RsMxo.measurement.statistics.histogram.horizontal.scale.set()`` . :param measIndex: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement') :return: auto_scale_mode: OFF | ON """ measIndex_cmd_val = self._cmd_group.get_repcap_cmd_value(measIndex, repcap.MeasIndex) response = self._core.io.query_str(f'MEASurement{measIndex_cmd_val}:STATistics:HISTogram:AUToscale?') return Conversions.str_to_bool(response)