Source code for rsrtx.Implementations.Calculate.Math.Fft.Spectrogram.Timeline.State

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


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

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

[docs] def set(self, state: bool, math=repcap.Math.Default, fftTimeline=repcap.FftTimeline.Default) -> None: """ ``CALCulate:MATH<*>:FFT:SPECtrogram:TIMeline<*>:STATe`` \n Snippet: ``driver.calculate.math.fft.spectrogram.timeline.state.set(state = False, math = repcap.Math.Default, fftTimeline = repcap.FftTimeline.Default)`` \n Enables one of two possible time lines in a spectrogram diagram. A time line marks a single waveform in the spectrogram, that is: the power vs frequency results for the data acquired at a specific time. After enabling a time line, the results for that time are displayed in the spectrum diagram. The position of the time line is defined using the method ``RsRtx.calculate.math.fft.spectrogram.timeline.position.set()`` command. :param state: OFF | ON :param math: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Math') :param fftTimeline: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Timeline') """ param = Conversions.bool_to_str(state) math_cmd_val = self._cmd_group.get_repcap_cmd_value(math, repcap.Math) fftTimeline_cmd_val = self._cmd_group.get_repcap_cmd_value(fftTimeline, repcap.FftTimeline) self._core.io.write_with_opc(f'CALCulate:MATH{math_cmd_val}:FFT:SPECtrogram:TIMeline{fftTimeline_cmd_val}:STATe {param}')
[docs] def get(self, math=repcap.Math.Default, fftTimeline=repcap.FftTimeline.Default) -> bool: """ ``CALCulate:MATH<*>:FFT:SPECtrogram:TIMeline<*>:STATe`` \n Snippet: ``value: bool = driver.calculate.math.fft.spectrogram.timeline.state.get(math = repcap.Math.Default, fftTimeline = repcap.FftTimeline.Default)`` \n Enables one of two possible time lines in a spectrogram diagram. A time line marks a single waveform in the spectrogram, that is: the power vs frequency results for the data acquired at a specific time. After enabling a time line, the results for that time are displayed in the spectrum diagram. The position of the time line is defined using the method ``RsRtx.calculate.math.fft.spectrogram.timeline.position.set()`` command. :param math: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Math') :param fftTimeline: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Timeline') :return: state: OFF | ON """ math_cmd_val = self._cmd_group.get_repcap_cmd_value(math, repcap.Math) fftTimeline_cmd_val = self._cmd_group.get_repcap_cmd_value(fftTimeline, repcap.FftTimeline) response = self._core.io.query_str_with_opc(f'CALCulate:MATH{math_cmd_val}:FFT:SPECtrogram:TIMeline{fftTimeline_cmd_val}:STATe?') return Conversions.str_to_bool(response)