from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SpanCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("span", core, parent)
[docs]
def set(self, span: float) -> None:
"""
``[SENSe]:FREQuency:SPAN`` \n
Snippet: ``driver.applications.k60Transient.sense.frequency.span.set(span = 1.0)`` \n
Defines the frequency span. If you set a span of 0 Hz in the Spectrum application, the FSW starts a measurement in the
time domain.
:param span: The minimum span for measurements in the frequency domain is 10 Hz. For SEM and spurious emission measurements, the minimum span is 20 Hz. Range: 0 Hz to fmax, Unit: Hz
"""
param = Conversions.decimal_value_to_str(span)
self._core.io.write(f'SENSe:FREQuency:SPAN {param}')
[docs]
def get(self) -> float:
"""
``[SENSe]:FREQuency:SPAN`` \n
Snippet: ``value: float = driver.applications.k60Transient.sense.frequency.span.get()`` \n
Defines the frequency span. If you set a span of 0 Hz in the Spectrum application, the FSW starts a measurement in the
time domain.
:return: span: The minimum span for measurements in the frequency domain is 10 Hz. For SEM and spurious emission measurements, the minimum span is 20 Hz. Range: 0 Hz to fmax, Unit: Hz
"""
response = self._core.io.query_str(f'SENSe:FREQuency:SPAN?')
return Conversions.str_to_float(response)