from ........Internal.Core import Core
from ........Internal.CommandsGroup import CommandsGroup
from ........Internal import Conversions
from ........ import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ShapingCls:
"""
| Commands in total: 23
| Subgroups: 6
| Direct child commands: 3
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("shaping", core, parent)
@property
def clipping(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_clipping'):
from .Clipping import ClippingCls
self._clipping = ClippingCls(self._core, self._cmd_group)
return self._clipping
@property
def coefficients(self):
"""
| Commands in total: 4
| Subgroups: 0
| Direct child commands: 4
"""
if not hasattr(self, '_coefficients'):
from .Coefficients import CoefficientsCls
self._coefficients = CoefficientsCls(self._core, self._cmd_group)
return self._coefficients
@property
def detroughing(self):
"""
| Commands in total: 4
| Subgroups: 0
| Direct child commands: 4
"""
if not hasattr(self, '_detroughing'):
from .Detroughing import DetroughingCls
self._detroughing = DetroughingCls(self._core, self._cmd_group)
return self._detroughing
@property
def file(self):
"""
| Commands in total: 4
| Subgroups: 0
| Direct child commands: 4
"""
if not hasattr(self, '_file'):
from .File import FileCls
self._file = FileCls(self._core, self._cmd_group)
return self._file
@property
def gain(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_gain'):
from .Gain import GainCls
self._gain = GainCls(self._core, self._cmd_group)
return self._gain
@property
def pv(self):
"""
| Commands in total: 4
| Subgroups: 1
| Direct child commands: 0
"""
if not hasattr(self, '_pv'):
from .Pv import PvCls
self._pv = PvCls(self._core, self._cmd_group)
return self._pv
# noinspection PyTypeChecker
[docs]
def get_interp(self) -> enums.Interpolation:
"""
``[SOURce<HW>]:IQ:OUTPut:[ANALog]:ENVelope:SHAPing:INTerp`` \n
Snippet: ``value: enums.Interpolation = driver.source.iq.output.analog.envelope.shaping.get_interp()`` \n
For envelope shaping with shaping tables, enables linear interpolation.
"""
response = self._core.io.query_str('SOURce<HwInstance>:IQ:OUTPut:ANALog:ENVelope:SHAPing:INTerp?')
return Conversions.str_to_scalar_enum(response, enums.Interpolation)
[docs]
def set_interp(self, ipart_interpolation: enums.Interpolation) -> None:
"""
``[SOURce<HW>]:IQ:OUTPut:[ANALog]:ENVelope:SHAPing:INTerp`` \n
Snippet: ``driver.source.iq.output.analog.envelope.shaping.set_interp(ipart_interpolation = enums.Interpolation.LINear)`` \n
For envelope shaping with shaping tables, enables linear interpolation.
:param ipart_interpolation: OFF | LINear | POWer LINear = Linear (Voltage) POWer = Linear (Power)
"""
param = Conversions.enum_scalar_to_str(ipart_interpolation, enums.Interpolation)
self._core.io.write(f'SOURce<HwInstance>:IQ:OUTPut:ANALog:ENVelope:SHAPing:INTerp {param}')
# noinspection PyTypeChecker
[docs]
def get_mode(self) -> enums.IqOutEnvShapeMode:
"""
``[SOURce<HW>]:IQ:OUTPut:[ANALog]:ENVelope:SHAPing:MODE`` \n
Snippet: ``value: enums.IqOutEnvShapeMode = driver.source.iq.output.analog.envelope.shaping.get_mode()`` \n
Enables envelope shaping and selects the method to define the shaping function.
:return: shaping_mode: OFF | LINear | TABLe | POLYnomial | DETRoughing | POWer LINear = Linear (Voltage) POWer = Linear (Power)
"""
response = self._core.io.query_str('SOURce<HwInstance>:IQ:OUTPut:ANALog:ENVelope:SHAPing:MODE?')
return Conversions.str_to_scalar_enum(response, enums.IqOutEnvShapeMode)
[docs]
def set_mode(self, shaping_mode: enums.IqOutEnvShapeMode) -> None:
"""
``[SOURce<HW>]:IQ:OUTPut:[ANALog]:ENVelope:SHAPing:MODE`` \n
Snippet: ``driver.source.iq.output.analog.envelope.shaping.set_mode(shaping_mode = enums.IqOutEnvShapeMode.DETRoughing)`` \n
Enables envelope shaping and selects the method to define the shaping function.
:param shaping_mode: OFF | LINear | TABLe | POLYnomial | DETRoughing | POWer LINear = Linear (Voltage) POWer = Linear (Power)
"""
param = Conversions.enum_scalar_to_str(shaping_mode, enums.IqOutEnvShapeMode)
self._core.io.write(f'SOURce<HwInstance>:IQ:OUTPut:ANALog:ENVelope:SHAPing:MODE {param}')
# noinspection PyTypeChecker
[docs]
def get_scale(self) -> enums.IqOutEnvScale:
"""
``[SOURce<HW>]:IQ:OUTPut:[ANALog]:ENVelope:SHAPing:SCALe`` \n
Snippet: ``value: enums.IqOutEnvScale = driver.source.iq.output.analog.envelope.shaping.get_scale()`` \n
Determines the units used on the x and y axis.
:return: scale: POWer | VOLTage
"""
response = self._core.io.query_str('SOURce<HwInstance>:IQ:OUTPut:ANALog:ENVelope:SHAPing:SCALe?')
return Conversions.str_to_scalar_enum(response, enums.IqOutEnvScale)
[docs]
def set_scale(self, scale: enums.IqOutEnvScale) -> None:
"""
``[SOURce<HW>]:IQ:OUTPut:[ANALog]:ENVelope:SHAPing:SCALe`` \n
Snippet: ``driver.source.iq.output.analog.envelope.shaping.set_scale(scale = enums.IqOutEnvScale.POWer)`` \n
Determines the units used on the x and y axis.
:param scale: POWer | VOLTage
"""
param = Conversions.enum_scalar_to_str(scale, enums.IqOutEnvScale)
self._core.io.write(f'SOURce<HwInstance>:IQ:OUTPut:ANALog:ENVelope:SHAPing:SCALe {param}')
def clone(self) -> 'ShapingCls':
"""
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 = ShapingCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group