from typing import List
from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
from ... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class FrequencyCls:
"""
| Commands in total: 4
| Subgroups: 0
| Direct child commands: 4
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("frequency", core, parent)
[docs]
def get_data(self) -> List[float]:
"""
``FRANalysis:FREQuency:DATA`` \n
Snippet: ``value: List[float] = driver.franalysis.frequency.get_data()`` \n
Returns the data of the frequency points for which gain and phase have been calculated as a list of comma-separated
values in Hz.
:return: data: Comma-separated list of values
"""
response = self._core.io.query_bin_or_ascii_float_list('FRANalysis:FREQuency:DATA?')
return response
[docs]
def get_start(self) -> float:
"""
``FRANalysis:FREQuency:STARt`` \n
Snippet: ``value: float = driver.franalysis.frequency.get_start()`` \n
Sets the start frequency of the sweep.
:return: start_frequency: 0.01 to 100E+6
"""
response = self._core.io.query_str('FRANalysis:FREQuency:STARt?')
return Conversions.str_to_float(response)
[docs]
def set_start(self, start_frequency: float) -> None:
"""
``FRANalysis:FREQuency:STARt`` \n
Snippet: ``driver.franalysis.frequency.set_start(start_frequency = 1.0)`` \n
Sets the start frequency of the sweep.
:param start_frequency: 0.01 to 100E+6
"""
param = Conversions.decimal_value_to_str(start_frequency)
self._core.io.write(f'FRANalysis:FREQuency:STARt {param}')
[docs]
def get_stop(self) -> float:
"""
``FRANalysis:FREQuency:STOP`` \n
Snippet: ``value: float = driver.franalysis.frequency.get_stop()`` \n
Sets the stop frequency of the sweep.
:return: stop_frequency: 0.01 to 100E+6
"""
response = self._core.io.query_str('FRANalysis:FREQuency:STOP?')
return Conversions.str_to_float(response)
[docs]
def set_stop(self, stop_frequency: float) -> None:
"""
``FRANalysis:FREQuency:STOP`` \n
Snippet: ``driver.franalysis.frequency.set_stop(stop_frequency = 1.0)`` \n
Sets the stop frequency of the sweep.
:param stop_frequency: 0.01 to 100E+6
"""
param = Conversions.decimal_value_to_str(stop_frequency)
self._core.io.write(f'FRANalysis:FREQuency:STOP {param}')
# noinspection PyTypeChecker
[docs]
def get_mode(self) -> enums.FrAnalysisMode:
"""
``FRANalysis:FREQuency:MODE`` \n
Snippet: ``value: enums.FrAnalysisMode = driver.franalysis.frequency.get_mode()`` \n
Selects between single frequency and sweep analysis.
:return: frequency_mode: SWEep | SINGle
"""
response = self._core.io.query_str('FRANalysis:FREQuency:MODE?')
return Conversions.str_to_scalar_enum(response, enums.FrAnalysisMode)
[docs]
def set_mode(self, frequency_mode: enums.FrAnalysisMode) -> None:
"""
``FRANalysis:FREQuency:MODE`` \n
Snippet: ``driver.franalysis.frequency.set_mode(frequency_mode = enums.FrAnalysisMode.SINGle)`` \n
Selects between single frequency and sweep analysis.
:param frequency_mode: SWEep | SINGle
"""
param = Conversions.enum_scalar_to_str(frequency_mode, enums.FrAnalysisMode)
self._core.io.write(f'FRANalysis:FREQuency:MODE {param}')