Source code for nirfmxtdscdma.pvt_results

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

import functools

import nirfmxtdscdma.attributes as attributes
import nirfmxtdscdma.enums as enums
import nirfmxtdscdma.errors as errors
import nirfmxtdscdma.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 Tdscdma signal configuration")
        return f(*xs, **kws)

    return aux


[docs] class PvtResults(object): """Provides methods to fetch and read the Pvt measurement results.""" def __init__(self, signal_obj): """Provides methods to fetch and read the Pvt measurement results.""" self._signal_obj = signal_obj self._session_function_lock = signal_obj._session_function_lock self._interpreter = signal_obj._interpreter
[docs] @_raise_if_disposed def get_measurement_status(self, selector_string): r"""Gets the overall status of the power versus time (PVT) measurement. You do not need to use a selector string to read this result for the default signal and result instances. 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. +--------------+--------------------------------------------------------------------------------------------------------------------+ | Name (Value) | Description | +==============+====================================================================================================================+ | Fail (0) | Indicates that the test has failed, and the measured power in at least one measurement segment violates the limit. | +--------------+--------------------------------------------------------------------------------------------------------------------+ | Pass (1) | Indicates that the test has passed and the measured power in all defined segments does not violate the limits. | +--------------+--------------------------------------------------------------------------------------------------------------------+ Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (enums.PvtMeasurementStatus): Returns the overall status of the power versus time (PVT) 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.PVT_RESULTS_MEASUREMENT_STATUS.value ) attr_val = enums.PvtMeasurementStatus(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 get_mean_absolute_on_power(self, selector_string): r"""Gets the mean ON power of the measured burst, or the averaged bursts. This value is expressed in dBm. You do not need to use a selector string to read this result for the default signal and result instances. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the mean ON power of the measured burst, or the averaged bursts. This value is expressed in dBm. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.PVT_RESULTS_MEAN_ABSOLUTE_ON_POWER.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_mean_absolute_off_power(self, selector_string): r"""Gets the mean OFF power of the measured burst, or the averaged bursts. This value is expressed in dBm. You do not need to use a selector string to read this result for the default signal and result instances. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the mean OFF power of the measured burst, or the averaged bursts. This value is expressed in dBm. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.PVT_RESULTS_MEAN_ABSOLUTE_OFF_POWER.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_maximum_absolute_power(self, selector_string): r"""Gets the maximum power of the measured burst, or the averaged bursts. This value is expressed in dBm. You do not need to use a selector string to read this result for the default signal and result instances. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the maximum power of the measured burst, or the averaged bursts. This value is expressed in dBm. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.PVT_RESULTS_MAXIMUM_ABSOLUTE_POWER.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_minimum_absolute_power(self, selector_string): r"""Gets the minimum observed power of the measured burst, or the averaged bursts. This value is expressed in dBm. You do not need to use a selector string to read this result for the default signal and result instances. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the minimum observed power of the measured burst, or the averaged bursts. This value is expressed in dBm. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.PVT_RESULTS_MINIMUM_ABSOLUTE_POWER.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_burst_width(self, selector_string): r"""Gets the time interval between the time positions where the signal amplitude has reached 90 percent of the full amplitude. This value is expressed in seconds. You do not need to use a selector string to read this result for the default signal and result instances. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the time interval between the time positions where the signal amplitude has reached 90 percent of the full amplitude. 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.PVT_RESULTS_BURST_WIDTH.value ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_segment_status(self, selector_string): r"""Gets the measurement status for an individual power versus time (PVT) measurement segment. Use "segment<*n*>" as the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ to read this result. +--------------+-------------------------------------------------------------------------------------------------------------------+ | Name (Value) | Description | +==============+===================================================================================================================+ | Fail (0) | Indicates that the test has failed and the measured power in at least one measurement segment violates the limit. | +--------------+-------------------------------------------------------------------------------------------------------------------+ | Pass (1) | Indicates that the test has passed and the measured power in all defined segments does not violate the limits. | +--------------+-------------------------------------------------------------------------------------------------------------------+ Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (enums.PvtSegmentStatus): Returns the measurement status for an individual power versus time (PVT) measurement segment. 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.PVT_RESULTS_SEGMENT_STATUS.value ) attr_val = enums.PvtSegmentStatus(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 get_segment_margin(self, selector_string): r"""Gets the power margin for an individual power versus time (PVT) measurement segment, which is the minimum power distance to the power limit measured within the PVT measurement segment. This value is expressed in dB. Use "segment<*n*>" as the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ to read this result. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the power margin for an individual power versus time (PVT) measurement segment, which is the minimum power distance to the power limit measured within the PVT measurement segment. 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.PVT_RESULTS_SEGMENT_MARGIN.value ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_segment_margin_time(self, selector_string): r"""Gets the position in time corresponding to the :py:attr:`~nirfmxtdscdma.attributes.AttributeID.PVT_RESULTS_SEGMENT_MARGIN` attribute. This value is expressed in seconds. Use "segment<*n*>" as the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ to read this result. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the position in time corresponding to the :py:attr:`~nirfmxtdscdma.attributes.AttributeID.PVT_RESULTS_SEGMENT_MARGIN` attribute. 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.PVT_RESULTS_SEGMENT_MARGIN_TIME.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_segment_mean_absolute_power(self, selector_string): r"""Gets the mean measured power corresponding to the :py:attr:`~nirfmxtdscdma.attributes.AttributeID.PVT_RESULTS_SEGMENT_MARGIN` attribute. This value is expressed in dBm. Use "segment<*n*>" as the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ to read this result. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the mean measured power corresponding to the :py:attr:`~nirfmxtdscdma.attributes.AttributeID.PVT_RESULTS_SEGMENT_MARGIN` attribute. This value is expressed in dBm. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.PVT_RESULTS_SEGMENT_MEAN_ABSOLUTE_POWER.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_segment_maximum_absolute_power(self, selector_string): r"""Gets the maximum measured power of an individual power versus time (PVT) measurement segment. This value is expressed in dBm. Use "segment<*n*>" as the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ to read this result. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the maximum measured power of an individual power versus time (PVT) measurement segment. This value is expressed in dBm. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.PVT_RESULTS_SEGMENT_MAXIMUM_ABSOLUTE_POWER.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_segment_minimum_absolute_power(self, selector_string): r"""Gets the minimum measured power of an individual power versus time (PVT) measurement segment. This value is expressed in dBm. Use "segment<*n*>" as the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ to read this result. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (float): Returns the minimum measured power of an individual power versus time (PVT) measurement segment. This value is expressed in dBm. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) attr_val, error_code = self._interpreter.get_attribute_f64( updated_selector_string, attributes.AttributeID.PVT_RESULTS_SEGMENT_MINIMUM_ABSOLUTE_POWER.value, ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_midamble_code(self, selector_string): r"""Gets the midamble code used for slot synchronization. You do not need to use a selector string to read this attribute for the default signal instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (int): Returns the midamble code used for slot synchronization. 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.PVT_RESULTS_MIDAMBLE_CODE.value ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def get_midamble_shift(self, selector_string): r"""Gets the midamble code shift used for slot synchronization. This value is expressed in chips. You do not need to use a selector string to read this attribute for the default signal instance. Refer to the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ topic for information about the string syntax for named signals. Args: selector_string (string): Pass an empty string. Returns: Tuple (attr_val, error_code): attr_val (int): Returns the midamble code shift used for slot synchronization. This value is expressed in chips. 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.PVT_RESULTS_MIDAMBLE_SHIFT.value ) finally: self._session_function_lock.exit_read_lock() return attr_val, error_code
[docs] @_raise_if_disposed def fetch_measurement_status(self, selector_string, timeout): r"""Fetches the overall status of the power versus time (PVT) measurement. Args: selector_string (string): This parameter specifies a `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result name. **Examples:** "" "signal::sig1" "result::r1" "signal::sig1/result::r1" You can use the :py:meth:`build_result_string` method to build the selector string. timeout (float): This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10. Returns: Tuple (measurement_status, error_code): measurement_status (enums.PvtMeasurementStatus): This parameter returns the overall status of the PVT measurement. +--------------+--------------------------------------------------------------------------------------------------------------------+ | Name (value) | Description | +==============+====================================================================================================================+ | Fail (0) | Indicates that the test has failed, and the measured power in at least one measurement segment violates the limit. | +--------------+--------------------------------------------------------------------------------------------------------------------+ | Pass (1) | Indicates that the test has passed and the measured power in all defined segments does not violate the limits. | +--------------+--------------------------------------------------------------------------------------------------------------------+ error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() _helper.validate_not_none(selector_string, "selector_string") updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) measurement_status, error_code = self._interpreter.pvt_fetch_measurement_status( updated_selector_string, timeout ) finally: self._session_function_lock.exit_read_lock() return measurement_status, error_code
[docs] @_raise_if_disposed def fetch_powers(self, selector_string, timeout): r"""Fetches the values of the **Mean Absolute ON Power** and **Mean Absolute OFF Power** parameters. Args: selector_string (string): This parameter specifies a `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result name. **Examples:** "" "signal::sig1" "result::r1" "signal::sig1/result::r1" You can use the :py:meth:`build_result_string` method to build the selector string. timeout (float): This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10. Returns: Tuple (mean_absolute_on_power, mean_absolute_off_power, error_code): mean_absolute_on_power (float): This parameter returns the mean on power of the measured burst, or the averaged bursts. This value is expressed in dBm. mean_absolute_off_power (float): This parameter returns the mean off power of the measured burst, or the averaged bursts. This value is expressed in dBm. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() _helper.validate_not_none(selector_string, "selector_string") updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) mean_absolute_on_power, mean_absolute_off_power, error_code = ( self._interpreter.pvt_fetch_powers(updated_selector_string, timeout) ) finally: self._session_function_lock.exit_read_lock() return mean_absolute_on_power, mean_absolute_off_power, error_code
[docs] @_raise_if_disposed def fetch_segment_measurement(self, selector_string, timeout): r"""Returns the status of a specific power versus time (PVT) measurement segment along with the measured segment powers. Use "segment<*n*>" as the `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ to read this method. Args: selector_string (string): This parameter specifies a `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result name, and segment number. **Examples:** "segment0" "signal::sig1/segment0" "result::r1/segment0" "signal::sig1/result::r1/segment0" You can use the :py:meth:`build_segment_string` method to build the selector string. timeout (float): This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10. Returns: Tuple (segment_status, segment_margin, segment_margin_time, segment_mean_absolute_power, segment_maximum_absolute_power, segment_minimum_absolute_power, error_code): segment_status (enums.PvtSegmentStatus): This parameter returns the measurement status for an individual PVT measurement segment. +--------------+--------------------------------------------------------------------------------------------------------------------+ | Name (value) | Description | +==============+====================================================================================================================+ | Fail (0) | Indicates that the test has failed, and the measured power in at least one measurement segment violates the limit. | +--------------+--------------------------------------------------------------------------------------------------------------------+ | Pass (1) | Indicates that the test has passed and the measured power in all defined segments does not violate the limits. | +--------------+--------------------------------------------------------------------------------------------------------------------+ segment_margin (float): This parameter returns the power margin for an individual PVT measurement segment, which is the minimum power distance to the power limit measured within the PVT measurement segment. This value is expressed in dB. segment_margin_time (float): This parameter returns the position in time corresponding to the **Segment Margin** parameter. This value is expressed in seconds. segment_mean_absolute_power (float): This parameter returns the mean measured power corresponding to the **Segment Margin** parameter. This value is expressed in dBm. segment_maximum_absolute_power (float): This parameter returns the maximum measured power of an individual PVT measurement segment. This value is expressed in dBm. segment_minimum_absolute_power (float): This parameter returns the minimum measured power of an individual PVT measurement segment. This value is expressed in dBm. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() _helper.validate_not_none(selector_string, "selector_string") updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) ( segment_status, segment_margin, segment_margin_time, segment_mean_absolute_power, segment_maximum_absolute_power, segment_minimum_absolute_power, error_code, ) = self._interpreter.pvt_fetch_segment_measurement(updated_selector_string, timeout) finally: self._session_function_lock.exit_read_lock() return ( segment_status, segment_margin, segment_margin_time, segment_mean_absolute_power, segment_maximum_absolute_power, segment_minimum_absolute_power, error_code, )
[docs] @_raise_if_disposed def fetch_segment_measurement_array(self, selector_string, timeout): r"""Fetches the status and measured powers for all the power versus time (PVT) measurement segments. Args: selector_string (string): This parameter specifies a `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result name. **Examples:** "" "signal::sig1" "result::r1" "signal::sig1/result::r1" You can use the :py:meth:`build_result_string` method to build the selector string. timeout (float): This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10. Returns: Tuple (segment_status, segment_margin, segment_margin_time, segment_mean_absolute_power, segment_maximum_absolute_power, segment_minimum_absolute_power, error_code): segment_status (enums.PvtSegmentStatus): This parameter returns an array of the measurement status values for an individual PVT measurement segment. +--------------+--------------------------------------------------------------------------------------------------------------------+ | Name (value) | Description | +==============+====================================================================================================================+ | Fail (0) | Indicates that the test has failed, and the measured power in at least one measurement segment violates the limit. | +--------------+--------------------------------------------------------------------------------------------------------------------+ | Pass (1) | Indicates that the test has passed and the measured power in all defined segments does not violate the limits. | +--------------+--------------------------------------------------------------------------------------------------------------------+ segment_margin (float): This parameter returns an array of the power margins for an individual PVT measurement segment, which is the minimum power distance to the power limit measured within the PVT measurement segment. This value is expressed in dB. segment_margin_time (float): This parameter returns an array of the positions in time corresponding to the **Segment Margin** parameter. This value is expressed in seconds. segment_mean_absolute_power (float): This parameter returns an array of the mean measured powers corresponding to the **Segment Margin** parameter. This value is expressed in dBm. segment_maximum_absolute_power (float): This parameter returns an array of the maximum measured powers of an individual PVT measurement segment. This value is expressed in dBm. segment_minimum_absolute_power (float): This parameter returns an array of the minimum measured powers of an individual PVT measurement segment. This value is expressed in dBm. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() _helper.validate_not_none(selector_string, "selector_string") updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) ( segment_status, segment_margin, segment_margin_time, segment_mean_absolute_power, segment_maximum_absolute_power, segment_minimum_absolute_power, error_code, ) = self._interpreter.pvt_fetch_segment_measurement_array( updated_selector_string, timeout ) finally: self._session_function_lock.exit_read_lock() return ( segment_status, segment_margin, segment_margin_time, segment_mean_absolute_power, segment_maximum_absolute_power, segment_minimum_absolute_power, error_code, )
[docs] @_raise_if_disposed def fetch_signal_power_trace(self, selector_string, timeout, signal_power, absolute_limit): r"""Fetches the signal power trace and the absolute limit trace. The limit trace is defined by the transmit ON/off time mask measurement in the 3GPP TS 34.122 specification. Args: selector_string (string): This parameter specifies a `Selector String <https://www.ni.com/docs/en-US/bundle/rfmx/page/selector-strings-net.html>`_ comprising of result name. **Examples:** "" "signal::sig1" "result::r1" "signal::sig1/result::r1" You can use the :py:meth:`build_result_string` method to build the selector string. timeout (float): This parameter specifies the timeout for fetching the specified measurement. This value is expressed in seconds. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10. signal_power (numpy.float32): This parameter returns an array of values for the signal power trace. These values are expressed in dBm. absolute_limit (numpy.float32): This parameter returns an array of values for the signal power trace. These values are expressed in dBm. Returns: Tuple (x0, dx, error_code): x0 (float): This parameter returns the start time of the trace relative to the start of the analyzed burst. dx (float): This parameter returns the time difference between successive trace samples. error_code (int): Returns the status code of this method. The status code either indicates success or describes a warning condition. """ try: self._session_function_lock.enter_read_lock() _helper.validate_not_none(selector_string, "selector_string") updated_selector_string = _helper.validate_and_update_selector_string( selector_string, self._signal_obj ) x0, dx, error_code = self._interpreter.pvt_fetch_signal_power_trace( updated_selector_string, timeout, signal_power, absolute_limit ) finally: self._session_function_lock.exit_read_lock() return x0, dx, error_code