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 ImpedanceCls:
"""
| Commands in total: 6
| Subgroups: 0
| Direct child commands: 6
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("impedance", core, parent)
# noinspection PyTypeChecker
[docs]
def get_mode(self) -> enums.FrAnalysisMeasMode:
"""
``FRANalysis:IMPedance[:MODE]`` \n
Snippet: ``value: enums.FrAnalysisMeasMode = driver.franalysis.impedance.get_mode()`` \n
Selects the measurement method for the impedance analysis.
"""
response = self._core.io.query_str('FRANalysis:IMPedance:MODE?')
return Conversions.str_to_scalar_enum(response, enums.FrAnalysisMeasMode)
[docs]
def set_mode(self, meas_md: enums.FrAnalysisMeasMode) -> None:
"""
``FRANalysis:IMPedance[:MODE]`` \n
Snippet: ``driver.franalysis.impedance.set_mode(meas_md = enums.FrAnalysisMeasMode.SERies)`` \n
Selects the measurement method for the impedance analysis.
:param meas_md: SHUNt: Shunt through SERies: Series through VCURrent: Voltage current
"""
param = Conversions.enum_scalar_to_str(meas_md, enums.FrAnalysisMeasMode)
self._core.io.write(f'FRANalysis:IMPedance:MODE {param}')
[docs]
def get_data(self) -> List[float]:
"""
``FRANalysis:IMPedance:DATA`` \n
Snippet: ``value: List[float] = driver.franalysis.impedance.get_data()`` \n
Returns the impedance results as a list of comma-separated values in Ohm.
:return: data: Comma-separated list of values
"""
response = self._core.io.query_bin_or_ascii_float_list('FRANalysis:IMPedance:DATA?')
return response
[docs]
def get_enable(self) -> bool:
"""
``FRANalysis:IMPedance:ENABle`` \n
Snippet: ``value: bool = driver.franalysis.impedance.get_enable()`` \n
Enables the impedance waveform for the impedance analysis.
:return: state: OFF | ON
"""
response = self._core.io.query_str('FRANalysis:IMPedance:ENABle?')
return Conversions.str_to_bool(response)
[docs]
def set_enable(self, state: bool) -> None:
"""
``FRANalysis:IMPedance:ENABle`` \n
Snippet: ``driver.franalysis.impedance.set_enable(state = False)`` \n
Enables the impedance waveform for the impedance analysis.
:param state: OFF | ON
"""
param = Conversions.bool_to_str(state)
self._core.io.write(f'FRANalysis:IMPedance:ENABle {param}')
[docs]
def get_start(self) -> float:
"""
``FRANalysis:IMPedance:STARt`` \n
Snippet: ``value: float = driver.franalysis.impedance.get_start()`` \n
Set the lower and upper value of the vertical scale for the impedance trace.
"""
response = self._core.io.query_str('FRANalysis:IMPedance:STARt?')
return Conversions.str_to_float(response)
[docs]
def set_start(self, vertical_start: float) -> None:
"""
``FRANalysis:IMPedance:STARt`` \n
Snippet: ``driver.franalysis.impedance.set_start(vertical_start = 1.0)`` \n
Set the lower and upper value of the vertical scale for the impedance trace.
:param vertical_start: 2E-09 to 1000000000
"""
param = Conversions.decimal_value_to_str(vertical_start)
self._core.io.write(f'FRANalysis:IMPedance:STARt {param}')
[docs]
def get_stop(self) -> float:
"""
``FRANalysis:IMPedance:STOP`` \n
Snippet: ``value: float = driver.franalysis.impedance.get_stop()`` \n
Set the lower and upper value of the vertical scale for the impedance trace.
"""
response = self._core.io.query_str('FRANalysis:IMPedance:STOP?')
return Conversions.str_to_float(response)
[docs]
def set_stop(self, vertical_stop: float) -> None:
"""
``FRANalysis:IMPedance:STOP`` \n
Snippet: ``driver.franalysis.impedance.set_stop(vertical_stop = 1.0)`` \n
Set the lower and upper value of the vertical scale for the impedance trace.
:param vertical_stop: 2E-09 to 1000000000
"""
param = Conversions.decimal_value_to_str(vertical_stop)
self._core.io.write(f'FRANalysis:IMPedance:STOP {param}')
# noinspection PyTypeChecker
[docs]
def get_scale(self) -> enums.AxisMode:
"""
``FRANalysis:IMPedance:SCALe`` \n
Snippet: ``value: enums.AxisMode = driver.franalysis.impedance.get_scale()`` \n
Sets the scale mode for the impedance trace.
"""
response = self._core.io.query_str('FRANalysis:IMPedance:SCALe?')
return Conversions.str_to_scalar_enum(response, enums.AxisMode)
[docs]
def set_scale(self, vertical_scale_mode: enums.AxisMode) -> None:
"""
``FRANalysis:IMPedance:SCALe`` \n
Snippet: ``driver.franalysis.impedance.set_scale(vertical_scale_mode = enums.AxisMode.LIN)`` \n
Sets the scale mode for the impedance trace.
:param vertical_scale_mode: LIN | LOG
"""
param = Conversions.enum_scalar_to_str(vertical_scale_mode, enums.AxisMode)
self._core.io.write(f'FRANalysis:IMPedance:SCALe {param}')