from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class AvgCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("avg", core, parent)
[docs]
def get(self, meas_type: enums.PwrSlewRateResultMeasType) -> float:
"""
``POWer:SLEWrate:RESult:AVG`` \n
Snippet: ``value: float = driver.power.slewrate.result.avg.get(meas_type = enums.PwrSlewRateResultMeasType.MAX)`` \n
Return the specified statistic result of the specified measurement type.
The command affects the content of export files as well as data retrieved with: \n
- [:ACTual]: current measurement result
- AVG: average of the long-term measurement results
- EVTCount: number of measurement results in the long-term measurement
- NPEak: negative peak value of the long-term measurement results
- PPEak: positive peak value of the long-term measurement results
- RMS: RMS value of the long-term measurement results
- STDDev: standard deviation of the long-term measurement results
:param meas_type: MIN | MAX
:return: value: Statistic result
"""
param = Conversions.enum_scalar_to_str(meas_type, enums.PwrSlewRateResultMeasType)
response = self._core.io.query_str(f'POWer:SLEWrate:RESult:AVG? {param}')
return Conversions.str_to_float(response)