from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class IfPowerCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("ifPower", core, parent)
[docs]
def set(self, gate_level: float) -> None:
"""
``[SENSe]:SWEep:EGATe:LEVel:IFPower`` \n
Snippet: ``driver.sense.sweep.egate.level.ifPower.set(gate_level = 1.0)`` \n
Defines the power level at the third intermediate frequency that must be exceeded for the gate to be open. Note that any
RF attenuation or preamplification is considered when the trigger level is analyzed. If defined, a reference level offset
is also considered. Is only available for triggered gated measurements (method ``RsFsw.sense.sweep.egate.auto.set()``
MAN) .
:param gate_level: For details on available trigger levels and trigger bandwidths see the specifications document. Unit: DBM
"""
param = Conversions.decimal_value_to_str(gate_level)
self._core.io.write(f'SENSe:SWEep:EGATe:LEVel:IFPower {param}')
[docs]
def get(self) -> float:
"""
``[SENSe]:SWEep:EGATe:LEVel:IFPower`` \n
Snippet: ``value: float = driver.sense.sweep.egate.level.ifPower.get()`` \n
Defines the power level at the third intermediate frequency that must be exceeded for the gate to be open. Note that any
RF attenuation or preamplification is considered when the trigger level is analyzed. If defined, a reference level offset
is also considered. Is only available for triggered gated measurements (method ``RsFsw.sense.sweep.egate.auto.set()``
MAN) .
:return: gate_level: For details on available trigger levels and trigger bandwidths see the specifications document. Unit: DBM
"""
response = self._core.io.query_str(f'SENSe:SWEep:EGATe:LEVel:IFPower?')
return Conversions.str_to_float(response)