from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
from ....... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class EnableCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("enable", core, parent)
[docs]
def set(self, limit_number_fft: bool, spectrum=repcap.Spectrum.Default) -> None:
"""
``CALCulate:SPECtrum<*>:OVERlap:FCOunt:LIMit:ENABle`` \n
Snippet: ``driver.calculate.spectrum.overlap.fcount.limit.enable.set(limit_number_fft = False, spectrum = repcap.Spectrum.Default)`` \n
Limits the number of FFTs that are done per acquisition. To set the number of FFTs,
use method ``RsMxo.calculate.spectrum.overlap.fcount.value.set()`` .
:param limit_number_fft: OFF | ON
:param spectrum: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Spectrum')
"""
param = Conversions.bool_to_str(limit_number_fft)
spectrum_cmd_val = self._cmd_group.get_repcap_cmd_value(spectrum, repcap.Spectrum)
self._core.io.write(f'CALCulate:SPECtrum{spectrum_cmd_val}:OVERlap:FCOunt:LIMit:ENABle {param}')
[docs]
def get(self, spectrum=repcap.Spectrum.Default) -> bool:
"""
``CALCulate:SPECtrum<*>:OVERlap:FCOunt:LIMit:ENABle`` \n
Snippet: ``value: bool = driver.calculate.spectrum.overlap.fcount.limit.enable.get(spectrum = repcap.Spectrum.Default)`` \n
Limits the number of FFTs that are done per acquisition. To set the number of FFTs,
use method ``RsMxo.calculate.spectrum.overlap.fcount.value.set()`` .
:param spectrum: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Spectrum')
:return: limit_number_fft: OFF | ON
"""
spectrum_cmd_val = self._cmd_group.get_repcap_cmd_value(spectrum, repcap.Spectrum)
response = self._core.io.query_str(f'CALCulate:SPECtrum{spectrum_cmd_val}:OVERlap:FCOunt:LIMit:ENABle?')
return Conversions.str_to_bool(response)