"""Provides methods to fetch and read the DDemod measurement results."""
import functools
import nirfmxdemod.attributes as attributes
import nirfmxdemod.errors as errors
import nirfmxdemod.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 Demod signal configuration")
return f(*xs, **kws)
return aux
[docs]
class DDemodResults(object):
"""Provides methods to fetch and read the DDemod measurement results."""
def __init__(self, signal_obj):
"""Provides methods to fetch and read the DDemod 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_carrier_mean_frequency_offset(self, selector_string):
r"""Gets the measured frequency offset from the transmitted carrier frequency. This value is expressed in Hz.
You do not need to use a selector string to configure or read this attribute for the default signal 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 measured frequency offset from the transmitted carrier frequency. 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.DDEMOD_RESULTS_CARRIER_MEAN_FREQUENCY_OFFSET.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_carrier_mean_frequency_drift(self, selector_string):
r"""Gets the measured carrier frequency drift. This value is expressed in Hz.
You do not need to use a selector string to configure or read this attribute for the default signal 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 measured carrier frequency drift. 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.DDEMOD_RESULTS_CARRIER_MEAN_FREQUENCY_DRIFT.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_carrier_mean_phase_error(self, selector_string):
r"""Gets the measured phase offset from the transmitted carrier phase. This value is expressed in degrees.
You do not need to use a selector string to configure or read this attribute for the default signal 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 measured phase offset from the transmitted carrier phase. 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.DDEMOD_RESULTS_CARRIER_MEAN_PHASE_ERROR.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_evm_mean_rms(self, selector_string):
r"""Gets the mean of the RMS EVM measured per acquisition, as a percentage.
You do not need to use a selector string to configure or read this attribute for the default signal 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 of the RMS EVM measured per acquisition, 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.DDEMOD_RESULTS_EVM_MEAN_RMS.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_evm_maximum_rms(self, selector_string):
r"""Gets the maximum of the RMS EVM measured per acquisition, as a percentage.
You do not need to use a selector string to configure or read this attribute for the default signal 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 of the RMS EVM measured per acquisition, 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.DDEMOD_RESULTS_EVM_MAXIMUM_RMS.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_evm_mean_peak(self, selector_string):
r"""Gets the mean of the peak EVM measured per acquisition, as a percentage.
You do not need to use a selector string to configure or read this attribute for the default signal 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 of the peak EVM measured per acquisition, 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.DDEMOD_RESULTS_EVM_MEAN_PEAK.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_evm_maximum_peak(self, selector_string):
r"""Gets the maximum of the peak EVM measured per acquisition, as a percentage.
You do not need to use a selector string to configure or read this attribute for the default signal 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 of the peak EVM measured per acquisition, 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.DDEMOD_RESULTS_EVM_MAXIMUM_PEAK.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_evm_mean_modulation_error_ratio(self, selector_string):
r"""Gets the modulation error ratio. This value is expressed in dB.
You do not need to use a selector string to configure or read this attribute for the default signal 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 modulation error ratio. 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.DDEMOD_RESULTS_EVM_MEAN_MODULATION_ERROR_RATIO.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_offset_evm_mean_rms(self, selector_string):
r"""Gets the mean of the RMS EVM, as a percentage, measured per acquisition, after removing the offset between the I and
Q channels of OQPSK demodulated signal.
You do not need to use a selector string to configure or read this attribute for the default signal 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 of the RMS EVM, as a percentage, measured per acquisition, after removing the offset between the I and
Q channels of OQPSK demodulated signal.
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.DDEMOD_RESULTS_OFFSET_EVM_MEAN_RMS.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_offset_evm_mean_peak(self, selector_string):
r"""Gets the mean of the peak EVM, as a percentage, measured per acquisition, after removing the offset between the I
and Q channels of OQPSK demodulated signal.
You do not need to use a selector string to configure or read this attribute for the default signal 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 of the peak EVM, as a percentage, measured per acquisition, after removing the offset between the I
and Q channels of OQPSK demodulated signal.
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.DDEMOD_RESULTS_OFFSET_EVM_MEAN_PEAK.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_offset_evm_maximum_rms(self, selector_string):
r"""Gets the maximum of the RMS EVM, as a percentage, measured per acquisition, after removing the offset between the I
and Q channels of OQPSK demodulated signal.
You do not need to use a selector string to configure or read this attribute for the default signal 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 of the RMS EVM, as a percentage, measured per acquisition, after removing the offset between the I
and Q channels of OQPSK demodulated signal.
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.DDEMOD_RESULTS_OFFSET_EVM_MAXIMUM_RMS.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_offset_evm_maximum_peak(self, selector_string):
r"""Gets the maximum of the peak EVM, as a percentage, measured per acquisition, after removing the offset between the I
and Q channels of OQPSK demodulated signal.
You do not need to use a selector string to configure or read this attribute for the default signal 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 of the peak EVM, as a percentage, measured per acquisition, after removing the offset between the I
and Q channels of OQPSK demodulated signal.
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.DDEMOD_RESULTS_OFFSET_EVM_MAXIMUM_PEAK.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_magnitude_error_mean(self, selector_string):
r"""Gets the mean of the magnitude error measured per acquisition, as a percentage.
You do not need to use a selector string to configure or read this attribute for the default signal 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 of the magnitude error measured per acquisition, 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.DDEMOD_RESULTS_MAGNITUDE_ERROR_MEAN.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_magnitude_error_maximum(self, selector_string):
r"""Gets the maximum of the magnitude error measured per acquisition, as a percentage.
You do not need to use a selector string to configure or read this attribute for the default signal 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 of the magnitude error measured per acquisition, 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.DDEMOD_RESULTS_MAGNITUDE_ERROR_MAXIMUM.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_phase_error_mean(self, selector_string):
r"""Gets the mean of the phase error measured per acquisition. This value is expressed in degrees.
You do not need to use a selector string to configure or read this attribute for the default signal 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 of the phase error measured per acquisition. 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.DDEMOD_RESULTS_PHASE_ERROR_MEAN.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_phase_error_maximum(self, selector_string):
r"""Gets the maximum of the phase error measured per acquisition. This value is expressed in degrees.
You do not need to use a selector string to configure or read this attribute for the default signal 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 of the phase error measured per acquisition. 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.DDEMOD_RESULTS_PHASE_ERROR_MAXIMUM.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_fsk_mean_deviation(self, selector_string):
r"""Gets the reference FSK deviation used to measure the FSK error. This value is expressed in Hz.
You do not need to use a selector string to configure or read this attribute for the default signal 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 reference FSK deviation used to measure the FSK error. 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.DDEMOD_RESULTS_FSK_MEAN_DEVIATION.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_fsk_mean_rms_fsk_error(self, selector_string):
r"""Gets the mean of the RMS frequency error of the FSK symbols measured per acquisition. This value is expressed in Hz.
You do not need to use a selector string to configure or read this attribute for the default signal 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 of the RMS frequency error of the FSK symbols measured per acquisition. 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.DDEMOD_RESULTS_FSK_MEAN_RMS_FSK_ERROR.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_fsk_maximum_peak_fsk_error(self, selector_string):
r"""Gets the maximum of peak frequency error of the FSK symbols measured per acquisition. This value is expressed in Hz.
You do not need to use a selector string to configure or read this attribute for the default signal 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 of peak frequency error of the FSK symbols measured per acquisition. 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.DDEMOD_RESULTS_FSK_MAXIMUM_PEAK_FSK_ERROR.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_iq_impairments_mean_iq_origin_offset(self, selector_string):
r"""Gets the offset from the ideal location of the constellation origin. This value is expressed in dB.
You do not need to use a selector string to configure or read this attribute for the default signal 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 offset from the ideal location of the constellation origin. 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.DDEMOD_RESULTS_IQ_IMPAIRMENTS_MEAN_IQ_ORIGIN_OFFSET.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_iq_impairments_mean_iq_gain_imbalance(self, selector_string):
r"""Gets the measured ratio of I gain to Q gain. This value is expressed in dB.
You do not need to use a selector string to configure or read this attribute for the default signal 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 measured ratio of I gain to Q gain. 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.DDEMOD_RESULTS_IQ_IMPAIRMENTS_MEAN_IQ_GAIN_IMBALANCE.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_iq_impairments_mean_quadrature_skew(self, selector_string):
r"""Gets a measure of I and Q components in the signal that are not perfectly orthogonal. Quadrature error can be either
positive or negative, with the sign indicating the orientation of the error.
You do not need to use a selector string to configure or read this attribute for the default signal 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 a measure of I and Q components in the signal that are not perfectly orthogonal. Quadrature error can be either
positive or negative, with the sign indicating the orientation of the error.
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.DDEMOD_RESULTS_IQ_IMPAIRMENTS_MEAN_QUADRATURE_SKEW.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_mean_rho_factor(self, selector_string):
r"""Gets the correlation of the measurement waveform and the reference waveform.
You do not need to use a selector string to configure or read this attribute for the default signal 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 correlation of the measurement waveform and the reference waveform.
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.DDEMOD_RESULTS_MEAN_RHO_FACTOR.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_mean_amplitude_droop(self, selector_string):
r"""Gets the mean amplitude droop per symbol.
You do not need to use a selector string to configure or read this attribute for the default signal 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 amplitude droop per symbol.
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.DDEMOD_RESULTS_MEAN_AMPLITUDE_DROOP.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def get_sync_found(self, selector_string):
r"""Indicates whether the synchronization bits were found in the demodulated signal.
You do not need to use a selector string to configure or read this attribute for the default signal 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 (bool):
Indicates whether the synchronization bits were found in the demodulated signal.
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_i32(
updated_selector_string, attributes.AttributeID.DDEMOD_RESULTS_SYNC_FOUND.value
)
attr_val = bool(attr_val)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def fetch_evm(self, selector_string, timeout):
r"""Fetches the EVM measurements.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
Returns:
Tuple (mean_rms_evm, maximum_rms_evm, mean_modulation_error_ratio, maximum_peak_evm, mean_peak_evm, error_code):
mean_rms_evm (float):
This parameter returns the mean of the RMS EVM, as a percentage, measured per acquisition.
maximum_rms_evm (float):
This parameter returns the maximum of the RMS EVM, as a percentage, measured per acquisition.
mean_modulation_error_ratio (float):
This parameter returns the modulation error ratio, in dB.
maximum_peak_evm (float):
This parameter returns the maximum of the peak EVM measured per acquisition.
mean_peak_evm (float):
This parameter returns the mean of the peak EVM measured per acquisition.
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_rms_evm,
mean_modulation_error_ratio,
maximum_peak_evm,
mean_peak_evm,
error_code,
) = self._interpreter.digital_demod_fetch_evm(updated_selector_string, timeout)
finally:
self._session_function_lock.exit_read_lock()
return (
mean_rms_evm,
maximum_rms_evm,
mean_modulation_error_ratio,
maximum_peak_evm,
mean_peak_evm,
error_code,
)
[docs]
@_raise_if_disposed
def fetch_offset_evm(self, selector_string, timeout):
r"""Fetches the offset error vector magnitude (EVM).
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
Returns:
Tuple (mean_rms_offset_evm, maximum_rms_offset_evm, maximum_peak_offset_evm, mean_peak_offset_evm, error_code):
mean_rms_offset_evm (float):
This parameter returns the mean of the RMS EVM, measured per acquisition, after removing the offset between the I and Q
channels of OQPSK demodulated signal.
maximum_rms_offset_evm (float):
This parameter returns the mean of the RMS EVM, measured per acquisition, after removing the offset between the I and Q
channels of OQPSK demodulated signal.
maximum_peak_offset_evm (float):
This parameter returns the maximum of the peak EVM, measured per acquisition, after removing the offset between the I
and Q channels of OQPSK demodulated signal.
mean_peak_offset_evm (float):
This parameter returns the mean of the peak EVM, measured per acquisition, after removing the offset between the I and
Q channels of OQPSK demodulated signal.
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_offset_evm,
maximum_rms_offset_evm,
maximum_peak_offset_evm,
mean_peak_offset_evm,
error_code,
) = self._interpreter.digital_demod_fetch_offset_evm(updated_selector_string, timeout)
finally:
self._session_function_lock.exit_read_lock()
return (
mean_rms_offset_evm,
maximum_rms_offset_evm,
maximum_peak_offset_evm,
mean_peak_offset_evm,
error_code,
)
[docs]
@_raise_if_disposed
def fetch_magnitude_error(self, selector_string, timeout):
r"""Fetches the magnitude error measurements.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
Returns:
Tuple (mean_magnitude_error, maximum_magnitude_error, error_code):
mean_magnitude_error (float):
This parameter returns the mean of the magnitude error measured per acquisition.
maximum_magnitude_error (float):
This parameter returns the maximum of the magnitude error measured per acquisition.
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_magnitude_error, maximum_magnitude_error, error_code = (
self._interpreter.digital_demod_fetch_magnitude_error(
updated_selector_string, timeout
)
)
finally:
self._session_function_lock.exit_read_lock()
return mean_magnitude_error, maximum_magnitude_error, error_code
[docs]
@_raise_if_disposed
def fetch_phase_error(self, selector_string, timeout):
r"""Fetches the phase error measurements.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
Returns:
Tuple (mean_phase_error, maximum_phase_error, error_code):
mean_phase_error (float):
This parameter returns the mean of the phase error.
maximum_phase_error (float):
This parameter returns the maximum of the phase error.
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_phase_error, maximum_phase_error, error_code = (
self._interpreter.digital_demod_fetch_phase_error(updated_selector_string, timeout)
)
finally:
self._session_function_lock.exit_read_lock()
return mean_phase_error, maximum_phase_error, error_code
[docs]
@_raise_if_disposed
def fetch_fsk_results(self, selector_string, timeout):
r"""Fetches frequency-shift keying (FSK) results.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
Returns:
Tuple (mean_fsk_deviation, mean_rms_fsk_error, maximum_peak_fsk_error, error_code):
mean_fsk_deviation (float):
This parameter returns the measured FSK deviation, in Hz.
mean_rms_fsk_error (float):
This parameter returns the mean of the RMS frequency error, in Hz, of the FSK symbols measured per acquisition.
maximum_peak_fsk_error (float):
This parameter returns the maximum of peak frequency error of the FSK symbols measured per acquisition.
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_fsk_deviation, mean_rms_fsk_error, maximum_peak_fsk_error, error_code = (
self._interpreter.digital_demod_fetch_fsk_results(updated_selector_string, timeout)
)
finally:
self._session_function_lock.exit_read_lock()
return mean_fsk_deviation, mean_rms_fsk_error, maximum_peak_fsk_error, error_code
[docs]
@_raise_if_disposed
def fetch_iq_impairments(self, selector_string, timeout):
r"""Fetches I/Q impairments.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
Returns:
Tuple (mean_iq_gain_imbalance, mean_quadrature_skew, mean_iq_origin_offset, error_code):
mean_iq_gain_imbalance (float):
This parameter returns the measured ratio of I gain to Q gain, in dB.
mean_quadrature_skew (float):
This parameter returns a measure of I and Q components in the signal that are not perfectly orthogonal.
mean_iq_origin_offset (float):
This parameter returns the offset, in dB, from the ideal location of the constellation origin.
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_gain_imbalance, mean_quadrature_skew, mean_iq_origin_offset, error_code = (
self._interpreter.digital_demod_fetch_iq_impairments(
updated_selector_string, timeout
)
)
finally:
self._session_function_lock.exit_read_lock()
return mean_iq_gain_imbalance, mean_quadrature_skew, mean_iq_origin_offset, error_code
[docs]
@_raise_if_disposed
def fetch_carrier_measurement(self, selector_string, timeout):
r"""Fetches the carrier measurement.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
Returns:
Tuple (mean_frequency_offset, mean_frequency_drift, mean_phase_error, error_code):
mean_frequency_offset (float):
This parameter returns the mean of the measured carrier frequency offset, in Hz.
mean_frequency_drift (float):
This parameter returns the mean of the measured carrier frequency drift, in Hz.
mean_phase_error (float):
This parameter returns the mean of the measured phase offset, in degrees, from the transmitted carrier phase.
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_frequency_offset, mean_frequency_drift, mean_phase_error, error_code = (
self._interpreter.digital_demod_fetch_carrier_measurement(
updated_selector_string, timeout
)
)
finally:
self._session_function_lock.exit_read_lock()
return mean_frequency_offset, mean_frequency_drift, mean_phase_error, error_code
[docs]
@_raise_if_disposed
def fetch_mean_iq_origin_offset(self, selector_string, timeout):
r"""Fetches the offset, in dB, from the ideal location of the constellation origin.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
Returns:
Tuple (mean_iq_origin_offset, error_code):
mean_iq_origin_offset (float):
This parameter returns the offset, in dB, from the ideal location of the constellation origin.
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, error_code = (
self._interpreter.digital_demod_fetch_mean_iq_origin_offset(
updated_selector_string, timeout
)
)
finally:
self._session_function_lock.exit_read_lock()
return mean_iq_origin_offset, error_code
[docs]
@_raise_if_disposed
def fetch_mean_quadrature_skew(self, selector_string, timeout):
r"""Fetches the mean quadrature skew.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
Returns:
Tuple (mean_quadrature_skew, error_code):
mean_quadrature_skew (float):
This parameter returns a measure of I and Q components in the signal that are not perfectly orthogonal. Quadrature
error can be either positive or negative, with the sign indicating the orientation of the error.
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_quadrature_skew, error_code = (
self._interpreter.digital_demod_fetch_mean_quadrature_skew(
updated_selector_string, timeout
)
)
finally:
self._session_function_lock.exit_read_lock()
return mean_quadrature_skew, error_code
[docs]
@_raise_if_disposed
def fetch_mean_rho_factor(self, selector_string, timeout):
r"""Fetches the correlation of the measurement waveform and the reference waveform.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
Returns:
Tuple (mean_rho_factor, error_code):
mean_rho_factor (float):
This parameter returns the correlation of the measurement waveform and the reference waveform.
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_rho_factor, error_code = self._interpreter.digital_demod_fetch_mean_rho_factor(
updated_selector_string, timeout
)
finally:
self._session_function_lock.exit_read_lock()
return mean_rho_factor, error_code
[docs]
@_raise_if_disposed
def fetch_sync_found(self, selector_string, timeout):
r"""Indicates whether synchronization bits were found in the demodulated symbol.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
Returns:
Tuple (sync_found, error_code):
sync_found (bool):
This parameter returns TRUE if the synchronization bits was found in the demodulated signal.
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
)
sync_found, error_code = self._interpreter.digital_demod_fetch_sync_found(
updated_selector_string, timeout
)
finally:
self._session_function_lock.exit_read_lock()
return sync_found, error_code
[docs]
@_raise_if_disposed
def fetch_mean_amplitude_droop(self, selector_string, timeout):
r"""Fetches the mean amplitude droop per symbol.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
Returns:
Tuple (mean_amplitude_droop, error_code):
mean_amplitude_droop (float):
This parameter returns the mean amplitude droop per symbol.
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_amplitude_droop, error_code = (
self._interpreter.digital_demod_fetch_mean_amplitude_droop(
updated_selector_string, timeout
)
)
finally:
self._session_function_lock.exit_read_lock()
return mean_amplitude_droop, error_code
[docs]
@_raise_if_disposed
def read(self, selector_string, timeout):
r"""Configures hardware for acquisition, performs measurement on acquired data for modulation type configured using the
:py:meth:`configure_modulation_type` method, and returns the frequency offset, EVM, and MER results.
Args:
selector_string (string):
This parameter comprises of the signal name.
Example:
""
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
Returns:
Tuple (mean_frequency_offset, mean_rms_evm, maximum_peak_evm, mean_modulation_error_ratio, error_code):
mean_frequency_offset (float):
This parameter returns the mean of the measured carrier frequency offset, in Hz.
mean_rms_evm (float):
This parameter returns the mean of the RMS EVM measured per acquisition.
maximum_peak_evm (float):
This parameter returns the maximum of the peak EVM measured per acquisition.
mean_modulation_error_ratio (float):
This parameter returns the modulation error ratio, 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()
_helper.validate_not_none(selector_string, "selector_string")
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
(
mean_frequency_offset,
mean_rms_evm,
maximum_peak_evm,
mean_modulation_error_ratio,
error_code,
) = self._interpreter.digital_demod_read(updated_selector_string, timeout)
finally:
self._session_function_lock.exit_read_lock()
return (
mean_frequency_offset,
mean_rms_evm,
maximum_peak_evm,
mean_modulation_error_ratio,
error_code,
)
[docs]
@_raise_if_disposed
def fetch_evm_trace(self, selector_string, timeout, evm):
r"""Fetches the EVM trace.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
evm (numpy.float32):
This parameter returns the EVM measured per symbol.
Returns:
Tuple (x0, dx, error_code):
x0 (float):
This parameter returns the start symbol index.
dx (float):
This parameter returns the spacing between symbols normalized to symbol rate.
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.digital_demod_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_offset_evm_trace(self, selector_string, timeout, offset_evm):
r"""Fetches the offset error vector magnitude (EVM) trace measured on OQPSK signal.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
offset_evm (numpy.float32):
This parameter returns the offset EVM trace.
Returns:
Tuple (x0, dx, error_code):
x0 (float):
This parameter returns the start symbol index.
dx (float):
This parameter returns the spacing between symbols normalized to symbol rate.
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.digital_demod_fetch_offset_evm_trace(
updated_selector_string, timeout, offset_evm
)
finally:
self._session_function_lock.exit_read_lock()
return x0, dx, error_code
[docs]
@_raise_if_disposed
def fetch_magnitude_error_trace(self, selector_string, timeout, magnitude_error):
r"""Fetches the magnitude error trace.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
magnitude_error (numpy.float32):
This parameter returns the magnitude error.
Returns:
Tuple (x0, dx, error_code):
x0 (float):
This parameter returns the start symbol index.
dx (float):
This parameter returns the spacing between symbols normalized to symbol rate.
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.digital_demod_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"""Fetches the phase error trace.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
phase_error (numpy.float32):
This parameter returns the phase error.
Returns:
Tuple (x0, dx, error_code):
x0 (float):
This parameter returns the start symbol index.
dx (float):
This parameter returns the spacing between symbols normalized to symbol rate.
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.digital_demod_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_equalizer_coefficients(self, selector_string, timeout, equalizer_coefficients):
r"""Fetches the updated equalizer coefficients.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
equalizer_coefficients (numpy.complex64):
This parameter returns the updated equalizer coefficients.
Returns:
Tuple (x0, dx, error_code):
x0 (float):
This parameter this parameter always returns 0.
dx (float):
This parameter returns the spacing between the coefficients as a fraction of the symbol spacing. For example, if four
coefficients correspond to one symbol, the spacing is 1/4.
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.digital_demod_fetch_equalizer_coefficients(
updated_selector_string, timeout, equalizer_coefficients
)
finally:
self._session_function_lock.exit_read_lock()
return x0, dx, error_code
[docs]
@_raise_if_disposed
def fetch_fsk_deviation_trace(self, selector_string, timeout, fsk_error):
r"""Fetches the frequency-shift keying (FSK) deviation trace.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
fsk_error (numpy.float32):
This parameter returns the mean of the RMS frequency error of the FSK symbols measured per acquisition.
Returns:
Tuple (x0, dx, error_code):
x0 (float):
This parameter returns the start symbol index.
dx (float):
This parameter returns the spacing between symbols normalized to symbol rate.
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.digital_demod_fetch_fsk_deviation_trace(
updated_selector_string, timeout, fsk_error
)
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_trace):
r"""Fetches the constellation trace.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
constellation_trace (numpy.complex64):
This parameter returns the constellation trace.
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.digital_demod_fetch_constellation_trace(
updated_selector_string, timeout, constellation_trace
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def fetch_offset_constellation_trace(
self, selector_string, timeout, offset_constellation_trace
):
r"""Fetches the offset constellation trace.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
offset_constellation_trace (numpy.complex64):
This parameter returns the offset constellation trace.
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.digital_demod_fetch_offset_constellation_trace(
updated_selector_string, timeout, offset_constellation_trace
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def fetch_demodulated_bits(self, selector_string, timeout, demodulated_bits):
r"""Fetches the demodulated bit stream.
Args:
selector_string (string):
This parameter comprises the signal name and result name.
Example:
""
"result::r1"
You can use the :py:meth:`build_result_string` method to build the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_.
timeout (float):
This parameter specifies the timeout for fetching the specified measurement. 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. This value is expressed in seconds.
demodulated_bits (numpy.int8):
This parameter returns the demodulated bit stream.
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.digital_demod_fetch_demodulated_bits(
updated_selector_string, timeout, demodulated_bits
)
finally:
self._session_function_lock.exit_read_lock()
return error_code