Source code for rsrtx.Implementations.Calibration

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class CalibrationCls:
	"""
	| Commands in total: 5
	| Subgroups: 1
	| Direct child commands: 3
	"""

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

	@property
	def source(self):
		"""
		| Commands in total: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		if not hasattr(self, '_source'):
			from .Source import SourceCls
			self._source = SourceCls(self._core, self._cmd_group)
		return self._source

	# noinspection PyTypeChecker
[docs] def get_result(self) -> enums.AlignmentResult: """ ``CALibration:RESult`` \n Snippet: ``value: enums.AlignmentResult = driver.calibration.get_result()`` \n Returns the result of the last selfalignment and the current alignment status. In remote mode, ``*CAL?`` provides more detailed information. :return: result_state: PASSed | FAILed | NOALigndata """ response = self._core.io.query_str_with_opc('CALibration:RESult?') return Conversions.str_to_scalar_enum(response, enums.AlignmentResult)
[docs] def get_date(self) -> str: """ ``CALibration:DATE`` \n Snippet: ``value: str = driver.calibration.get_date()`` \n Returns the date of the last selfalignment. """ response = self._core.io.query_str_with_opc('CALibration:DATE?') return trim_str_response(response)
[docs] def get_time(self) -> str: """ ``CALibration:TIME`` \n Snippet: ``value: str = driver.calibration.get_time()`` \n Returns the time of the last selfalignment. """ response = self._core.io.query_str_with_opc('CALibration:TIME?') return trim_str_response(response)
def clone(self) -> 'CalibrationCls': """ 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 = CalibrationCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group