Source code for rsrtx.Implementations.Calibration.Source

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


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

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

	# noinspection PyTypeChecker
[docs] def get_frequency(self) -> enums.CalSrcFrequency: """ ``CALibration:SOURce:FREQuency`` \n Snippet: ``value: enums.CalSrcFrequency = driver.calibration.source.get_frequency()`` \n Frequency value and waveform type of the internal calibration source, which is output at the Aux Out connector. :return: frequency: KHZ7900 | MHZ10 | KHZ15800 | MHZ31_25 | KHZ31600 | KHZ63200 | GHZ1 | MHZ250MB | MHZ250mb | GHZ1_20DB | MHZ62 | MHZ125 | MHZ250 | MHZ500 | KHZ505500 | MHZ1R | MHZ31R | MHZ31_25R | MHZ498S | MHZ1257_2S | MHZ2491S | MHZ4060S | MHZ4350S | MHZ4810S | MHZ4991S | MHZ5940S | MHZ1000S | MHZ10 | MHZ31_25 | MHZ250MB | MHZ250mb | GHZ1_20DB | GHZ1 \n - MHZ10: 10 MHz square wave - MHZ31_25 | GHZ1 | MHZ250MB: 31.25 MHz, 1 GHz, 250 MHz sine waves generated by the mainboard.MHZ250MB = MHZ250mb - GHZ1_20DB: Clinched sine wave with indicated frequency, generated by the frontend. - GHZ1: 1 GHz sine wave generated by the mainboard. """ response = self._core.io.query_str_with_opc('CALibration:SOURce:FREQuency?') return Conversions.str_to_scalar_enum(response, enums.CalSrcFrequency)
[docs] def set_frequency(self, frequency: enums.CalSrcFrequency) -> None: """ ``CALibration:SOURce:FREQuency`` \n Snippet: ``driver.calibration.source.set_frequency(frequency = enums.CalSrcFrequency.GHZ1)`` \n Frequency value and waveform type of the internal calibration source, which is output at the Aux Out connector. :param frequency: KHZ7900 | MHZ10 | KHZ15800 | MHZ31_25 | KHZ31600 | KHZ63200 | GHZ1 | MHZ250MB | MHZ250mb | GHZ1_20DB | MHZ62 | MHZ125 | MHZ250 | MHZ500 | KHZ505500 | MHZ1R | MHZ31R | MHZ31_25R | MHZ498S | MHZ1257_2S | MHZ2491S | MHZ4060S | MHZ4350S | MHZ4810S | MHZ4991S | MHZ5940S | MHZ1000S | MHZ10 | MHZ31_25 | MHZ250MB | MHZ250mb | GHZ1_20DB | GHZ1 \n - MHZ10: 10 MHz square wave - MHZ31_25 | GHZ1 | MHZ250MB: 31.25 MHz, 1 GHz, 250 MHz sine waves generated by the mainboard.MHZ250MB = MHZ250mb - GHZ1_20DB: Clinched sine wave with indicated frequency, generated by the frontend. - GHZ1: 1 GHz sine wave generated by the mainboard. """ param = Conversions.enum_scalar_to_str(frequency, enums.CalSrcFrequency) self._core.io.write_with_opc(f'CALibration:SOURce:FREQuency {param}')
[docs] def get_state(self) -> bool: """ ``CALibration:SOURce:STATe`` \n Snippet: ``value: bool = driver.calibration.source.get_state()`` \n Defines the state of the internal calibration source. :return: state: OFF | ON """ response = self._core.io.query_str_with_opc('CALibration:SOURce:STATe?') return Conversions.str_to_bool(response)
[docs] def set_state(self, state: bool) -> None: """ ``CALibration:SOURce:STATe`` \n Snippet: ``driver.calibration.source.set_state(state = False)`` \n Defines the state of the internal calibration source. :param state: OFF | ON """ param = Conversions.bool_to_str(state) self._core.io.write_with_opc(f'CALibration:SOURce:STATe {param}')