Source code for RsSmbv.Implementations.Source.Bb.Dme.Analysis

from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import enums


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]class AnalysisCls: """Analysis commands group definition. 14 total commands, 1 Subgroups, 11 group commands""" def __init__(self, core: Core, parent): self._core = core self._cmd_group = CommandsGroup("analysis", core, parent) @property def gate(self): """gate commands group. 0 Sub-classes, 3 commands.""" if not hasattr(self, '_gate'): from .Gate import GateCls self._gate = GateCls(self._core, self._cmd_group) return self._gate
[docs] def get_efficiency(self) -> float: """SCPI: [SOURce<HW>]:[BB]:DME:ANALysis:EFFiciency \n Snippet: value: float = driver.source.bb.dme.analysis.get_efficiency() \n Queries the measured reply efficiency in percent. The measurement is the ratio of the number of measured valid reply pulse pairs to transmitted pulse pairs in a measurement cycle. \n :return: efficiency: float Range: 0 to 100 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DME:ANALysis:EFFiciency?') return Conversions.str_to_float(response)
[docs] def get_ia_factor(self) -> float: """SCPI: [SOURce<HW>]:[BB]:DME:ANALysis:IAFactor \n Snippet: value: float = driver.source.bb.dme.analysis.get_ia_factor() \n Queries the internal adjustment factor, the mathematically calculated value of the time, when the pulse reaches its 50% level. \n :return: internal_adj_fact: float Range: 0 to 200 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DME:ANALysis:IAFactor?') return Conversions.str_to_float(response)
[docs] def get_normalize(self) -> bool: """SCPI: [SOURce<HW>]:[BB]:DME:ANALysis:NORMalize \n Snippet: value: bool = driver.source.bb.dme.analysis.get_normalize() \n Performs a normalization of the test setup. The delay due to the test setup is measured and subsequently considered in the reply measurements. \n :return: normalize: 1| ON| 0| OFF """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DME:ANALysis:NORMalize?') return Conversions.str_to_bool(response)
[docs] def get_ok(self) -> bool: """SCPI: [SOURce<HW>]:[BB]:DME:ANALysis:OK \n Snippet: value: bool = driver.source.bb.dme.analysis.get_ok() \n Queries if there are DME measurement values in the set measurement window. \n :return: status: 1| ON| 0| OFF """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DME:ANALysis:OK?') return Conversions.str_to_bool(response)
[docs] def get_power(self) -> float: """SCPI: [SOURce<HW>]:[BB]:DME:ANALysis:POWer \n Snippet: value: float = driver.source.bb.dme.analysis.get_power() \n Queries the measured average peak level of all valid pulse pairs in a measurement cycle. \n :return: power: float Range: -200 to 200 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DME:ANALysis:POWer?') return Conversions.str_to_float(response)
[docs] def get_pr_rate(self) -> float: """SCPI: [SOURce<HW>]:[BB]:DME:ANALysis:PRRate \n Snippet: value: float = driver.source.bb.dme.analysis.get_pr_rate() \n Queries the measured mean pulse repetition rate of the DME ground station. All received pulses of the DME ground station are considered. \n :return: rate: float Range: 0 to 10000 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DME:ANALysis:PRRate?') return Conversions.str_to_float(response)
[docs] def get_psa_factor(self) -> float: """SCPI: [SOURce<HW>]:[BB]:DME:ANALysis:PSAFactor \n Snippet: value: float = driver.source.bb.dme.analysis.get_psa_factor() \n Queries the power sensor adjustment factor determined during a normalization of the setup. You can normalize the setup with [:SOURce<hw>][:BB]:DME:ANALysis:NORMalize?. \n :return: pow_sens_adj_fact: float Range: 0 to 200 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DME:ANALysis:PSAFactor?') return Conversions.str_to_float(response)
[docs] def get_rdistance(self) -> float: """SCPI: [SOURce<HW>]:[BB]:DME:ANALysis:RDIStance \n Snippet: value: float = driver.source.bb.dme.analysis.get_rdistance() \n Queries the measured average range distance of all valid pulse pairs in a measurement cycle. \n :return: range_distance: float """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DME:ANALysis:RDIStance?') return Conversions.str_to_float(response)
[docs] def get_state(self) -> bool: """SCPI: [SOURce<HW>]:[BB]:DME:ANALysis:STATe \n Snippet: value: bool = driver.source.bb.dme.analysis.get_state() \n Activates the DME analysis. Activation requires a connection between R&S SMBV100B and a power sensor, for example, the R&S NRP-Z81. \n :return: state: 1| ON| 0| OFF """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DME:ANALysis:STATe?') return Conversions.str_to_bool(response)
[docs] def set_state(self, state: bool) -> None: """SCPI: [SOURce<HW>]:[BB]:DME:ANALysis:STATe \n Snippet: driver.source.bb.dme.analysis.set_state(state = False) \n Activates the DME analysis. Activation requires a connection between R&S SMBV100B and a power sensor, for example, the R&S NRP-Z81. \n :param state: 1| ON| 0| OFF """ param = Conversions.bool_to_str(state) self._core.io.write(f'SOURce<HwInstance>:BB:DME:ANALysis:STATe {param}')
[docs] def get_time(self) -> float: """SCPI: [SOURce<HW>]:[BB]:DME:ANALysis:TIME \n Snippet: value: float = driver.source.bb.dme.analysis.get_time() \n Queries the measured average reply delay of all valid pulse pairs in a measurement cycle. \n :return: time: float Range: -1E-3 to 1E-3 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DME:ANALysis:TIME?') return Conversions.str_to_float(response)
# noinspection PyTypeChecker
[docs] def get_ua_factor(self) -> enums.AvionicDmeUsedFact: """SCPI: [SOURce<HW>]:[BB]:DME:ANALysis:UAFactor \n Snippet: value: enums.AvionicDmeUsedFact = driver.source.bb.dme.analysis.get_ua_factor() \n Sets which internal adjustment factor is used. \n :return: used_factor: INTernal| PSENsor INTernal The mathematically calculated value of the time, when the pulse reaches its 50% level. Query the internal adjustment factor with [:SOURcehw][:BB]:DME:ANALysis:IAFactor? PSENsor The adjustment factor measured during a normalization setup. Query the power sensor adjustment factor with [:SOURcehw][:BB]:DME:ANALysis:PSAFactor? """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DME:ANALysis:UAFactor?') return Conversions.str_to_scalar_enum(response, enums.AvionicDmeUsedFact)
[docs] def set_ua_factor(self, used_factor: enums.AvionicDmeUsedFact) -> None: """SCPI: [SOURce<HW>]:[BB]:DME:ANALysis:UAFactor \n Snippet: driver.source.bb.dme.analysis.set_ua_factor(used_factor = enums.AvionicDmeUsedFact.INTernal) \n Sets which internal adjustment factor is used. \n :param used_factor: INTernal| PSENsor INTernal The mathematically calculated value of the time, when the pulse reaches its 50% level. Query the internal adjustment factor with [:SOURcehw][:BB]:DME:ANALysis:IAFactor? PSENsor The adjustment factor measured during a normalization setup. Query the power sensor adjustment factor with [:SOURcehw][:BB]:DME:ANALysis:PSAFactor? """ param = Conversions.enum_scalar_to_str(used_factor, enums.AvionicDmeUsedFact) self._core.io.write(f'SOURce<HwInstance>:BB:DME:ANALysis:UAFactor {param}')
def clone(self) -> 'AnalysisCls': """Clones the group by creating new object from it and its whole existing subgroups Also copies all the existing default Repeated Capabilities setting, which you can change independently without affecting the original group""" new_group = AnalysisCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group