"""Provides methods to configure the Dpd measurement."""
import functools
import nirfmxspecan.attributes as attributes
import nirfmxspecan.enums as enums
import nirfmxspecan.errors as errors
import nirfmxspecan.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 SpecAn signal configuration")
return f(*xs, **kws)
return aux
[docs]
class DpdConfiguration(object):
"""Provides methods to configure the Dpd measurement."""
def __init__(self, signal_obj):
"""Provides methods to configure the Dpd measurement."""
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_measurement_enabled(self, selector_string):
r"""Gets whether to enable DPD measurement.
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.
The default value is FALSE.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (bool):
Specifies whether to enable DPD measurement.
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.DPD_MEASUREMENT_ENABLED.value
)
attr_val = bool(attr_val)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_measurement_enabled(self, selector_string, value):
r"""Sets whether to enable DPD measurement.
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.
The default value is FALSE.
Args:
selector_string (string):
Pass an empty string.
value (bool):
Specifies whether to enable DPD measurement.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_MEASUREMENT_ENABLED.value,
int(value),
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_measurement_sample_rate_mode(self, selector_string):
r"""Gets the acquisition sample rate configuration mode.
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.
The default value is **Reference Waveform**.
+------------------------+--------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+========================+============================================================================================+
| User (0) | The acquisition sample rate is defined by the value of the DPD Meas Sample Rate attribute. |
+------------------------+--------------------------------------------------------------------------------------------+
| Reference Waveform (1) | The acquisition sample rate is set to match the sample rate of the reference waveform. |
+------------------------+--------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdMeasurementSampleRateMode):
Specifies the acquisition sample rate configuration mode.
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.DPD_MEASUREMENT_SAMPLE_RATE_MODE.value,
)
attr_val = enums.DpdMeasurementSampleRateMode(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_measurement_sample_rate_mode(self, selector_string, value):
r"""Sets the acquisition sample rate configuration mode.
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.
The default value is **Reference Waveform**.
+------------------------+--------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+========================+============================================================================================+
| User (0) | The acquisition sample rate is defined by the value of the DPD Meas Sample Rate attribute. |
+------------------------+--------------------------------------------------------------------------------------------+
| Reference Waveform (1) | The acquisition sample rate is set to match the sample rate of the reference waveform. |
+------------------------+--------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdMeasurementSampleRateMode, int):
Specifies the acquisition sample rate configuration mode.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdMeasurementSampleRateMode else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_MEASUREMENT_SAMPLE_RATE_MODE.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_measurement_sample_rate(self, selector_string):
r"""Gets the acquisition sample rate when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MEASUREMENT_SAMPLE_RATE_MODE` attribute to **User**. This value is
expressed in Samples per second (S/s). Actual sample rate may differ from requested sample rate in order to ensure a
waveform is phase continuous.
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.
The default value is 120 MHz.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Specifies the acquisition sample rate when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MEASUREMENT_SAMPLE_RATE_MODE` attribute to **User**. This value is
expressed in Samples per second (S/s). Actual sample rate may differ from requested sample rate in order to ensure a
waveform is phase continuous.
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.DPD_MEASUREMENT_SAMPLE_RATE.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_measurement_sample_rate(self, selector_string, value):
r"""Sets the acquisition sample rate when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MEASUREMENT_SAMPLE_RATE_MODE` attribute to **User**. This value is
expressed in Samples per second (S/s). Actual sample rate may differ from requested sample rate in order to ensure a
waveform is phase continuous.
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.
The default value is 120 MHz.
Args:
selector_string (string):
Pass an empty string.
value (float):
Specifies the acquisition sample rate when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MEASUREMENT_SAMPLE_RATE_MODE` attribute to **User**. This value is
expressed in Samples per second (S/s). Actual sample rate may differ from requested sample rate in order to ensure a
waveform is phase continuous.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_f64(
updated_selector_string,
attributes.AttributeID.DPD_MEASUREMENT_SAMPLE_RATE.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_measurement_interval(self, selector_string):
r"""Gets the duration of the reference waveform considered for the DPD measurement. When the reference waveform
contains an idle duration, the DPD measurement neglects the idle samples in the reference waveform leading up to the
start of the first active portion of the reference waveform. This value is expressed in seconds.
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.
The default value is 100E-6.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Specifies the duration of the reference waveform considered for the DPD measurement. When the reference waveform
contains an idle duration, the DPD measurement neglects the idle samples in the reference waveform leading up to the
start of the first active portion of the reference waveform. This value is expressed in seconds.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
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.DPD_MEASUREMENT_INTERVAL.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_measurement_interval(self, selector_string, value):
r"""Sets the duration of the reference waveform considered for the DPD measurement. When the reference waveform
contains an idle duration, the DPD measurement neglects the idle samples in the reference waveform leading up to the
start of the first active portion of the reference waveform. This value is expressed in seconds.
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.
The default value is 100E-6.
Args:
selector_string (string):
Pass an empty string.
value (float):
Specifies the duration of the reference waveform considered for the DPD measurement. When the reference waveform
contains an idle duration, the DPD measurement neglects the idle samples in the reference waveform leading up to the
start of the first active portion of the reference waveform. This value is expressed in seconds.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_f64(
updated_selector_string,
attributes.AttributeID.DPD_MEASUREMENT_INTERVAL.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_signal_type(self, selector_string):
r"""Gets whether the reference waveform is a modulated signal or a combination of one or more sinusoidal signals. To
time-align the sinusoidal reference waveform to the acquired signal, set the DPD Signal Type attribute to **Tones**,
which switches the DPD measurement alignment algorithm.
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.
The default value is **Modulated**.
+---------------+-----------------------------------------------------------------------------+
| Name (Value) | Description |
+===============+=============================================================================+
| Modulated (0) | The reference waveform is a cellular or connectivity standard signal. |
+---------------+-----------------------------------------------------------------------------+
| Tones (1) | The reference waveform is a continuous signal comprising one or more tones. |
+---------------+-----------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdSignalType):
Specifies whether the reference waveform is a modulated signal or a combination of one or more sinusoidal signals. To
time-align the sinusoidal reference waveform to the acquired signal, set the DPD Signal Type attribute to **Tones**,
which switches the DPD measurement alignment algorithm.
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.DPD_SIGNAL_TYPE.value
)
attr_val = enums.DpdSignalType(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_signal_type(self, selector_string, value):
r"""Sets whether the reference waveform is a modulated signal or a combination of one or more sinusoidal signals. To
time-align the sinusoidal reference waveform to the acquired signal, set the DPD Signal Type attribute to **Tones**,
which switches the DPD measurement alignment algorithm.
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.
The default value is **Modulated**.
+---------------+-----------------------------------------------------------------------------+
| Name (Value) | Description |
+===============+=============================================================================+
| Modulated (0) | The reference waveform is a cellular or connectivity standard signal. |
+---------------+-----------------------------------------------------------------------------+
| Tones (1) | The reference waveform is a continuous signal comprising one or more tones. |
+---------------+-----------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdSignalType, int):
Specifies whether the reference waveform is a modulated signal or a combination of one or more sinusoidal signals. To
time-align the sinusoidal reference waveform to the acquired signal, set the DPD Signal Type attribute to **Tones**,
which switches the DPD measurement alignment algorithm.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdSignalType else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string, attributes.AttributeID.DPD_SIGNAL_TYPE.value, value
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_synchronization_method(self, selector_string):
r"""Gets the method used for synchronization of the acquired waveform with 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.
The default value is **Direct**.
+---------------------+--------------------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+=====================+==========================================================================================================================+
| Direct (1) | Synchronizes the acquired and reference waveforms assuming that sample rate is sufficient to prevent aliasing in |
| | intermediate operations. This method is recommended when measurement sampling rate is high. |
+---------------------+--------------------------------------------------------------------------------------------------------------------------+
| Alias Protected (2) | Synchronizes the acquired and |
| | reference waveforms while ascertaining that intermediate operations are not impacted by aliasing. This method is |
| | recommended for non-contiguous carriers separated by a large gap, and/or when measurement sampling rate is low. Refer |
| | to DPD concept help for more information. |
+---------------------+--------------------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdSynchronizationMethod):
Specifies the method used for synchronization of the acquired waveform with 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_i32(
updated_selector_string, attributes.AttributeID.DPD_SYNCHRONIZATION_METHOD.value
)
attr_val = enums.DpdSynchronizationMethod(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_synchronization_method(self, selector_string, value):
r"""Sets the method used for synchronization of the acquired waveform with 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.
The default value is **Direct**.
+---------------------+--------------------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+=====================+==========================================================================================================================+
| Direct (1) | Synchronizes the acquired and reference waveforms assuming that sample rate is sufficient to prevent aliasing in |
| | intermediate operations. This method is recommended when measurement sampling rate is high. |
+---------------------+--------------------------------------------------------------------------------------------------------------------------+
| Alias Protected (2) | Synchronizes the acquired and |
| | reference waveforms while ascertaining that intermediate operations are not impacted by aliasing. This method is |
| | recommended for non-contiguous carriers separated by a large gap, and/or when measurement sampling rate is low. Refer |
| | to DPD concept help for more information. |
+---------------------+--------------------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdSynchronizationMethod, int):
Specifies the method used for synchronization of the acquired waveform with the reference waveform.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdSynchronizationMethod else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_SYNCHRONIZATION_METHOD.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_auto_carrier_detection_enabled(self, selector_string):
r"""Gets if auto detection of carrier offset and carrier bandwidth is enabled.
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.
The default value is **True**.
+--------------+------------------------------------------------------------------+
| Name (Value) | Description |
+==============+==================================================================+
| False (0) | Disables auto detection of carrier offset and carrier bandwidth. |
+--------------+------------------------------------------------------------------+
| True (1) | Enables auto detection of carrier offset and carrier bandwidth. |
+--------------+------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdAutoCarrierDetectionEnabled):
Specifies if auto detection of carrier offset and carrier bandwidth is enabled.
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.DPD_AUTO_CARRIER_DETECTION_ENABLED.value,
)
attr_val = enums.DpdAutoCarrierDetectionEnabled(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_auto_carrier_detection_enabled(self, selector_string, value):
r"""Sets if auto detection of carrier offset and carrier bandwidth is enabled.
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.
The default value is **True**.
+--------------+------------------------------------------------------------------+
| Name (Value) | Description |
+==============+==================================================================+
| False (0) | Disables auto detection of carrier offset and carrier bandwidth. |
+--------------+------------------------------------------------------------------+
| True (1) | Enables auto detection of carrier offset and carrier bandwidth. |
+--------------+------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdAutoCarrierDetectionEnabled, int):
Specifies if auto detection of carrier offset and carrier bandwidth is enabled.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdAutoCarrierDetectionEnabled else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_AUTO_CARRIER_DETECTION_ENABLED.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_number_of_carriers(self, selector_string):
r"""Gets the number of carriers in the reference waveform when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_AUTO_CARRIER_DETECTION_ENABLED` attribute to **False**.
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.
The default value is 1.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (int):
Specifies the number of carriers in the reference waveform when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_AUTO_CARRIER_DETECTION_ENABLED` attribute to **False**.
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.DPD_NUMBER_OF_CARRIERS.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_number_of_carriers(self, selector_string, value):
r"""Sets the number of carriers in the reference waveform when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_AUTO_CARRIER_DETECTION_ENABLED` attribute to **False**.
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.
The default value is 1.
Args:
selector_string (string):
Pass an empty string.
value (int):
Specifies the number of carriers in the reference waveform when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_AUTO_CARRIER_DETECTION_ENABLED` attribute to **False**.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string, attributes.AttributeID.DPD_NUMBER_OF_CARRIERS.value, value
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_carrier_offset(self, selector_string):
r"""Gets the carrier offset when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_AUTO_CARRIER_DETECTION_ENABLED` attribute to **False**. This value
is expressed in Hz.
Use "carrier<*n*>" as the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ to configure or read this attribute.
The default value is 0.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Specifies the carrier offset when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_AUTO_CARRIER_DETECTION_ENABLED` attribute to **False**. 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.DPD_CARRIER_OFFSET.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_carrier_offset(self, selector_string, value):
r"""Sets the carrier offset when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_AUTO_CARRIER_DETECTION_ENABLED` attribute to **False**. This value
is expressed in Hz.
Use "carrier<*n*>" as the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ to configure or read this attribute.
The default value is 0.
Args:
selector_string (string):
Pass an empty string.
value (float):
Specifies the carrier offset when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_AUTO_CARRIER_DETECTION_ENABLED` attribute to **False**. This value
is expressed in Hz.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_f64(
updated_selector_string, attributes.AttributeID.DPD_CARRIER_OFFSET.value, value
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_carrier_bandwidth(self, selector_string):
r"""Gets the carrier bandwidth when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_AUTO_CARRIER_DETECTION_ENABLED` attribute to **False**. This value
is expressed in Hz.
Use "carrier<*n*>" as the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ to configure or read this attribute.
The default value is 20 MHz.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Specifies the carrier bandwidth when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_AUTO_CARRIER_DETECTION_ENABLED` attribute to **False**. 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.DPD_CARRIER_BANDWIDTH.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_carrier_bandwidth(self, selector_string, value):
r"""Sets the carrier bandwidth when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_AUTO_CARRIER_DETECTION_ENABLED` attribute to **False**. This value
is expressed in Hz.
Use "carrier<*n*>" as the `Selector String
<https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ to configure or read this attribute.
The default value is 20 MHz.
Args:
selector_string (string):
Pass an empty string.
value (float):
Specifies the carrier bandwidth when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_AUTO_CARRIER_DETECTION_ENABLED` attribute to **False**. This value
is expressed in Hz.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_f64(
updated_selector_string, attributes.AttributeID.DPD_CARRIER_BANDWIDTH.value, value
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_model(self, selector_string):
r"""Gets the DPD model used by the DPD measurement.
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.
The default value is **Lookup Table**.
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+===================================+==========================================================================================================================+
| Lookup Table (0) | This model computes the complex gain coefficients applied when performing digital predistortion to linearize systems |
| | with negligible memory effects. |
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Memory Polynomial (1) | This model computes the memory polynomial predistortion coefficients used to linearize systems with moderate memory |
| | effects. |
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Generalized Memory Polynomial (2) | This model computes the generalized memory polynomial predistortion coefficients used to linearize systems with |
| | significant memory effects. |
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Decomposed Vector Rotation (3) | This model computes the Decomposed Vector Rotation model predistortion coefficients used to linearize wideband systems |
| | with significant memory effects. |
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdModel):
Specifies the DPD model used by the DPD measurement.
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.DPD_MODEL.value
)
attr_val = enums.DpdModel(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_model(self, selector_string, value):
r"""Sets the DPD model used by the DPD measurement.
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.
The default value is **Lookup Table**.
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+===================================+==========================================================================================================================+
| Lookup Table (0) | This model computes the complex gain coefficients applied when performing digital predistortion to linearize systems |
| | with negligible memory effects. |
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Memory Polynomial (1) | This model computes the memory polynomial predistortion coefficients used to linearize systems with moderate memory |
| | effects. |
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Generalized Memory Polynomial (2) | This model computes the generalized memory polynomial predistortion coefficients used to linearize systems with |
| | significant memory effects. |
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Decomposed Vector Rotation (3) | This model computes the Decomposed Vector Rotation model predistortion coefficients used to linearize wideband systems |
| | with significant memory effects. |
+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdModel, int):
Specifies the DPD model used by the DPD measurement.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdModel else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string, attributes.AttributeID.DPD_MODEL.value, value
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_target_gain_type(self, selector_string):
r"""Gets the gain expected from the DUT after applying DPD on the input 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.
The default value is **Average Gain**.
+---------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+===========================+==========================================================================================================================+
| Average Gain (0) | The DPD polynomial or lookup table is computed by assuming that the linearized gain expected from the DUT after |
| | applying DPD on the input waveform is equal to the average power gain provided by the DUT without DPD. |
+---------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Linear Region Gain (1) | The DPD polynomial or lookup table is computed by assuming that the linearized gain expected from the DUT after |
| | applying DPD on the input waveform is equal to the gain provided by the DUT, without DPD, to the parts of the reference |
| | waveform that do not drive the DUT into non-linear gain-expansion or compression regions of its input-output |
| | characteristics. |
| | The measurement computes the linear region gain as the average gain experienced by the parts of the reference waveform |
| | that are below a threshold which is computed as shown in the following equation: |
| | Linear region threshold (dBm) = Max {-25, Min {reference waveform power} + 6, DUT Average Input Power -15} |
+---------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Peak Input Power Gain (2) | The DPD polynomial or lookup table is computed by assuming that the linearized gain expected from the DUT after |
| | applying DPD on the input waveform is equal to the average power gain provided by the DUT, without DPD, to all the |
| | samples of the reference waveform for which the magnitude is greater than the peak power in the reference waveform |
| | (dBm) - 0.5dB. |
+---------------------------+--------------------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdTargetGainType):
Specifies the gain expected from the DUT after applying DPD on the input 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_i32(
updated_selector_string, attributes.AttributeID.DPD_TARGET_GAIN_TYPE.value
)
attr_val = enums.DpdTargetGainType(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_target_gain_type(self, selector_string, value):
r"""Sets the gain expected from the DUT after applying DPD on the input 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.
The default value is **Average Gain**.
+---------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+===========================+==========================================================================================================================+
| Average Gain (0) | The DPD polynomial or lookup table is computed by assuming that the linearized gain expected from the DUT after |
| | applying DPD on the input waveform is equal to the average power gain provided by the DUT without DPD. |
+---------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Linear Region Gain (1) | The DPD polynomial or lookup table is computed by assuming that the linearized gain expected from the DUT after |
| | applying DPD on the input waveform is equal to the gain provided by the DUT, without DPD, to the parts of the reference |
| | waveform that do not drive the DUT into non-linear gain-expansion or compression regions of its input-output |
| | characteristics. |
| | The measurement computes the linear region gain as the average gain experienced by the parts of the reference waveform |
| | that are below a threshold which is computed as shown in the following equation: |
| | Linear region threshold (dBm) = Max {-25, Min {reference waveform power} + 6, DUT Average Input Power -15} |
+---------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Peak Input Power Gain (2) | The DPD polynomial or lookup table is computed by assuming that the linearized gain expected from the DUT after |
| | applying DPD on the input waveform is equal to the average power gain provided by the DUT, without DPD, to all the |
| | samples of the reference waveform for which the magnitude is greater than the peak power in the reference waveform |
| | (dBm) - 0.5dB. |
+---------------------------+--------------------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdTargetGainType, int):
Specifies the gain expected from the DUT after applying DPD on the input waveform.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdTargetGainType else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string, attributes.AttributeID.DPD_TARGET_GAIN_TYPE.value, value
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_lookup_table_type(self, selector_string):
r"""Gets the type of the DPD lookup table (LUT).
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.
The default value is **Log**.
+--------------+-------------------------------------------------+
| Name (Value) | Description |
+==============+=================================================+
| Log (0) | Input powers in the LUT are specified in dBm. |
+--------------+-------------------------------------------------+
| Linear (1) | Input powers in the LUT are specified in watts. |
+--------------+-------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdLookupTableType):
Specifies the type of the DPD lookup table (LUT).
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.DPD_LOOKUP_TABLE_TYPE.value
)
attr_val = enums.DpdLookupTableType(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_lookup_table_type(self, selector_string, value):
r"""Sets the type of the DPD lookup table (LUT).
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.
The default value is **Log**.
+--------------+-------------------------------------------------+
| Name (Value) | Description |
+==============+=================================================+
| Log (0) | Input powers in the LUT are specified in dBm. |
+--------------+-------------------------------------------------+
| Linear (1) | Input powers in the LUT are specified in watts. |
+--------------+-------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdLookupTableType, int):
Specifies the type of the DPD lookup table (LUT).
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdLookupTableType else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string, attributes.AttributeID.DPD_LOOKUP_TABLE_TYPE.value, value
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_lookup_table_am_to_am_curve_fit_order(self, selector_string):
r"""Gets the degree of the polynomial used to approximate the device under test AM-to-AM characteristic when you set
the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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.
The default value is 7.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (int):
Specifies the degree of the polynomial used to approximate the device under test AM-to-AM characteristic when you set
the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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.DPD_LOOKUP_TABLE_AM_TO_AM_CURVE_FIT_ORDER.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_lookup_table_am_to_am_curve_fit_order(self, selector_string, value):
r"""Sets the degree of the polynomial used to approximate the device under test AM-to-AM characteristic when you set
the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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.
The default value is 7.
Args:
selector_string (string):
Pass an empty string.
value (int):
Specifies the degree of the polynomial used to approximate the device under test AM-to-AM characteristic when you set
the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_LOOKUP_TABLE_AM_TO_AM_CURVE_FIT_ORDER.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_lookup_table_am_to_am_curve_fit_type(self, selector_string):
r"""Gets the polynomial approximation cost-function of the device under test AM-to-AM characteristic when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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.
The default value is **Least Absolute Residual**.
+-----------------------------+---------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+=============================+=========================================================================================================+
| Least Square (0) | Minimizes the energy of the polynomial approximation error. |
+-----------------------------+---------------------------------------------------------------------------------------------------------+
| Least Absolute Residual (1) | Minimizes the magnitude of the polynomial approximation error. |
+-----------------------------+---------------------------------------------------------------------------------------------------------+
| Bisquare (2) | Excludes the effect of data outliers while minimizing the energy of the polynomial approximation error. |
+-----------------------------+---------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdLookupTableAMToAMCurveFitType):
Specifies the polynomial approximation cost-function of the device under test AM-to-AM characteristic when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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.DPD_LOOKUP_TABLE_AM_TO_AM_CURVE_FIT_TYPE.value,
)
attr_val = enums.DpdLookupTableAMToAMCurveFitType(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_lookup_table_am_to_am_curve_fit_type(self, selector_string, value):
r"""Sets the polynomial approximation cost-function of the device under test AM-to-AM characteristic when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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.
The default value is **Least Absolute Residual**.
+-----------------------------+---------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+=============================+=========================================================================================================+
| Least Square (0) | Minimizes the energy of the polynomial approximation error. |
+-----------------------------+---------------------------------------------------------------------------------------------------------+
| Least Absolute Residual (1) | Minimizes the magnitude of the polynomial approximation error. |
+-----------------------------+---------------------------------------------------------------------------------------------------------+
| Bisquare (2) | Excludes the effect of data outliers while minimizing the energy of the polynomial approximation error. |
+-----------------------------+---------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdLookupTableAMToAMCurveFitType, int):
Specifies the polynomial approximation cost-function of the device under test AM-to-AM characteristic when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdLookupTableAMToAMCurveFitType else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_LOOKUP_TABLE_AM_TO_AM_CURVE_FIT_TYPE.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_lookup_table_am_to_pm_curve_fit_order(self, selector_string):
r"""Gets the degree of the polynomial used to approximate the device under test AM-to-PM characteristic when you set
the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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.
The default value is 7.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (int):
Specifies the degree of the polynomial used to approximate the device under test AM-to-PM characteristic when you set
the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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.DPD_LOOKUP_TABLE_AM_TO_PM_CURVE_FIT_ORDER.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_lookup_table_am_to_pm_curve_fit_order(self, selector_string, value):
r"""Sets the degree of the polynomial used to approximate the device under test AM-to-PM characteristic when you set
the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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.
The default value is 7.
Args:
selector_string (string):
Pass an empty string.
value (int):
Specifies the degree of the polynomial used to approximate the device under test AM-to-PM characteristic when you set
the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_LOOKUP_TABLE_AM_TO_PM_CURVE_FIT_ORDER.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_lookup_table_am_to_pm_curve_fit_type(self, selector_string):
r"""Gets the polynomial approximation cost-function of the device under test AM-to-PM characteristic when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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.
The default value is **Least Absolute Residual**.
+-----------------------------+---------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+=============================+=========================================================================================================+
| Least Square (0) | Minimizes the energy of the polynomial approximation error. |
+-----------------------------+---------------------------------------------------------------------------------------------------------+
| Least Absolute Residual (1) | Minimizes the magnitude of the polynomial approximation error. |
+-----------------------------+---------------------------------------------------------------------------------------------------------+
| Bisquare (2) | Excludes the effect of data outliers while minimizing the energy of the polynomial approximation error. |
+-----------------------------+---------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdLookupTableAMToPMCurveFitType):
Specifies the polynomial approximation cost-function of the device under test AM-to-PM characteristic when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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.DPD_LOOKUP_TABLE_AM_TO_PM_CURVE_FIT_TYPE.value,
)
attr_val = enums.DpdLookupTableAMToPMCurveFitType(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_lookup_table_am_to_pm_curve_fit_type(self, selector_string, value):
r"""Sets the polynomial approximation cost-function of the device under test AM-to-PM characteristic when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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.
The default value is **Least Absolute Residual**.
+-----------------------------+---------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+=============================+=========================================================================================================+
| Least Square (0) | Minimizes the energy of the polynomial approximation error. |
+-----------------------------+---------------------------------------------------------------------------------------------------------+
| Least Absolute Residual (1) | Minimizes the magnitude of the polynomial approximation error. |
+-----------------------------+---------------------------------------------------------------------------------------------------------+
| Bisquare (2) | Excludes the effect of data outliers while minimizing the energy of the polynomial approximation error. |
+-----------------------------+---------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdLookupTableAMToPMCurveFitType, int):
Specifies the polynomial approximation cost-function of the device under test AM-to-PM characteristic when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdLookupTableAMToPMCurveFitType else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_LOOKUP_TABLE_AM_TO_PM_CURVE_FIT_TYPE.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_lookup_table_threshold_enabled(self, selector_string):
r"""Gets whether to enable thresholding of the acquired samples to be used for the DPD measurement when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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.
The default value is **True**.
+--------------+--------------------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+==============+==========================================================================================================================+
| False (0) | All samples are considered for the DPD measurement. |
+--------------+--------------------------------------------------------------------------------------------------------------------------+
| True (1) | Only samples above the threshold level which you specify in the DPD LUT Threshold Level attribute are considered for |
| | the DPD measurement. |
+--------------+--------------------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdLookupTableThresholdEnabled):
Specifies whether to enable thresholding of the acquired samples to be used for the DPD measurement when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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.DPD_LOOKUP_TABLE_THRESHOLD_ENABLED.value,
)
attr_val = enums.DpdLookupTableThresholdEnabled(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_lookup_table_threshold_enabled(self, selector_string, value):
r"""Sets whether to enable thresholding of the acquired samples to be used for the DPD measurement when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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.
The default value is **True**.
+--------------+--------------------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+==============+==========================================================================================================================+
| False (0) | All samples are considered for the DPD measurement. |
+--------------+--------------------------------------------------------------------------------------------------------------------------+
| True (1) | Only samples above the threshold level which you specify in the DPD LUT Threshold Level attribute are considered for |
| | the DPD measurement. |
+--------------+--------------------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdLookupTableThresholdEnabled, int):
Specifies whether to enable thresholding of the acquired samples to be used for the DPD measurement when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdLookupTableThresholdEnabled else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_LOOKUP_TABLE_THRESHOLD_ENABLED.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_lookup_table_threshold_type(self, selector_string):
r"""Gets the reference for the power level used for thresholding.
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.
The default value is **Relative**.
+--------------+----------------------------------------------------------------------+
| Name (Value) | Description |
+==============+======================================================================+
| Relative (0) | The threshold is relative to the peak power of the acquired samples. |
+--------------+----------------------------------------------------------------------+
| Absolute (1) | The threshold is the absolute power, in dBm. |
+--------------+----------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdLookupTableThresholdType):
Specifies the reference for the power level used for thresholding.
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.DPD_LOOKUP_TABLE_THRESHOLD_TYPE.value,
)
attr_val = enums.DpdLookupTableThresholdType(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_lookup_table_threshold_type(self, selector_string, value):
r"""Sets the reference for the power level used for thresholding.
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.
The default value is **Relative**.
+--------------+----------------------------------------------------------------------+
| Name (Value) | Description |
+==============+======================================================================+
| Relative (0) | The threshold is relative to the peak power of the acquired samples. |
+--------------+----------------------------------------------------------------------+
| Absolute (1) | The threshold is the absolute power, in dBm. |
+--------------+----------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdLookupTableThresholdType, int):
Specifies the reference for the power level used for thresholding.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdLookupTableThresholdType else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_LOOKUP_TABLE_THRESHOLD_TYPE.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_lookup_table_threshold_level(self, selector_string):
r"""Gets either the relative or absolute threshold power level based on the value of the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_LOOKUP_TABLE_THRESHOLD_TYPE` attribute. This value is expressed in
dB or 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.
The default value is -20.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Specifies either the relative or absolute threshold power level based on the value of the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_LOOKUP_TABLE_THRESHOLD_TYPE` attribute. This value is expressed in
dB or 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.DPD_LOOKUP_TABLE_THRESHOLD_LEVEL.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_lookup_table_threshold_level(self, selector_string, value):
r"""Sets either the relative or absolute threshold power level based on the value of the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_LOOKUP_TABLE_THRESHOLD_TYPE` attribute. This value is expressed in
dB or 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.
The default value is -20.
Args:
selector_string (string):
Pass an empty string.
value (float):
Specifies either the relative or absolute threshold power level based on the value of the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_LOOKUP_TABLE_THRESHOLD_TYPE` attribute. This value is expressed in
dB or dBm.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_f64(
updated_selector_string,
attributes.AttributeID.DPD_LOOKUP_TABLE_THRESHOLD_LEVEL.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_lookup_table_threshold_definition(self, selector_string):
r"""Gets the definition to use for thresholding acquired and 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.
The default value is **Input**.
+----------------------+--------------------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+======================+==========================================================================================================================+
| Input AND Output (0) | Corresponding acquired and reference waveform samples are used for AMPM measurement when both samples are greater or |
| | equal to the threshold level. |
+----------------------+--------------------------------------------------------------------------------------------------------------------------+
| Input (1) | Corresponding acquired and reference waveform samples are used for AMPM measurement when reference waveform sample is |
| | greater than or equal to the threshold level. |
+----------------------+--------------------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdLookupTableThresholdDefinition):
Specifies the definition to use for thresholding acquired and 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_i32(
updated_selector_string,
attributes.AttributeID.DPD_LOOKUP_TABLE_THRESHOLD_DEFINITION.value,
)
attr_val = enums.DpdLookupTableThresholdDefinition(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_lookup_table_threshold_definition(self, selector_string, value):
r"""Sets the definition to use for thresholding acquired and 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.
The default value is **Input**.
+----------------------+--------------------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+======================+==========================================================================================================================+
| Input AND Output (0) | Corresponding acquired and reference waveform samples are used for AMPM measurement when both samples are greater or |
| | equal to the threshold level. |
+----------------------+--------------------------------------------------------------------------------------------------------------------------+
| Input (1) | Corresponding acquired and reference waveform samples are used for AMPM measurement when reference waveform sample is |
| | greater than or equal to the threshold level. |
+----------------------+--------------------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdLookupTableThresholdDefinition, int):
Specifies the definition to use for thresholding acquired and reference waveform.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdLookupTableThresholdDefinition else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_LOOKUP_TABLE_THRESHOLD_DEFINITION.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_lookup_table_step_size(self, selector_string):
r"""Gets the step size of the input power levels in the predistortion lookup table when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**. 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.
The default value is 0.1 dB.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Specifies the step size of the input power levels in the predistortion lookup table when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**. 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.DPD_LOOKUP_TABLE_STEP_SIZE.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_lookup_table_step_size(self, selector_string, value):
r"""Sets the step size of the input power levels in the predistortion lookup table when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**. 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.
The default value is 0.1 dB.
Args:
selector_string (string):
Pass an empty string.
value (float):
Specifies the step size of the input power levels in the predistortion lookup table when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Lookup Table**. This value is expressed in dB.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_f64(
updated_selector_string,
attributes.AttributeID.DPD_LOOKUP_TABLE_STEP_SIZE.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_memory_polynomial_order(self, selector_string):
r"""Gets the order of the DPD polynomial when you set the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL`
attribute to **Memory Polynomial** or **Generalized Memory Polynomial**. This order value corresponds to K\ :sub:`a`\
in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the generalized memory polynomial.
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.
The default value is 3.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (int):
Specifies the order of the DPD polynomial when you set the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL`
attribute to **Memory Polynomial** or **Generalized Memory Polynomial**. This order value corresponds to K\ :sub:`a`\
in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the generalized memory polynomial.
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.DPD_MEMORY_POLYNOMIAL_ORDER.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_memory_polynomial_order(self, selector_string, value):
r"""Sets the order of the DPD polynomial when you set the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL`
attribute to **Memory Polynomial** or **Generalized Memory Polynomial**. This order value corresponds to K\ :sub:`a`\
in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the generalized memory polynomial.
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.
The default value is 3.
Args:
selector_string (string):
Pass an empty string.
value (int):
Specifies the order of the DPD polynomial when you set the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL`
attribute to **Memory Polynomial** or **Generalized Memory Polynomial**. This order value corresponds to K\ :sub:`a`\
in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the generalized memory polynomial.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_MEMORY_POLYNOMIAL_ORDER.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_memory_polynomial_memory_depth(self, selector_string):
r"""Gets the memory depth of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Memory Polynomial** or **Generalized Memory
Polynomial**. This depth value corresponds to Q\ :sub:`a`\ in the `DPD
<www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the generalized memory polynomial.
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.
The default value is 0.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (int):
Specifies the memory depth of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Memory Polynomial** or **Generalized Memory
Polynomial**. This depth value corresponds to Q\ :sub:`a`\ in the `DPD
<www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the generalized memory polynomial.
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.DPD_MEMORY_POLYNOMIAL_MEMORY_DEPTH.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_memory_polynomial_memory_depth(self, selector_string, value):
r"""Sets the memory depth of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Memory Polynomial** or **Generalized Memory
Polynomial**. This depth value corresponds to Q\ :sub:`a`\ in the `DPD
<www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the generalized memory polynomial.
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.
The default value is 0.
Args:
selector_string (string):
Pass an empty string.
value (int):
Specifies the memory depth of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Memory Polynomial** or **Generalized Memory
Polynomial**. This depth value corresponds to Q\ :sub:`a`\ in the `DPD
<www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the generalized memory polynomial.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_MEMORY_POLYNOMIAL_MEMORY_DEPTH.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_memory_polynomial_order_type(self, selector_string):
r"""Configures the type of terms of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Memory Polynomial** or **Generalized Memory
Polynomial**.
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.
The default value is **All Orders**.
+----------------------+----------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+======================+================================================================================================================+
| All Orders (0) | The memory polynomial will compute all the terms for the given order. |
+----------------------+----------------------------------------------------------------------------------------------------------------+
| Odd Orders Only (1) | The memory polynomial will compute the non-zero coefficients only for the odd terms. |
+----------------------+----------------------------------------------------------------------------------------------------------------+
| Even Orders Only (2) | The memory polynomial will compute the non-zero coefficents only for the first linear term and all even terms. |
+----------------------+----------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdMemoryPolynomialOrderType):
Configures the type of terms of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Memory Polynomial** or **Generalized Memory
Polynomial**.
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.DPD_MEMORY_POLYNOMIAL_ORDER_TYPE.value,
)
attr_val = enums.DpdMemoryPolynomialOrderType(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_memory_polynomial_order_type(self, selector_string, value):
r"""Configures the type of terms of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Memory Polynomial** or **Generalized Memory
Polynomial**.
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.
The default value is **All Orders**.
+----------------------+----------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+======================+================================================================================================================+
| All Orders (0) | The memory polynomial will compute all the terms for the given order. |
+----------------------+----------------------------------------------------------------------------------------------------------------+
| Odd Orders Only (1) | The memory polynomial will compute the non-zero coefficients only for the odd terms. |
+----------------------+----------------------------------------------------------------------------------------------------------------+
| Even Orders Only (2) | The memory polynomial will compute the non-zero coefficents only for the first linear term and all even terms. |
+----------------------+----------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdMemoryPolynomialOrderType, int):
Configures the type of terms of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Memory Polynomial** or **Generalized Memory
Polynomial**.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdMemoryPolynomialOrderType else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_MEMORY_POLYNOMIAL_ORDER_TYPE.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_memory_polynomial_lead_order(self, selector_string):
r"""Gets the lead order cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *K\ :sub:`c*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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.
The default value is 0.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (int):
Specifies the lead order cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *K\ :sub:`c*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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.DPD_MEMORY_POLYNOMIAL_LEAD_ORDER.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_memory_polynomial_lead_order(self, selector_string, value):
r"""Sets the lead order cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *K\ :sub:`c*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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.
The default value is 0.
Args:
selector_string (string):
Pass an empty string.
value (int):
Specifies the lead order cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *K\ :sub:`c*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_MEMORY_POLYNOMIAL_LEAD_ORDER.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_memory_polynomial_lag_order(self, selector_string):
r"""Gets the lag order cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *K\ :sub:`b*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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.
The default value is 0.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (int):
Specifies the lag order cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *K\ :sub:`b*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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.DPD_MEMORY_POLYNOMIAL_LAG_ORDER.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_memory_polynomial_lag_order(self, selector_string, value):
r"""Sets the lag order cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *K\ :sub:`b*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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.
The default value is 0.
Args:
selector_string (string):
Pass an empty string.
value (int):
Specifies the lag order cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *K\ :sub:`b*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_MEMORY_POLYNOMIAL_LAG_ORDER.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_memory_polynomial_lead_memory_depth(self, selector_string):
r"""Gets the lead memory depth cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *Q\ :sub:`c*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial. The value of the DPD Mem Poly Lead Mem Depth attribute must be greater than or equal to
the value of the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MEMORY_POLYNOMIAL_MAXIMUM_LEAD` attribute.
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.
The default value is 0.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (int):
Specifies the lead memory depth cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *Q\ :sub:`c*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial. The value of the DPD Mem Poly Lead Mem Depth attribute must be greater than or equal to
the value of the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MEMORY_POLYNOMIAL_MAXIMUM_LEAD` attribute.
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.DPD_MEMORY_POLYNOMIAL_LEAD_MEMORY_DEPTH.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_memory_polynomial_lead_memory_depth(self, selector_string, value):
r"""Sets the lead memory depth cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *Q\ :sub:`c*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial. The value of the DPD Mem Poly Lead Mem Depth attribute must be greater than or equal to
the value of the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MEMORY_POLYNOMIAL_MAXIMUM_LEAD` attribute.
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.
The default value is 0.
Args:
selector_string (string):
Pass an empty string.
value (int):
Specifies the lead memory depth cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *Q\ :sub:`c*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial. The value of the DPD Mem Poly Lead Mem Depth attribute must be greater than or equal to
the value of the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MEMORY_POLYNOMIAL_MAXIMUM_LEAD` attribute.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_MEMORY_POLYNOMIAL_LEAD_MEMORY_DEPTH.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_memory_polynomial_lag_memory_depth(self, selector_string):
r"""Gets the lag memory depth cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *Q\ :sub:`b*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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.
The default value is 0.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (int):
Specifies the lag memory depth cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *Q\ :sub:`b*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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.DPD_MEMORY_POLYNOMIAL_LAG_MEMORY_DEPTH.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_memory_polynomial_lag_memory_depth(self, selector_string, value):
r"""Sets the lag memory depth cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *Q\ :sub:`b*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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.
The default value is 0.
Args:
selector_string (string):
Pass an empty string.
value (int):
Specifies the lag memory depth cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *Q\ :sub:`b*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_MEMORY_POLYNOMIAL_LAG_MEMORY_DEPTH.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_memory_polynomial_maximum_lead(self, selector_string):
r"""Gets the maximum lead stagger cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *M\ :sub:`c*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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.
The default value is 0.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (int):
Specifies the maximum lead stagger cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *M\ :sub:`c*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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.DPD_MEMORY_POLYNOMIAL_MAXIMUM_LEAD.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_memory_polynomial_maximum_lead(self, selector_string, value):
r"""Sets the maximum lead stagger cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *M\ :sub:`c*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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.
The default value is 0.
Args:
selector_string (string):
Pass an empty string.
value (int):
Specifies the maximum lead stagger cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *M\ :sub:`c*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_MEMORY_POLYNOMIAL_MAXIMUM_LEAD.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_memory_polynomial_maximum_lag(self, selector_string):
r"""Gets the maximum lag stagger cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *M\ :sub:`b*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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.
The default value is 0.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (int):
Specifies the maximum lag stagger cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *M\ :sub:`b*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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.DPD_MEMORY_POLYNOMIAL_MAXIMUM_LAG.value,
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_memory_polynomial_maximum_lag(self, selector_string, value):
r"""Sets the maximum lag stagger cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *M\ :sub:`b*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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.
The default value is 0.
Args:
selector_string (string):
Pass an empty string.
value (int):
Specifies the maximum lag stagger cross term of the DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**. This term
value corresponds to *M\ :sub:`b*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
generalized memory polynomial.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_MEMORY_POLYNOMIAL_MAXIMUM_LAG.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_memory_polynomial_lead_order_type(self, selector_string):
r"""Configures the type of terms of the lead order DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**.
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.
The default value is **All Orders**.
+----------------------+--------------------------------------------------------------------------------------+
| Name (Value) | Description |
+======================+======================================================================================+
| All Orders (0) | The memory polynomial will compute all the terms for the given order. |
+----------------------+--------------------------------------------------------------------------------------+
| Odd Orders Only (1) | The memory polynomial will compute the non-zero coefficients only for the odd terms. |
+----------------------+--------------------------------------------------------------------------------------+
| Even Orders Only (2) | The memory polynomial will compute the non-zero coefficents only for the even terms. |
+----------------------+--------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdMemoryPolynomialLeadOrderType):
Configures the type of terms of the lead order DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**.
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.DPD_MEMORY_POLYNOMIAL_LEAD_ORDER_TYPE.value,
)
attr_val = enums.DpdMemoryPolynomialLeadOrderType(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_memory_polynomial_lead_order_type(self, selector_string, value):
r"""Configures the type of terms of the lead order DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**.
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.
The default value is **All Orders**.
+----------------------+--------------------------------------------------------------------------------------+
| Name (Value) | Description |
+======================+======================================================================================+
| All Orders (0) | The memory polynomial will compute all the terms for the given order. |
+----------------------+--------------------------------------------------------------------------------------+
| Odd Orders Only (1) | The memory polynomial will compute the non-zero coefficients only for the odd terms. |
+----------------------+--------------------------------------------------------------------------------------+
| Even Orders Only (2) | The memory polynomial will compute the non-zero coefficents only for the even terms. |
+----------------------+--------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdMemoryPolynomialLeadOrderType, int):
Configures the type of terms of the lead order DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdMemoryPolynomialLeadOrderType else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_MEMORY_POLYNOMIAL_LEAD_ORDER_TYPE.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_memory_polynomial_lag_order_type(self, selector_string):
r"""Configures the type of terms of the lag order DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**.
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.
The default value is **All Orders**.
+----------------------+--------------------------------------------------------------------------------------+
| Name (Value) | Description |
+======================+======================================================================================+
| All Orders (0) | The memory polynomial will compute all the terms for the given order. |
+----------------------+--------------------------------------------------------------------------------------+
| Odd Orders Only (1) | The memory polynomial will compute the non-zero coefficients only for the odd terms. |
+----------------------+--------------------------------------------------------------------------------------+
| Even Orders Only (2) | The memory polynomial will compute the non-zero coefficents only for the even terms. |
+----------------------+--------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdMemoryPolynomialLagOrderType):
Configures the type of terms of the lag order DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**.
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.DPD_MEMORY_POLYNOMIAL_LAG_ORDER_TYPE.value,
)
attr_val = enums.DpdMemoryPolynomialLagOrderType(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_memory_polynomial_lag_order_type(self, selector_string, value):
r"""Configures the type of terms of the lag order DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**.
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.
The default value is **All Orders**.
+----------------------+--------------------------------------------------------------------------------------+
| Name (Value) | Description |
+======================+======================================================================================+
| All Orders (0) | The memory polynomial will compute all the terms for the given order. |
+----------------------+--------------------------------------------------------------------------------------+
| Odd Orders Only (1) | The memory polynomial will compute the non-zero coefficients only for the odd terms. |
+----------------------+--------------------------------------------------------------------------------------+
| Even Orders Only (2) | The memory polynomial will compute the non-zero coefficents only for the even terms. |
+----------------------+--------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdMemoryPolynomialLagOrderType, int):
Configures the type of terms of the lag order DPD polynomial when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Generalized Memory Polynomial**.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdMemoryPolynomialLagOrderType else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_MEMORY_POLYNOMIAL_LAG_ORDER_TYPE.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_dvr_number_of_segments(self, selector_string):
r"""Gets the number of segments of the Decomposed Vector Rotation model when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Decomposed Vector Rotation**. This value
corresponds to *K* in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the Decomposed Vector
Rotation model.
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.
The default value is 4. This value must be greater than or equal to 1.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (int):
Specifies the number of segments of the Decomposed Vector Rotation model when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Decomposed Vector Rotation**. This value
corresponds to *K* in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the Decomposed Vector
Rotation model.
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.DPD_DVR_NUMBER_OF_SEGMENTS.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_dvr_number_of_segments(self, selector_string, value):
r"""Sets the number of segments of the Decomposed Vector Rotation model when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Decomposed Vector Rotation**. This value
corresponds to *K* in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the Decomposed Vector
Rotation model.
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.
The default value is 4. This value must be greater than or equal to 1.
Args:
selector_string (string):
Pass an empty string.
value (int):
Specifies the number of segments of the Decomposed Vector Rotation model when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Decomposed Vector Rotation**. This value
corresponds to *K* in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the Decomposed Vector
Rotation model.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_DVR_NUMBER_OF_SEGMENTS.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_dvr_linear_memory_depth(self, selector_string):
r"""Gets the linear memory depth of the Decomposed Vector Rotation model when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Decomposed Vector Rotation**. This value
corresponds to *M\ :sub:`l*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the decomposed
vector rotation model.
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.
The default value is 21. This value must be greater than or equal to 0.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (int):
Specifies the linear memory depth of the Decomposed Vector Rotation model when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Decomposed Vector Rotation**. This value
corresponds to *M\ :sub:`l*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the decomposed
vector rotation model.
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.DPD_DVR_LINEAR_MEMORY_DEPTH.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_dvr_linear_memory_depth(self, selector_string, value):
r"""Sets the linear memory depth of the Decomposed Vector Rotation model when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Decomposed Vector Rotation**. This value
corresponds to *M\ :sub:`l*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the decomposed
vector rotation model.
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.
The default value is 21. This value must be greater than or equal to 0.
Args:
selector_string (string):
Pass an empty string.
value (int):
Specifies the linear memory depth of the Decomposed Vector Rotation model when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Decomposed Vector Rotation**. This value
corresponds to *M\ :sub:`l*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the decomposed
vector rotation model.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_DVR_LINEAR_MEMORY_DEPTH.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_dvr_nonlinear_memory_depth(self, selector_string):
r"""Gets the nonlinear memory depth of the Decomposed Vector Rotation model when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Decomposed Vector Rotation**. This value
corresponds to *M\ :sub:`nl*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
decomposed vector rotation model.
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.
The default value is 2. This value must be greater than or equal to 1.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (int):
Specifies the nonlinear memory depth of the Decomposed Vector Rotation model when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Decomposed Vector Rotation**. This value
corresponds to *M\ :sub:`nl*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
decomposed vector rotation model.
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.DPD_DVR_NONLINEAR_MEMORY_DEPTH.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_dvr_nonlinear_memory_depth(self, selector_string, value):
r"""Sets the nonlinear memory depth of the Decomposed Vector Rotation model when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Decomposed Vector Rotation**. This value
corresponds to *M\ :sub:`nl*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
decomposed vector rotation model.
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.
The default value is 2. This value must be greater than or equal to 1.
Args:
selector_string (string):
Pass an empty string.
value (int):
Specifies the nonlinear memory depth of the Decomposed Vector Rotation model when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Decomposed Vector Rotation**. This value
corresponds to *M\ :sub:`nl*`\ in the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for the
decomposed vector rotation model.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_DVR_NONLINEAR_MEMORY_DEPTH.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_dvr_ddr_enabled(self, selector_string):
r"""Gets whether to enable the Dynamic Deviation Reduction (DDR) terms which are a subset of Decomposed Vector
Rotation Model when you set the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Decomposed
Vector Rotation**. For more details, refer to the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for
the decomposed vector rotation model.
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.
The default value is **True**.
+--------------+------------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+==============+==================================================================================================================+
| False (0) | The Dynamic Deviation Reduction (DDR) terms which are a subset of Decomposed Vector Rotation model are disabled. |
+--------------+------------------------------------------------------------------------------------------------------------------+
| True (1) | The Dynamic Deviation Reduction (DDR) terms which are a subset of Decomposed Vector Rotation model are enabled. |
+--------------+------------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdDvrDdrEnabled):
Specifies whether to enable the Dynamic Deviation Reduction (DDR) terms which are a subset of Decomposed Vector
Rotation Model when you set the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Decomposed
Vector Rotation**. For more details, refer to the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for
the decomposed vector rotation model.
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.DPD_DVR_DDR_ENABLED.value
)
attr_val = enums.DpdDvrDdrEnabled(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_dvr_ddr_enabled(self, selector_string, value):
r"""Sets whether to enable the Dynamic Deviation Reduction (DDR) terms which are a subset of Decomposed Vector
Rotation Model when you set the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Decomposed
Vector Rotation**. For more details, refer to the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for
the decomposed vector rotation model.
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.
The default value is **True**.
+--------------+------------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+==============+==================================================================================================================+
| False (0) | The Dynamic Deviation Reduction (DDR) terms which are a subset of Decomposed Vector Rotation model are disabled. |
+--------------+------------------------------------------------------------------------------------------------------------------+
| True (1) | The Dynamic Deviation Reduction (DDR) terms which are a subset of Decomposed Vector Rotation model are enabled. |
+--------------+------------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdDvrDdrEnabled, int):
Specifies whether to enable the Dynamic Deviation Reduction (DDR) terms which are a subset of Decomposed Vector
Rotation Model when you set the :py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_MODEL` attribute to **Decomposed
Vector Rotation**. For more details, refer to the `DPD <www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_ for
the decomposed vector rotation model.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdDvrDdrEnabled else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string, attributes.AttributeID.DPD_DVR_DDR_ENABLED.value, value
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_measurement_mode(self, selector_string):
r"""Gets if the training waveform required for the extraction of the DPD model coefficients is acquired from the
hardware or is configured by the user.
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.
The default value is **Acquire and Extract**.
+-------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+=========================+==========================================================================================================================+
| Acquire and Extract (0) | The measurement acquires the training waveform required for the extraction of the DPD model coefficients from the |
| | hardware and then computes the model coefficients. |
+-------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Extract Only (1) | The measurement uses the user configured training waveform required for the extraction of the DPD model coefficients. |
+-------------------------+--------------------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdMeasurementMode):
Specifies if the training waveform required for the extraction of the DPD model coefficients is acquired from the
hardware or is configured by the user.
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.DPD_MEASUREMENT_MODE.value
)
attr_val = enums.DpdMeasurementMode(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_measurement_mode(self, selector_string, value):
r"""Sets if the training waveform required for the extraction of the DPD model coefficients is acquired from the
hardware or is configured by the user.
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.
The default value is **Acquire and Extract**.
+-------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+=========================+==========================================================================================================================+
| Acquire and Extract (0) | The measurement acquires the training waveform required for the extraction of the DPD model coefficients from the |
| | hardware and then computes the model coefficients. |
+-------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Extract Only (1) | The measurement uses the user configured training waveform required for the extraction of the DPD model coefficients. |
+-------------------------+--------------------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdMeasurementMode, int):
Specifies if the training waveform required for the extraction of the DPD model coefficients is acquired from the
hardware or is configured by the user.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdMeasurementMode else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string, attributes.AttributeID.DPD_MEASUREMENT_MODE.value, value
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_iterative_dpd_enabled(self, selector_string):
r"""Gets whether to enable iterative computation of the DPD Results DPD Polynomial using `DPD
<www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_.
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.
The default value is **False**.
+--------------+----------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+==============+================================================================================================================+
| False (0) | RFmx computes the DPD Results DPD Polynomial without considering the value of the DPD Previous DPD Polynomial. |
+--------------+----------------------------------------------------------------------------------------------------------------+
| True (1) | RFmx computes the DPD Results DPD Polynomial based on the value of the DPD Previous DPD Polynomial. |
+--------------+----------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdIterativeDpdEnabled):
Specifies whether to enable iterative computation of the DPD Results DPD Polynomial using `DPD
<www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_.
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.DPD_ITERATIVE_DPD_ENABLED.value
)
attr_val = enums.DpdIterativeDpdEnabled(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_iterative_dpd_enabled(self, selector_string, value):
r"""Sets whether to enable iterative computation of the DPD Results DPD Polynomial using `DPD
<www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_.
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.
The default value is **False**.
+--------------+----------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+==============+================================================================================================================+
| False (0) | RFmx computes the DPD Results DPD Polynomial without considering the value of the DPD Previous DPD Polynomial. |
+--------------+----------------------------------------------------------------------------------------------------------------+
| True (1) | RFmx computes the DPD Results DPD Polynomial based on the value of the DPD Previous DPD Polynomial. |
+--------------+----------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdIterativeDpdEnabled, int):
Specifies whether to enable iterative computation of the DPD Results DPD Polynomial using `DPD
<www.ni.com/docs/en-US/bundle/rfmx-specan/page/dpd.html>`_.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdIterativeDpdEnabled else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_ITERATIVE_DPD_ENABLED.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_frequency_offset_correction_enabled(self, selector_string):
r"""Gets whether to enable frequency offset correction for the DPD measurement.
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.
The default value is **True**.
+--------------+--------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+==============+==============================================================================================================+
| False (0) | The measurement computes and corrects any frequency offset between the reference and the acquired waveforms. |
+--------------+--------------------------------------------------------------------------------------------------------------+
| True (1) | The measurement does not perform frequency offset correction. |
+--------------+--------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdFrequencyOffsetCorrectionEnabled):
Specifies whether to enable frequency offset correction for the DPD measurement.
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.DPD_FREQUENCY_OFFSET_CORRECTION_ENABLED.value,
)
attr_val = enums.DpdFrequencyOffsetCorrectionEnabled(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_frequency_offset_correction_enabled(self, selector_string, value):
r"""Sets whether to enable frequency offset correction for the DPD measurement.
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.
The default value is **True**.
+--------------+--------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+==============+==============================================================================================================+
| False (0) | The measurement computes and corrects any frequency offset between the reference and the acquired waveforms. |
+--------------+--------------------------------------------------------------------------------------------------------------+
| True (1) | The measurement does not perform frequency offset correction. |
+--------------+--------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdFrequencyOffsetCorrectionEnabled, int):
Specifies whether to enable frequency offset correction for the DPD measurement.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = (
value.value if type(value) is enums.DpdFrequencyOffsetCorrectionEnabled else value
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_FREQUENCY_OFFSET_CORRECTION_ENABLED.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_iq_origin_offset_correction_enabled(self, selector_string):
r"""Enables the IQ origin offset correction for the measurement.
When you set this attribute to **True**, the measurement computes and corrects any origin offset between the
reference and the acquired waveforms. When you set this attribute to **False**, origin offset correction is not
performed.
The default value is **True**.
+--------------+---------------------------------------+
| Name (Value) | Description |
+==============+=======================================+
| False (0) | Disables IQ origin offset correction. |
+--------------+---------------------------------------+
| True (1) | Enables IQ origin offset correction. |
+--------------+---------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdIQOriginOffsetCorrectionEnabled):
Enables the IQ origin offset correction for the measurement.
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.DPD_IQ_ORIGIN_OFFSET_CORRECTION_ENABLED.value,
)
attr_val = enums.DpdIQOriginOffsetCorrectionEnabled(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_iq_origin_offset_correction_enabled(self, selector_string, value):
r"""Enables the IQ origin offset correction for the measurement.
When you set this attribute to **True**, the measurement computes and corrects any origin offset between the
reference and the acquired waveforms. When you set this attribute to **False**, origin offset correction is not
performed.
The default value is **True**.
+--------------+---------------------------------------+
| Name (Value) | Description |
+==============+=======================================+
| False (0) | Disables IQ origin offset correction. |
+--------------+---------------------------------------+
| True (1) | Enables IQ origin offset correction. |
+--------------+---------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdIQOriginOffsetCorrectionEnabled, int):
Enables the IQ origin offset correction for the measurement.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = (
value.value if type(value) is enums.DpdIQOriginOffsetCorrectionEnabled else value
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_IQ_ORIGIN_OFFSET_CORRECTION_ENABLED.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_averaging_enabled(self, selector_string):
r"""Gets whether to enable averaging for the DPD measurement.
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.
The default value is **False**.
+--------------+--------------------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+==============+==========================================================================================================================+
| False (0) | The measurement is performed on a single acquisition. |
+--------------+--------------------------------------------------------------------------------------------------------------------------+
| True (1) | The DPD measurement uses the DPD Averaging Count attribute as the number of acquisitions over which the signal for the |
| | DPD measurement is averaged. |
+--------------+--------------------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdAveragingEnabled):
Specifies whether to enable averaging for the DPD measurement.
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.DPD_AVERAGING_ENABLED.value
)
attr_val = enums.DpdAveragingEnabled(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_averaging_enabled(self, selector_string, value):
r"""Sets whether to enable averaging for the DPD measurement.
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.
The default value is **False**.
+--------------+--------------------------------------------------------------------------------------------------------------------------+
| Name (Value) | Description |
+==============+==========================================================================================================================+
| False (0) | The measurement is performed on a single acquisition. |
+--------------+--------------------------------------------------------------------------------------------------------------------------+
| True (1) | The DPD measurement uses the DPD Averaging Count attribute as the number of acquisitions over which the signal for the |
| | DPD measurement is averaged. |
+--------------+--------------------------------------------------------------------------------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdAveragingEnabled, int):
Specifies whether to enable averaging for the DPD measurement.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdAveragingEnabled else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string, attributes.AttributeID.DPD_AVERAGING_ENABLED.value, value
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_averaging_count(self, selector_string):
r"""Gets the number of acquisitions used for averaging when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_AVERAGING_ENABLED` attribute to **True**.
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.
The default value is 10.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (int):
Specifies the number of acquisitions used for averaging when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_AVERAGING_ENABLED` attribute to **True**.
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.DPD_AVERAGING_COUNT.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_averaging_count(self, selector_string, value):
r"""Sets the number of acquisitions used for averaging when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_AVERAGING_ENABLED` attribute to **True**.
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.
The default value is 10.
Args:
selector_string (string):
Pass an empty string.
value (int):
Specifies the number of acquisitions used for averaging when you set the
:py:attr:`~nirfmxspecan.attributes.AttributeID.DPD_AVERAGING_ENABLED` attribute to **True**.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string, attributes.AttributeID.DPD_AVERAGING_COUNT.value, value
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_maximum_timing_error(self, selector_string):
r"""Gets the maximum time alignment error expected between the acquired and the reference waveforms. This value is
expressed in seconds.
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.
The default value is 0.00002.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (float):
Specifies the maximum time alignment error expected between the acquired and the reference waveforms. This value is
expressed in seconds.
error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
"""
try:
self._session_function_lock.enter_read_lock()
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.DPD_MAXIMUM_TIMING_ERROR.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_maximum_timing_error(self, selector_string, value):
r"""Sets the maximum time alignment error expected between the acquired and the reference waveforms. This value is
expressed in seconds.
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.
The default value is 0.00002.
Args:
selector_string (string):
Pass an empty string.
value (float):
Specifies the maximum time alignment error expected between the acquired and the reference waveforms. This value is
expressed in seconds.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_f64(
updated_selector_string,
attributes.AttributeID.DPD_MAXIMUM_TIMING_ERROR.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_nmse_enabled(self, selector_string):
r"""Gets whether to enable the normalized mean-squared error (NMSE) computation.
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.
The default value is **False**.
+--------------+-----------------------------------------------------+
| Name (Value) | Description |
+==============+=====================================================+
| False (0) | Disables NMSE computation. NaN is returned as NMSE. |
+--------------+-----------------------------------------------------+
| True (1) | Enables NMSE computation. |
+--------------+-----------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (enums.DpdNmseEnabled):
Specifies whether to enable the normalized mean-squared error (NMSE) computation.
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.DPD_NMSE_ENABLED.value
)
attr_val = enums.DpdNmseEnabled(attr_val)
except (KeyError, ValueError):
raise errors.DriverTooNewError() # type: ignore
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_nmse_enabled(self, selector_string, value):
r"""Sets whether to enable the normalized mean-squared error (NMSE) computation.
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.
The default value is **False**.
+--------------+-----------------------------------------------------+
| Name (Value) | Description |
+==============+=====================================================+
| False (0) | Disables NMSE computation. NaN is returned as NMSE. |
+--------------+-----------------------------------------------------+
| True (1) | Enables NMSE computation. |
+--------------+-----------------------------------------------------+
Args:
selector_string (string):
Pass an empty string.
value (enums.DpdNmseEnabled, int):
Specifies whether to enable the normalized mean-squared error (NMSE) computation.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
value = value.value if type(value) is enums.DpdNmseEnabled else value
error_code = self._interpreter.set_attribute_i32(
updated_selector_string, attributes.AttributeID.DPD_NMSE_ENABLED.value, value
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_all_traces_enabled(self, selector_string):
r"""Gets whether to enable the traces to be stored and retrieved after performing the DPD measurement.
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.
The default value is FALSE.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (bool):
Specifies whether to enable the traces to be stored and retrieved after performing the DPD measurement.
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.DPD_ALL_TRACES_ENABLED.value
)
attr_val = bool(attr_val)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_all_traces_enabled(self, selector_string, value):
r"""Sets whether to enable the traces to be stored and retrieved after performing the DPD measurement.
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.
The default value is FALSE.
Args:
selector_string (string):
Pass an empty string.
value (bool):
Specifies whether to enable the traces to be stored and retrieved after performing the DPD measurement.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_ALL_TRACES_ENABLED.value,
int(value),
)
finally:
self._session_function_lock.exit_read_lock()
return error_code
[docs]
@_raise_if_disposed
def get_number_of_analysis_threads(self, selector_string):
r"""Gets the maximum number of threads used for parallelism of the DPD measurement.
The number of threads can range from 1 to the number of physical cores. However, the number of threads you set
may not all be used in calculations. The actual number of threads used depends on the problem size, system resources,
data availability, and other considerations.
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.
The default value is 1.
Args:
selector_string (string):
Pass an empty string.
Returns:
Tuple (attr_val, error_code):
attr_val (int):
Specifies the maximum number of threads used for parallelism of the DPD measurement.
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.DPD_NUMBER_OF_ANALYSIS_THREADS.value
)
finally:
self._session_function_lock.exit_read_lock()
return attr_val, error_code
[docs]
@_raise_if_disposed
def set_number_of_analysis_threads(self, selector_string, value):
r"""Sets the maximum number of threads used for parallelism of the DPD measurement.
The number of threads can range from 1 to the number of physical cores. However, the number of threads you set
may not all be used in calculations. The actual number of threads used depends on the problem size, system resources,
data availability, and other considerations.
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.
The default value is 1.
Args:
selector_string (string):
Pass an empty string.
value (int):
Specifies the maximum number of threads used for parallelism of the DPD measurement.
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()
updated_selector_string = _helper.validate_and_update_selector_string(
selector_string, self._signal_obj
)
error_code = self._interpreter.set_attribute_i32(
updated_selector_string,
attributes.AttributeID.DPD_NUMBER_OF_ANALYSIS_THREADS.value,
value,
)
finally:
self._session_function_lock.exit_read_lock()
return error_code