Source code for nirfmxdemod.analog_demod_results

"""Provides methods to fetch and read the ADemod 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 ADemodResults(object): """Provides methods to fetch and read the ADemod measurement results.""" def __init__(self, signal_obj): """Provides methods to fetch and read the ADemod 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_carrier_frequency_error(self, selector_string): r"""Gets the mean of the measured carrier frequency offset. 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 measured carrier frequency offset. 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.ADEMOD_RESULTS_MEAN_CARRIER_FREQUENCY_ERROR.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_mean_carrier_power(self, selector_string): r"""Gets the mean of the measured carrier power. This value is expressed in dBm. 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 measured carrier power. This value is expressed in dBm. 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.ADEMOD_RESULTS_MEAN_CARRIER_POWER.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_mean_modulation_frequency(self, selector_string): r"""Gets the mean of the demodulated signal 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 mean of the demodulated signal 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.ADEMOD_RESULTS_MEAN_MODULATION_FREQUENCY.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_average_sinad(self, selector_string): r"""Gets the averaged signal-to-noise and distortion ratio of the demodulated signal. 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 averaged signal-to-noise and distortion ratio of the demodulated 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.ADEMOD_RESULTS_AVERAGE_SINAD.value ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_average_thd_with_noise(self, selector_string): r"""Gets the averaged total harmonic distortion with noise of the demodulated signal, 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 averaged total harmonic distortion with noise of the demodulated signal, 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.ADEMOD_RESULTS_AVERAGE_THD_WITH_NOISE.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_average_thd(self, selector_string): r"""Gets the averaged total harmonic distortion of the demodulated signal, 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 averaged total harmonic distortion of the demodulated signal, 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.ADEMOD_RESULTS_AVERAGE_THD.value ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_average_snr(self, selector_string): r"""Gets the averaged signal-to-noise ratio of the demodulated signal. 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 averaged signal-to-noise ratio of the demodulated 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.ADEMOD_RESULTS_AVERAGE_SNR.value ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_am_modulation_depth_mean_standard_deviation(self, selector_string): r"""Gets the mean amplitude variation around the unmodulated carrier amplitude, as a percentage. If the carrier is suppressed, the amplitude variation of the modulating signal is returned. 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 variation around the unmodulated carrier amplitude, as a percentage. If the carrier is suppressed, the amplitude variation of the modulating signal is returned. 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.ADEMOD_RESULTS_AM_MODULATION_DEPTH_MEAN_STANDARD_DEVIATION.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_am_modulation_depth_mean_half_peak_to_peak(self, selector_string): r"""Gets the mean (peak-to-peak)/2 amplitude of the modulating signal, 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 (peak-to-peak)/2 amplitude of the modulating signal, 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.ADEMOD_RESULTS_AM_MODULATION_DEPTH_MEAN_HALF_PEAK_TO_PEAK.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_am_modulation_depth_mean_positive_peak(self, selector_string): r"""Gets the mean positive peak amplitude of the modulating signal, 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 positive peak amplitude of the modulating signal, 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.ADEMOD_RESULTS_AM_MODULATION_DEPTH_MEAN_POSITIVE_PEAK.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_am_modulation_depth_mean_negative_peak(self, selector_string): r"""Gets the mean negative peak amplitude of the modulating signal, 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 negative peak amplitude of the modulating signal, 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.ADEMOD_RESULTS_AM_MODULATION_DEPTH_MEAN_NEGATIVE_PEAK.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_am_modulation_depth_mean_rms(self, selector_string): r"""Gets the mean RMS amplitude of the modulating signal, 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 RMS amplitude of the modulating signal, 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.ADEMOD_RESULTS_AM_MODULATION_DEPTH_MEAN_RMS.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_am_modulation_depth_maximum_standard_deviation(self, selector_string): r"""Gets the maximum modulation depth measured across multiple acquisitions, 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 modulation depth measured across multiple acquisitions, 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.ADEMOD_RESULTS_AM_MODULATION_DEPTH_MAXIMUM_STANDARD_DEVIATION.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_am_modulation_depth_maximum_half_peak_to_peak(self, selector_string): r"""Gets the maximum (peak-to-peak)/2 amplitude of the modulating signal measured across multiple acquisitions, 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 (peak-to-peak)/2 amplitude of the modulating signal measured across multiple acquisitions, 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.ADEMOD_RESULTS_AM_MODULATION_DEPTH_MAXIMUM_HALF_PEAK_TO_PEAK.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_am_modulation_depth_maximum_positive_peak(self, selector_string): r"""Gets the maximum positive peak amplitude of the modulating signal measured across multiple acquisitions, 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 positive peak amplitude of the modulating signal measured across multiple acquisitions, 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.ADEMOD_RESULTS_AM_MODULATION_DEPTH_MAXIMUM_POSITIVE_PEAK.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_am_modulation_depth_maximum_negative_peak(self, selector_string): r"""Gets the maximum negative peak amplitude of the modulating signal measured across multiple acquisitions, 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 negative peak amplitude of the modulating signal measured across multiple acquisitions, 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.ADEMOD_RESULTS_AM_MODULATION_DEPTH_MAXIMUM_NEGATIVE_PEAK.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_am_modulation_depth_maximum_rms(self, selector_string): r"""Gets the maximum RMS amplitude of the modulating signal measured across multiple acquisitions, 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 RMS amplitude of the modulating signal measured across multiple acquisitions, 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.ADEMOD_RESULTS_AM_MODULATION_DEPTH_MAXIMUM_RMS.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_fm_deviation_mean_standard_deviation(self, selector_string): r"""Gets the mean frequency deviation around the nominal frequency of the FM carrier. 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 frequency deviation around the nominal frequency of the FM carrier. 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.ADEMOD_RESULTS_FM_DEVIATION_MEAN_STANDARD_DEVIATION.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_fm_deviation_mean_half_peak_to_peak(self, selector_string): r"""Gets the mean (peak-to-peak)/2 frequency variation around the nominal frequency of the FM carrier. 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 (peak-to-peak)/2 frequency variation around the nominal frequency of the FM carrier. 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.ADEMOD_RESULTS_FM_DEVIATION_MEAN_HALF_PEAK_TO_PEAK.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_fm_deviation_mean_positive_peak(self, selector_string): r"""Gets the mean positive peak frequency deviation of the frequency-modulated signal. 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 positive peak frequency deviation of the frequency-modulated 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.ADEMOD_RESULTS_FM_DEVIATION_MEAN_POSITIVE_PEAK.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_fm_deviation_mean_negative_peak(self, selector_string): r"""Gets the mean negative peak frequency deviation of the frequency-modulated signal. 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 negative peak frequency deviation of the frequency-modulated 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.ADEMOD_RESULTS_FM_DEVIATION_MEAN_NEGATIVE_PEAK.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_fm_deviation_mean_rms(self, selector_string): r"""Gets the mean RMS frequency deviation of the frequency-modulated signal. 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 RMS frequency deviation of the frequency-modulated 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.ADEMOD_RESULTS_FM_DEVIATION_MEAN_RMS.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_fm_deviation_maximum_standard_deviation(self, selector_string): r"""Gets the maximum frequency deviation of the frequency-modulated signal measured across multiple acquisitions. 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 frequency deviation of the frequency-modulated signal measured across multiple acquisitions. 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.ADEMOD_RESULTS_FM_DEVIATION_MAXIMUM_STANDARD_DEVIATION.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_fm_deviation_maximum_half_peak_to_peak(self, selector_string): r"""Gets the maximum (peak-to-peak)/2 frequency variation around the nominal frequency of the FM carrier measured across multiple acquisitions. 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 (peak-to-peak)/2 frequency variation around the nominal frequency of the FM carrier measured across multiple acquisitions. 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.ADEMOD_RESULTS_FM_DEVIATION_MAXIMUM_HALF_PEAK_TO_PEAK.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_fm_deviation_maximum_positive_peak(self, selector_string): r"""Gets the maximum positive peak frequency deviation of the frequency-modulated signal measured across multiple acquisitions. 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 positive peak frequency deviation of the frequency-modulated signal measured across multiple acquisitions. 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.ADEMOD_RESULTS_FM_DEVIATION_MAXIMUM_POSITIVE_PEAK.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_fm_deviation_maximum_negative_peak(self, selector_string): r"""Gets the maximum negative peak frequency deviation of the frequency-modulated signal measured across multiple acquisitions. 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 negative peak frequency deviation of the frequency-modulated signal measured across multiple acquisitions. 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.ADEMOD_RESULTS_FM_DEVIATION_MAXIMUM_NEGATIVE_PEAK.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_fm_deviation_maximum_rms(self, selector_string): r"""Gets the maximum RMS frequency deviation of the frequency-modulated signal measured across multiple acquisitions. 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 RMS frequency deviation of the frequency-modulated signal measured across multiple acquisitions. 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.ADEMOD_RESULTS_FM_DEVIATION_MAXIMUM_RMS.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_pm_deviation_mean_standard_deviation(self, selector_string): r"""Gets the mean phase deviation around the unmodulated 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 mean phase deviation around the unmodulated 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.ADEMOD_RESULTS_PM_DEVIATION_MEAN_STANDARD_DEVIATION.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_pm_deviation_mean_half_peak_to_peak(self, selector_string): r"""Gets the mean (peak-to-peak)/2 phase deviation around the unmodulated 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 mean (peak-to-peak)/2 phase deviation around the unmodulated 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.ADEMOD_RESULTS_PM_DEVIATION_MEAN_HALF_PEAK_TO_PEAK.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_pm_deviation_mean_positive_peak(self, selector_string): r"""Gets the mean positive peak phase deviation around the unmodulated 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 mean positive peak phase deviation around the unmodulated 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.ADEMOD_RESULTS_PM_DEVIATION_MEAN_POSITIVE_PEAK.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_pm_deviation_mean_negative_peak(self, selector_string): r"""Gets the mean negative peak phase deviation around the unmodulated 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 mean negative peak phase deviation around the unmodulated 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.ADEMOD_RESULTS_PM_DEVIATION_MEAN_NEGATIVE_PEAK.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_pm_deviation_mean_rms(self, selector_string): r"""Gets the mean RMS phase deviation of the phase-modulated signal. 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 RMS phase deviation of the phase-modulated 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.ADEMOD_RESULTS_PM_DEVIATION_MEAN_RMS.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_pm_deviation_maximum_standard_deviation(self, selector_string): r"""Gets the maximum phase deviation around the unmodulated carrier phase, measured across multiple acquisitions. 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 phase deviation around the unmodulated carrier phase, measured across multiple acquisitions. 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.ADEMOD_RESULTS_PM_DEVIATION_MAXIMUM_STANDARD_DEVIATION.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_pm_deviation_maximum_half_peak_to_peak(self, selector_string): r"""Gets the maximum (peak-to-peak)/2 phase deviation around the unmodulated carrier phase, measured across multiple acquisitions. 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 (peak-to-peak)/2 phase deviation around the unmodulated carrier phase, measured across multiple acquisitions. 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.ADEMOD_RESULTS_PM_DEVIATION_MAXIMUM_HALF_PEAK_TO_PEAK.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_pm_deviation_maximum_positive_peak(self, selector_string): r"""Gets the maximum positive peak phase deviation around the unmodulated carrier phase, measured across multiple acquisitions. 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 positive peak phase deviation around the unmodulated carrier phase, measured across multiple acquisitions. 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.ADEMOD_RESULTS_PM_DEVIATION_MAXIMUM_POSITIVE_PEAK.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_pm_deviation_maximum_negative_peak(self, selector_string): r"""Gets the maximum negative peak phase deviation around the unmodulated carrier phase, measured across multiple acquisitions. 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 negative peak phase deviation around the unmodulated carrier phase, measured across multiple acquisitions. 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.ADEMOD_RESULTS_PM_DEVIATION_MAXIMUM_NEGATIVE_PEAK.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_pm_deviation_maximum_rms(self, selector_string): r"""Gets the maximum RMS phase deviation of the phase-modulated signal measured across multiple acquisitions. 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 RMS phase deviation of the phase-modulated signal measured across multiple acquisitions. 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.ADEMOD_RESULTS_PM_DEVIATION_MAXIMUM_RMS.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, 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_carrier_frequency_error, mean_carrier_power, error_code): mean_carrier_frequency_error (float): This parameter returns the mean of the measured carrier frequency error, in Hz. mean_carrier_power (float): This parameter returns the mean of the measured carrier power, in dBm. 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_carrier_frequency_error, mean_carrier_power, error_code = ( self._interpreter.analog_demod_fetch_carrier_measurement( updated_selector_string, timeout ) ) finally: self._session_function_lock.exit_read_lock() return mean_carrier_frequency_error, mean_carrier_power, error_code
[docs] @_raise_if_disposed def fetch_mean_modulation_frequency(self, selector_string, timeout): r"""Fetches the mean modulation frequency. 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_modulation_frequency, error_code): mean_modulation_frequency (float): This parameter returns the mean of the demodulated signal frequency. 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_modulation_frequency, error_code = ( self._interpreter.analog_demod_fetch_mean_modulation_frequency( updated_selector_string, timeout ) ) finally: self._session_function_lock.exit_read_lock() return mean_modulation_frequency, error_code
[docs] @_raise_if_disposed def fetch_am_maximum_modulation_depth(self, selector_string, timeout): r"""Fetches the AM maximum modulation depth. 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 (maximum_modulation_depth, maximum_half_peak_to_peak, maximum_rms, maximum_positive_peak, maximum_negative_peak, error_code): maximum_modulation_depth (float): This parameter returns the maximum modulation depth, as a percentage, measured across multiple acquisitions. maximum_half_peak_to_peak (float): This parameter returns the maximum (peak-to-peak)/2 amplitude, as a percentage, of the modulating signal measured across multiple acquisitions. maximum_rms (float): This parameter returns the maximum RMS amplitude, as a percentage, of the modulating signal measured across multiple acquisitions. maximum_positive_peak (float): This parameter returns the maximum positive peak amplitude, as a percentage, of the modulating signal measured across multiple acquisitions. maximum_negative_peak (float): This parameter returns the maximum negative peak amplitude, as a percentage, of the modulating signal measured across multiple acquisitions. 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 ) ( maximum_modulation_depth, maximum_half_peak_to_peak, maximum_rms, maximum_positive_peak, maximum_negative_peak, error_code, ) = self._interpreter.analog_demod_fetch_am_maximum_modulation_depth( updated_selector_string, timeout ) finally: self._session_function_lock.exit_read_lock() return ( maximum_modulation_depth, maximum_half_peak_to_peak, maximum_rms, maximum_positive_peak, maximum_negative_peak, error_code, )
[docs] @_raise_if_disposed def fetch_am_mean_modulation_depth(self, selector_string, timeout): r"""Fetches AM mean modulation depth for analog demodulation 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_modulation_depth, mean_half_peak_to_peak, mean_rms, mean_positive_peak, mean_negative_peak, error_code): mean_modulation_depth (float): This parameter returns the mean amplitude variation, as a percentage, around the unmodulated carrier amplitude. If the carrier is suppressed, the amplitude variation of the modulating signal is returned. mean_half_peak_to_peak (float): This parameter returns the mean (peak-to-peak)/2 amplitude, as a percentage, of the modulating signal. mean_rms (float): This parameter returns the mean RMS amplitude of the modulating signal. mean_positive_peak (float): This parameter returns the mean positive peak amplitude, as a percentage, of the modulating signal. mean_negative_peak (float): This parameter returns the mean negative peak amplitude, as a percentage, of the modulating 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_modulation_depth, mean_half_peak_to_peak, mean_rms, mean_positive_peak, mean_negative_peak, error_code, ) = self._interpreter.analog_demod_fetch_am_mean_modulation_depth( updated_selector_string, timeout ) finally: self._session_function_lock.exit_read_lock() return ( mean_modulation_depth, mean_half_peak_to_peak, mean_rms, mean_positive_peak, mean_negative_peak, error_code, )
[docs] @_raise_if_disposed def read_am(self, selector_string, timeout): r"""Configures hardware for acquisition, performs measurement on acquired data, and returns the AM measurement 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_modulation_depth, mean_carrier_power, error_code): mean_modulation_depth (float): This parameter returns the mean amplitude variation, as a percentage, around the unmodulated carrier amplitude. If the carrier is suppressed, the amplitude variation of the modulating signal is returned. mean_carrier_power (float): This parameter returns the mean of the measured carrier power, in dBm. 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_modulation_depth, mean_carrier_power, error_code = ( self._interpreter.analog_demod_read_am(updated_selector_string, timeout) ) finally: self._session_function_lock.exit_read_lock() return mean_modulation_depth, mean_carrier_power, error_code
[docs] @_raise_if_disposed def fetch_fm_maximum_deviation(self, selector_string, timeout): r"""Fetches the FM maximum deviation 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 (maximum_deviation, maximum_half_peak_to_peak, maximum_rms, maximum_positive_peak, maximum_negative_peak, error_code): maximum_deviation (float): This parameter returns the maximum frequency deviation, in Hz, of the frequency-modulated signal measured across multiple acquisitions. maximum_half_peak_to_peak (float): This parameter returns the maximum (peak-to-peak)/2 frequency variation, in Hz, around the nominal frequency of the FM carrier measured across multiple acquisitions. maximum_rms (float): This parameter returns the maximum RMS frequency deviation, in Hz, of the frequency-modulated signal measured across multiple acquisitions. maximum_positive_peak (float): This parameter returns the maximum positive peak frequency deviation, in Hz, of the frequency-modulated signal measured across multiple acquisitions. maximum_negative_peak (float): This parameter returns the maximum negative peak frequency deviation, in Hz, of the frequency-modulated signal measured across multiple acquisitions. 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 ) ( maximum_deviation, maximum_half_peak_to_peak, maximum_rms, maximum_positive_peak, maximum_negative_peak, error_code, ) = self._interpreter.analog_demod_fetch_fm_maximum_deviation( updated_selector_string, timeout ) finally: self._session_function_lock.exit_read_lock() return ( maximum_deviation, maximum_half_peak_to_peak, maximum_rms, maximum_positive_peak, maximum_negative_peak, error_code, )
[docs] @_raise_if_disposed def fetch_fm_mean_deviation(self, selector_string, timeout): r"""Fetches the FM mean deviation 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_deviation, mean_half_peak_to_peak, mean_rms, mean_positive_peak, mean_negative_peak, error_code): mean_deviation (float): This parameter returns the mean deviation, in Hz, of the frequency-modulated signal. mean_half_peak_to_peak (float): This parameter returns the mean (peak-to-peak)/2 frequency variation, in Hz, around the nominal frequency of the FM carrier. mean_rms (float): This parameter returns the mean RMS frequency deviation, in Hz, of the frequency-modulated signal. mean_positive_peak (float): This parameter returns the mean positive peak frequency deviation, in Hz, of the frequency-modulated signal. mean_negative_peak (float): This parameter returns the mean negative peak frequency deviation of the frequency-modulated 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_deviation, mean_half_peak_to_peak, mean_rms, mean_positive_peak, mean_negative_peak, error_code, ) = self._interpreter.analog_demod_fetch_fm_mean_deviation( updated_selector_string, timeout ) finally: self._session_function_lock.exit_read_lock() return ( mean_deviation, mean_half_peak_to_peak, mean_rms, mean_positive_peak, mean_negative_peak, error_code, )
[docs] @_raise_if_disposed def read_fm(self, selector_string, timeout): r"""Configures hardware for acquisition, performs measurement on acquired data, and returns the FM measurement 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_deviation, mean_carrier_frequency_error, error_code): mean_deviation (float): This parameter returns the mean frequency deviation, in Hz, around the nominal frequency of the FM carrier. mean_carrier_frequency_error (float): This parameter returns the mean of the measured carrier frequency error, 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() _helper.validate_not_none(selector_string, "selector_string") updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) mean_deviation, mean_carrier_frequency_error, error_code = ( self._interpreter.analog_demod_read_fm(updated_selector_string, timeout) ) finally: self._session_function_lock.exit_read_lock() return mean_deviation, mean_carrier_frequency_error, error_code
[docs] @_raise_if_disposed def fetch_pm_maximum_deviation(self, selector_string, timeout): r"""Fetches the PM maximum deviation 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 (maximum_deviation, maximum_half_peak_to_peak, maximum_rms, maximum_positive_peak, maximum_negative_peak, error_code): maximum_deviation (float): This parameter returns the maximum phase deviation, in degrees, around the unmodulated carrier phase measured over multiple acquisitions. maximum_half_peak_to_peak (float): This parameter returns the maximum (peak to peak)/2 phase deviation, in degrees, around the unmodulated carrier phase measured over multiple acquisitions. maximum_rms (float): This parameter returns the maximum RMS phase deviation, in degrees, of the PM signal measured over multiple acquisitions. maximum_positive_peak (float): This parameter returns the maximum positive peak phase deviation, in degrees, around the unmodulated carrier phase, measured across multiple acquisitions. maximum_negative_peak (float): This parameter returns the maximum negative peak phase deviation, in degrees, around the unmodulated carrier phase, measured across multiple acquisitions. 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 ) ( maximum_deviation, maximum_half_peak_to_peak, maximum_rms, maximum_positive_peak, maximum_negative_peak, error_code, ) = self._interpreter.analog_demod_fetch_pm_maximum_deviation( updated_selector_string, timeout ) finally: self._session_function_lock.exit_read_lock() return ( maximum_deviation, maximum_half_peak_to_peak, maximum_rms, maximum_positive_peak, maximum_negative_peak, error_code, )
[docs] @_raise_if_disposed def fetch_pm_mean_deviation(self, selector_string, timeout): r"""Fetches the PM mean deviation 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_deviation, mean_half_peak_to_peak, mean_rms, mean_positive_peak, mean_negative_peak, error_code): mean_deviation (float): This parameter returns the mean deviation around the unmodulated carrier phase. mean_half_peak_to_peak (float): This parameter returns the mean (peak-to-peak)/2 phase deviation, in degrees, around the unmodulated carrier phase. mean_rms (float): This parameter returns the mean RMS phase deviation, in degrees, of the phase-modulated signal. mean_positive_peak (float): This parameter returns the mean positive peak phase deviation, in degrees, around the unmodulated carrier phase. mean_negative_peak (float): This parameter returns the mean negative peak phase deviation, in degrees, around the unmodulated 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_deviation, mean_half_peak_to_peak, mean_rms, mean_positive_peak, mean_negative_peak, error_code, ) = self._interpreter.analog_demod_fetch_pm_mean_deviation( updated_selector_string, timeout ) finally: self._session_function_lock.exit_read_lock() return ( mean_deviation, mean_half_peak_to_peak, mean_rms, mean_positive_peak, mean_negative_peak, error_code, )
[docs] @_raise_if_disposed def read_pm(self, selector_string, timeout): r"""Configures hardware for acquisition, performs measurement on acquired data, and returns the PM measurement 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_deviation, mean_carrier_frequency_error, error_code): mean_deviation (float): This parameter returns the mean phase deviation, in degrees, of a phase modulated signal. mean_carrier_frequency_error (float): This parameter returns the mean of the measured carrier frequency error, 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() _helper.validate_not_none(selector_string, "selector_string") updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) mean_deviation, mean_carrier_frequency_error, error_code = ( self._interpreter.analog_demod_read_pm(updated_selector_string, timeout) ) finally: self._session_function_lock.exit_read_lock() return mean_deviation, mean_carrier_frequency_error, error_code
[docs] @_raise_if_disposed def fetch_distortions(self, selector_string, timeout): r"""Fetches distortions for analog demodulation 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 (average_sinad, average_snr, average_thd, average_thd_with_noise, error_code): average_sinad (float): This parameter returns the averaged signal-to-noise and distortion ratio, in dB, of the demodulated signal. average_snr (float): This parameter returns the averaged signal-to-noise ratio, in dB, of the demodulated signal. average_thd (float): This parameter returns the averaged total harmonic distortion, as a percentage, of demodulated signal. average_thd_with_noise (float): This parameter returns the averaged total harmonic distortion with noise, as a percentage, of 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 ) average_sinad, average_snr, average_thd, average_thd_with_noise, error_code = ( self._interpreter.analog_demod_fetch_distortions(updated_selector_string, timeout) ) finally: self._session_function_lock.exit_read_lock() return average_sinad, average_snr, average_thd, average_thd_with_noise, error_code
[docs] @_raise_if_disposed def fetch_demod_signal_trace(self, selector_string, timeout, demodulated_signal): r"""Fetches the demodulated signal 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. demodulated_signal (numpy.float32): This parameter returns the demodulated signal. Returns: Tuple (x0, dx, error_code): x0 (float): This parameter returns the start time, in seconds. dx (float): This parameter returns the sample duration, 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.analog_demod_fetch_demod_signal_trace( updated_selector_string, timeout, demodulated_signal ) finally: self._session_function_lock.exit_read_lock() return x0, dx, error_code
[docs] @_raise_if_disposed def fetch_demod_spectrum_trace(self, selector_string, timeout, demodulated_spectrum): r"""Fetches the demodulated signal spectrum 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. demodulated_spectrum (numpy.float32): This parameter returns the demodulated signal spectrum. Returns: Tuple (x0, dx, error_code): x0 (float): This parameter returns the start bin frequency, in Hz. dx (float): This parameter returns the frequency bin spacing, 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() _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.analog_demod_fetch_demod_spectrum_trace( updated_selector_string, timeout, demodulated_spectrum ) finally: self._session_function_lock.exit_read_lock() return x0, dx, error_code