Source code for RsSmw.Implementations.Source.Correction

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class CorrectionCls:
	"""
	| Commands in total: 86
	| Subgroups: 6
	| Direct child commands: 2
	"""

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

	@property
	def cset(self):
		"""
		| Commands in total: 14
		| Subgroups: 1
		| Direct child commands: 3
		"""
		if not hasattr(self, '_cset'):
			from .Cset import CsetCls
			self._cset = CsetCls(self._core, self._cmd_group)
		return self._cset

	@property
	def dexchange(self):
		"""
		| Commands in total: 8
		| Subgroups: 2
		| Direct child commands: 2
		"""
		if not hasattr(self, '_dexchange'):
			from .Dexchange import DexchangeCls
			self._dexchange = DexchangeCls(self._core, self._cmd_group)
		return self._dexchange

	@property
	def fresponse(self):
		"""
		| Commands in total: 49
		| Subgroups: 2
		| Direct child commands: 0
		"""
		if not hasattr(self, '_fresponse'):
			from .Fresponse import FresponseCls
			self._fresponse = FresponseCls(self._core, self._cmd_group)
		return self._fresponse

	@property
	def mlevel(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_mlevel'):
			from .Mlevel import MlevelCls
			self._mlevel = MlevelCls(self._core, self._cmd_group)
		return self._mlevel

	@property
	def optimize(self):
		"""
		| Commands in total: 11
		| Subgroups: 1
		| Direct child commands: 1
		"""
		if not hasattr(self, '_optimize'):
			from .Optimize import OptimizeCls
			self._optimize = OptimizeCls(self._core, self._cmd_group)
		return self._optimize

	@property
	def zeroing(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_zeroing'):
			from .Zeroing import ZeroingCls
			self._zeroing = ZeroingCls(self._core, self._cmd_group)
		return self._zeroing

[docs] def get_value(self) -> float: """ ``[SOURce<HW>]:CORRection:VALue`` \n Snippet: ``value: float = driver.source.correction.get_value()`` \n Queries the current value for user correction. :return: value: float Range: -100 to 100 """ response = self._core.io.query_str('SOURce<HwInstance>:CORRection:VALue?') return Conversions.str_to_float(response)
[docs] def get_state(self) -> bool: """ ``[SOURce<HW>]:CORRection:[STATe]`` \n Snippet: ``value: bool = driver.source.correction.get_state()`` \n Activates user correction with the currently selected table. :return: state: 1 | ON | 0| OFF """ response = self._core.io.query_str('SOURce<HwInstance>:CORRection:STATe?') return Conversions.str_to_bool(response)
[docs] def set_state(self, state: bool) -> None: """ ``[SOURce<HW>]:CORRection:[STATe]`` \n Snippet: ``driver.source.correction.set_state(state = False)`` \n Activates user correction with the currently selected table. :param state: 1 | ON | 0| OFF """ param = Conversions.bool_to_str(state) self._core.io.write(f'SOURce<HwInstance>:CORRection:STATe {param}')
def clone(self) -> 'CorrectionCls': """ Clones the group by creating new object from it and its whole existing subgroups. Also copies all the existing default Repeated Capabilities setting, which you can change independently without affecting the original group. """ new_group = CorrectionCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group