Source code for RsSmw.Implementations.Source.Correction.Optimize.Rf.Coffset

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


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

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

	def get_value(self) -> float:
		"""
		``[SOURce<HW>]:CORRection:OPTimize:RF:COFFset:VALue`` \n
		Snippet: ``value: float = driver.source.correction.optimize.rf.coffset.get_value()`` \n
		If a carrier offset is enabled, the command queries the value of the current carrier offset. This value depends on the
		bandwidth bsignal of the I/Q signal or the baseband sample rate rsample.

		:return: current_carr_offs: float Range: -1E9 to 1E9
		"""
		response = self._core.io.query_str('SOURce<HwInstance>:CORRection:OPTimize:RF:COFFset:VALue?')
		return Conversions.str_to_float(response)

[docs] def get_value(self) -> bool: """ ``[SOURce<HW>]:CORRection:OPTimize:RF:COFFset`` \n Snippet: ``value: bool = driver.source.correction.optimize.rf.coffset.get_value()`` \n If enabled, you can only route each stream to one output. Routing multiple streams to one output or one stream to multiple outputs is not allowed with an enabled carrier offset. The carrier offset relates to the bandwidth bsignal of the I/Q signal as follows: fc_offset = 20 MHz + bsignal/2 If no signal bandwidth is available, the carrier offset calculation uses the sample rate rsample instead of the bandwidth: fc_offset = 20 MHz + rsample/2 :return: state: 0 | 1| OFF | ON """ response = self._core.io.query_str('SOURce<HwInstance>:CORRection:OPTimize:RF:COFFset?') return Conversions.str_to_bool(response)
[docs] def set_value(self, state: bool) -> None: """ ``[SOURce<HW>]:CORRection:OPTimize:RF:COFFset`` \n Snippet: ``driver.source.correction.optimize.rf.coffset.set_value(state = False)`` \n If enabled, you can only route each stream to one output. Routing multiple streams to one output or one stream to multiple outputs is not allowed with an enabled carrier offset. The carrier offset relates to the bandwidth bsignal of the I/Q signal as follows: fc_offset = 20 MHz + bsignal/2 If no signal bandwidth is available, the carrier offset calculation uses the sample rate rsample instead of the bandwidth: fc_offset = 20 MHz + rsample/2 :param state: 0 | 1| OFF | ON """ param = Conversions.bool_to_str(state) self._core.io.write(f'SOURce<HwInstance>:CORRection:OPTimize:RF:COFFset {param}')