Source code for rsrtx.Implementations.Calculate.Math.Fft.Coupled.WithPy

from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ......Internal.RepeatedCapability import RepeatedCapability
from ...... import repcap


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

	Repeated Capability Setting:
	
	.. code-block:: python
	
			# Range: Nr1 .. Nr8 \n
			driver.calculate.math.fft.coupled.withPy.repcap_fftWidth_set(repcap.FftWidth.Nr1)
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("withPy", core, parent)
		self._cmd_group.rep_cap = RepeatedCapability(self._cmd_group.group_name, 'repcap_fftWidth_get', 'repcap_fftWidth_set', repcap.FftWidth.Nr1)

	def repcap_fftWidth_set(self, fftWidth: repcap.FftWidth) -> None:
		"""
		Repeated Capability default value numeric suffix.
		This value is used, if you do not explicitely set it in the child set/get methods, or if you leave it to FftWidth.Default.
		Default value after init: FftWidth.Nr1
		"""
		self._cmd_group.set_repcap_enum_value(fftWidth)

	def repcap_fftWidth_get(self) -> repcap.FftWidth:
		"""
		Returns the current default repeated capability for the child set/get methods.
		"""
		# noinspection PyTypeChecker
		return self._cmd_group.get_repcap_enum_value()

[docs] def set(self, math_index: bool, math=repcap.Math.Default, fftWidth=repcap.FftWidth.Default) -> None: """ ``CALCulate:MATH<*>:FFT:COUPled:WITH<*>`` \n Snippet: ``driver.calculate.math.fft.coupled.withPy.set(math_index = False, math = repcap.Math.Default, fftWidth = repcap.FftWidth.Default)`` \n Copies the current FFT settings of the selected math waveform (m) to the other selected math waveform (n) , and couples the two waveforms. This can be repeated for all math waveforms. If any FFT setting for any of the coupled spectrums is changed, it is changed for all coupled spectrums. :param math_index: ON | OFF :param math: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Math') :param fftWidth: optional repeated capability selector. Default value: Nr1 (settable in the interface 'WithPy') """ param = Conversions.bool_to_str(math_index) math_cmd_val = self._cmd_group.get_repcap_cmd_value(math, repcap.Math) fftWidth_cmd_val = self._cmd_group.get_repcap_cmd_value(fftWidth, repcap.FftWidth) self._core.io.write_with_opc(f'CALCulate:MATH{math_cmd_val}:FFT:COUPled:WITH{fftWidth_cmd_val} {param}')
[docs] def get(self, math=repcap.Math.Default, fftWidth=repcap.FftWidth.Default) -> bool: """ ``CALCulate:MATH<*>:FFT:COUPled:WITH<*>`` \n Snippet: ``value: bool = driver.calculate.math.fft.coupled.withPy.get(math = repcap.Math.Default, fftWidth = repcap.FftWidth.Default)`` \n Copies the current FFT settings of the selected math waveform (m) to the other selected math waveform (n) , and couples the two waveforms. This can be repeated for all math waveforms. If any FFT setting for any of the coupled spectrums is changed, it is changed for all coupled spectrums. :param math: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Math') :param fftWidth: optional repeated capability selector. Default value: Nr1 (settable in the interface 'WithPy') :return: math_index: ON | OFF """ math_cmd_val = self._cmd_group.get_repcap_cmd_value(math, repcap.Math) fftWidth_cmd_val = self._cmd_group.get_repcap_cmd_value(fftWidth, repcap.FftWidth) response = self._core.io.query_str_with_opc(f'CALCulate:MATH{math_cmd_val}:FFT:COUPled:WITH{fftWidth_cmd_val}?') return Conversions.str_to_bool(response)
def clone(self) -> 'WithPyCls': """ 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 = WithPyCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group