from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class StdDevCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("stdDev", core, parent)
[docs]
def get(self, meas_type: enums.PwrSwitchingResultMeasType) -> float:
"""
``POWer:SWITching:RESult:ENERgy:STDDev`` \n
Snippet: ``value: float = driver.power.switching.result.energy.stdDev.get(meas_type = enums.PwrSwitchingResultMeasType.CON)`` \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: SWF: Switching frequency TON: Turn on TOF: Turn off CON: conduction NCO: Non conduction TOT: Total
:return: value: Statistic result
"""
param = Conversions.enum_scalar_to_str(meas_type, enums.PwrSwitchingResultMeasType)
response = self._core.io.query_str(f'POWer:SWITching:RESult:ENERgy:STDDev? {param}')
return Conversions.str_to_float(response)