Source code for nirfmxcdma2k.qevm_results

"""Provides methods to fetch and read the Qevm measurement results."""

import functools

import nirfmxcdma2k.attributes as attributes
import nirfmxcdma2k.errors as errors
import nirfmxcdma2k.internal._helper as _helper


def _raise_if_disposed(f):
    """From https://stackoverflow.com/questions/5929107/decorators-with-parameters."""

    @functools.wraps(f)
    def aux(*xs, **kws):
        meas_obj = xs[0]  # parameter 0 is 'self' which is the measurement object
        if meas_obj._signal_obj.is_disposed:
            raise Exception("Cannot access a disposed Cdma2k signal configuration")
        return f(*xs, **kws)

    return aux


[docs] class QevmResults(object): """Provides methods to fetch and read the Qevm measurement results.""" def __init__(self, signal_obj): """Provides methods to fetch and read the Qevm measurement results.""" self._signal_obj = signal_obj self._session_function_lock = signal_obj._session_function_lock self._interpreter = signal_obj._interpreter
[docs] @_raise_if_disposed def get_mean_rms_evm(self, selector_string): r"""Gets the mean averaged RMS EVM of the received signal. This value is expressed as a percentage. You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the mean averaged RMS EVM of the received signal. This value is expressed as a percentage. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.QEVM_RESULTS_MEAN_RMS_EVM.value ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_maximum_rms_evm(self, selector_string): r"""Gets the maximum RMS EVM of the received signal. This value is expressed as a percentage. You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the maximum RMS EVM of the received signal. This value is expressed as a percentage. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.QEVM_RESULTS_MAXIMUM_RMS_EVM.value ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_mean_peak_evm(self, selector_string): r"""Gets the mean averaged peak EVM of the received signal. This value is expressed as a percentage. You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the mean averaged peak EVM of the received signal. This value is expressed as a percentage. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.QEVM_RESULTS_MEAN_PEAK_EVM.value ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_maximum_peak_evm(self, selector_string): r"""Gets the maximum peak EVM of the received signal. This value is expressed as a percentage. You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the maximum peak EVM of the received signal. This value is expressed as a percentage. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.QEVM_RESULTS_MAXIMUM_PEAK_EVM.value ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_mean_magnitude_error(self, selector_string): r"""Gets the mean averaged magnitude error of the received signal. This value is expressed as a percentage. You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the mean averaged magnitude error of the received signal. This value is expressed as a percentage. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.QEVM_RESULTS_MEAN_MAGNITUDE_ERROR.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_maximum_magnitude_error(self, selector_string): r"""Gets the maximum magnitude error of the received signal. This value is expressed as a percentage. You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the maximum magnitude error of the received signal. This value is expressed as a percentage. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.QEVM_RESULTS_MAXIMUM_MAGNITUDE_ERROR.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_mean_phase_error(self, selector_string): r"""Gets the mean averaged phase error of the received signal. This value is expressed in degrees. You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_s topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the mean averaged phase error of the received signal. This value is expressed in degrees. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.QEVM_RESULTS_MEAN_PHASE_ERROR.value ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_maximum_phase_error(self, selector_string): r"""Gets the maximum phase error of the received signal. This value is expressed in degrees. You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the maximum phase error of the received signal. This value is expressed in degrees. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.QEVM_RESULTS_MAXIMUM_PHASE_ERROR.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_mean_frequency_error(self, selector_string): r"""Gets the mean averaged frequency error of the received signal. This value is expressed in Hz. You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the mean averaged frequency error of the received signal. This value is expressed in Hz. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.QEVM_RESULTS_MEAN_FREQUENCY_ERROR.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_maximum_frequency_error(self, selector_string): r"""Gets the maximum frequency error of the received signal. This value is expressed in Hz. You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the maximum frequency error of the received signal. This value is expressed in Hz. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.QEVM_RESULTS_MAXIMUM_FREQUENCY_ERROR.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_mean_iq_origin_offset(self, selector_string): r"""Gets the mean averaged origin offset of the received signal. This value is expressed in dB. You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the mean averaged origin offset of the received signal. This value is expressed in dB. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.QEVM_RESULTS_MEAN_IQ_ORIGIN_OFFSET.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_maximum_iq_origin_offset(self, selector_string): r"""Gets the maximum origin offset of the received signal. This value is expressed in dB. You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the maximum origin offset of the received signal. This value is expressed in dB. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.QEVM_RESULTS_MAXIMUM_IQ_ORIGIN_OFFSET.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_mean_iq_gain_imbalance(self, selector_string): r"""Gets the mean I/Q gain imbalance of the received signal. This value is expressed in dB. You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the mean I/Q gain imbalance of the received signal. This value is expressed in dB. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.QEVM_RESULTS_MEAN_IQ_GAIN_IMBALANCE.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_maximum_iq_gain_imbalance(self, selector_string): r"""Gets the maximum I/Q gain imbalance of the received signal. This value is expressed in dB. You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the maximum I/Q gain imbalance of the received signal. This value is expressed in dB. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.QEVM_RESULTS_MAXIMUM_IQ_GAIN_IMBALANCE.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_mean_iq_quadrature_error(self, selector_string): r"""Gets the mean I/Q quadrature error (phase imbalance) of the received signal. This value is expressed in degrees. You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the mean I/Q quadrature error (phase imbalance) of the received signal. This value is expressed in degrees. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.QEVM_RESULTS_MEAN_IQ_QUADRATURE_ERROR.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_maximum_iq_quadrature_error(self, selector_string): r"""Gets the maximum I/Q quadrature error (phase imbalance) of the received signal. This value is expressed in degrees. You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the maximum I/Q quadrature error (phase imbalance) of the received signal. This value is expressed in degrees. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.QEVM_RESULTS_MAXIMUM_IQ_QUADRATURE_ERROR.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_mean_chip_rate_error(self, selector_string): r"""Gets the mean chip rate error. This value is expressed in parts per million (ppm). You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the mean chip rate error. This value is expressed in parts per million (ppm). error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.QEVM_RESULTS_MEAN_CHIP_RATE_ERROR.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_maximum_chip_rate_error(self, selector_string): r"""Gets the maximum chip rate error. This value is expressed in parts per million (ppm). You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the maximum chip rate error. This value is expressed in parts per million (ppm). error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.QEVM_RESULTS_MAXIMUM_CHIP_RATE_ERROR.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def fetch_evm_trace(self, selector_string, timeout, evm): r"""Returns the EVM trace of the last averaging iteration. Args: selector_string (string): This parameter specifies a `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result name. Examples: "" "signal::sig1" "result::r1" "signal::sig1/result::r1" You can use the :py:meth:`build_result_string` method to build the selector string. timeout (float): This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10. evm (numpy.float32): This parameter returns the real signal values stored in an array. This value is expressed as a percentage. Returns: Tuple (x0, dx, error_code): x0 (float): This parameter returns the start time. This value is expressed in seconds. dx (float): This parameter returns the delta parameter. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() _helper.validate_not_none(selector_string, "selector_string") updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) x0, dx, error_code = self._interpreter.qevm_fetch_evm_trace( updated_selector_string, timeout, evm ) finally: self._session_function_lock.exit_read_lock() return x0, dx, error_code
[docs] @_raise_if_disposed def fetch_constellation_trace(self, selector_string, timeout, constellation): r"""Returns the complex chips of the corrected received signal for the QEVM measurement. Args: selector_string (string): This parameter specifies a `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result name. Examples: "" "signal::sig1" "result::r1" "signal::sig1/result::r1" You can use the :py:meth:`build_result_string` method to build the selector string. timeout (float): This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10. constellation (numpy.complex64): This parameter returns the array of complex chips of the corrected signal on which the QEVM measurements are performed. You can use these chips to obtain the constellation diagram. Returns: int: Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() _helper.validate_not_none(selector_string, "selector_string") updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) error_code = self._interpreter.qevm_fetch_constellation_trace( updated_selector_string, timeout, constellation ) finally: self._session_function_lock.exit_read_lock() return error_code
[docs] @_raise_if_disposed def fetch_magnitude_error_trace(self, selector_string, timeout, magnitude_error): r"""Returns the magnitude error trace of the last averaging iteration. Args: selector_string (string): This parameter specifies a `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result name. Examples: "" "signal::sig1" "result::r1" "signal::sig1/result::r1" You can use the :py:meth:`build_result_string` method to build the selector string. timeout (float): This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10. magnitude_error (numpy.float32): This parameter returns the array of the magnitude error values. This value is expressed as a percentage. Returns: Tuple (x0, dx, error_code): x0 (float): This parameter returns the start time. This value is expressed in seconds. dx (float): This parameter returns the chip duration. This value is expressed in seconds. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() _helper.validate_not_none(selector_string, "selector_string") updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) x0, dx, error_code = self._interpreter.qevm_fetch_magnitude_error_trace( updated_selector_string, timeout, magnitude_error ) finally: self._session_function_lock.exit_read_lock() return x0, dx, error_code
[docs] @_raise_if_disposed def fetch_phase_error_trace(self, selector_string, timeout, phase_error): r"""Returns the phase error trace of the last averaging iteration. Args: selector_string (string): This parameter specifies a `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result name. Examples: "" "signal::sig1" "result::r1" "signal::sig1/result::r1" You can use the :py:meth:`build_result_string` method to build the selector string. timeout (float): This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10. phase_error (numpy.float32): This parameter returns the array of phase error values. This value is expressed in degrees. Returns: Tuple (x0, dx, error_code): x0 (float): This parameter returns the start time. This value is expressed in seconds. dx (float): This parameter returns the chip duration. This value is expressed in seconds. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() _helper.validate_not_none(selector_string, "selector_string") updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) x0, dx, error_code = self._interpreter.qevm_fetch_phase_error_trace( updated_selector_string, timeout, phase_error ) finally: self._session_function_lock.exit_read_lock() return x0, dx, error_code
[docs] @_raise_if_disposed def fetch_evm(self, selector_string, timeout): r"""Returns the EVM value and related measurement values of the QEVM measurement. Args: selector_string (string): This parameter specifies a `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result name. Examples: "" "signal::sig1" "result::r1" "signal::sig1/result::r1" You can use the :py:meth:`build_result_string` method to build the selector string. timeout (float): This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10. Returns: Tuple (mean_rms_evm, maximum_peak_evm, mean_frequency_error, mean_magnitude_error, mean_phase_error, mean_chip_rate_error, error_code): mean_rms_evm (float): This parameter returns the mean averaged RMS EVM of the received signal. This value is expressed as a percentage. maximum_peak_evm (float): This parameter returns the maximum peak EVM of the received signal. This value is expressed as a percentage. mean_frequency_error (float): This parameter returns the mean averaged frequency error of the received signal. This value is expressed in Hz. mean_magnitude_error (float): This parameter returns the mean averaged phase error of the received signal. This value is expressed in degrees. mean_phase_error (float): This parameter returns the mean averaged magnitude error of the received signal. This value is expressed as a percentage. mean_chip_rate_error (float): This parameter returns the measured mean chip rate error of the received signal. This value is expressed in parts per million (ppm). error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() _helper.validate_not_none(selector_string, "selector_string") updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) ( mean_rms_evm, maximum_peak_evm, mean_frequency_error, mean_magnitude_error, mean_phase_error, mean_chip_rate_error, error_code, ) = self._interpreter.qevm_fetch_evm(updated_selector_string, timeout) finally: self._session_function_lock.exit_read_lock() return ( mean_rms_evm, maximum_peak_evm, mean_frequency_error, mean_magnitude_error, mean_phase_error, mean_chip_rate_error, error_code, )
[docs] @_raise_if_disposed def fetch_iq_impairments(self, selector_string, timeout): r"""Returns the measured I/Q impairments. Args: selector_string (string): This parameter specifies a `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result name. Examples: "" "signal::sig1" "result::r1" "signal::sig1/result::r1" You can use the :py:meth:`build_result_string` method to build the selector string. timeout (float): This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10. Returns: Tuple (mean_iq_origin_offset, mean_iq_gain_imbalance, mean_iq_quadrature_error, maximum_iq_origin_offset, maximum_iq_gain_imbalance, maximum_iq_quadrature_error, error_code): mean_iq_origin_offset (float): This parameter returns the mean averaged origin offset of the received signal. This value is expressed in dB. mean_iq_gain_imbalance (float): This parameter returns the mean I/Q gain imbalance of the received signal. This value is expressed in dB. mean_iq_quadrature_error (float): This parameter returns the mean I/Q quadrature error (phase imbalance) of the received signal. This value is expressed in degrees. maximum_iq_origin_offset (float): This parameter returns the maximum I/Q gain imbalance of the received signal. This value is expressed in dB. maximum_iq_gain_imbalance (float): This parameter returns the maximum origin offset of the received signal. This value is expressed in dB. maximum_iq_quadrature_error (float): This parameter returns the maximum I/Q quadrature error (phase imbalance) of the received signal. This value is expressed in degrees. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() _helper.validate_not_none(selector_string, "selector_string") updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) ( mean_iq_origin_offset, mean_iq_gain_imbalance, mean_iq_quadrature_error, maximum_iq_origin_offset, maximum_iq_gain_imbalance, maximum_iq_quadrature_error, error_code, ) = self._interpreter.qevm_fetch_iq_impairments(updated_selector_string, timeout) finally: self._session_function_lock.exit_read_lock() return ( mean_iq_origin_offset, mean_iq_gain_imbalance, mean_iq_quadrature_error, maximum_iq_origin_offset, maximum_iq_gain_imbalance, maximum_iq_quadrature_error, error_code, )