Source code for RsSmw.Implementations.Source.Iq.Output.Analog.Envelope.Shaping.Gain

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


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

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

[docs] def get_post(self) -> float: """ ``[SOURce<HW>]:IQ:OUTPut:[ANALog]:ENVelope:SHAPing:GAIN:POST`` \n Snippet: ``value: float = driver.source.iq.output.analog.envelope.shaping.gain.get_post()`` \n Sets a post-gain. :return: post_gain: float Range: -3 to 20 """ response = self._core.io.query_str('SOURce<HwInstance>:IQ:OUTPut:ANALog:ENVelope:SHAPing:GAIN:POST?') return Conversions.str_to_float(response)
[docs] def set_post(self, post_gain: float) -> None: """ ``[SOURce<HW>]:IQ:OUTPut:[ANALog]:ENVelope:SHAPing:GAIN:POST`` \n Snippet: ``driver.source.iq.output.analog.envelope.shaping.gain.set_post(post_gain = 1.0)`` \n Sets a post-gain. :param post_gain: float Range: -3 to 20 """ param = Conversions.decimal_value_to_str(post_gain) self._core.io.write(f'SOURce<HwInstance>:IQ:OUTPut:ANALog:ENVelope:SHAPing:GAIN:POST {param}')
[docs] def get_pre(self) -> float: """ ``[SOURce<HW>]:IQ:OUTPut:[ANALog]:ENVelope:SHAPing:GAIN:PRE`` \n Snippet: ``value: float = driver.source.iq.output.analog.envelope.shaping.gain.get_pre()`` \n Sets a post-gain. """ response = self._core.io.query_str('SOURce<HwInstance>:IQ:OUTPut:ANALog:ENVelope:SHAPing:GAIN:PRE?') return Conversions.str_to_float(response)
[docs] def set_pre(self, pre_gain: float) -> None: """ ``[SOURce<HW>]:IQ:OUTPut:[ANALog]:ENVelope:SHAPing:GAIN:PRE`` \n Snippet: ``driver.source.iq.output.analog.envelope.shaping.gain.set_pre(pre_gain = 1.0)`` \n Sets a post-gain. :param pre_gain: float Range: -3 to 20 """ param = Conversions.decimal_value_to_str(pre_gain) self._core.io.write(f'SOURce<HwInstance>:IQ:OUTPut:ANALog:ENVelope:SHAPing:GAIN:PRE {param}')