SpurResults

Provides methods to fetch and read the Spur measurement results.

class nirfmxspecan.spur_results.SpurResults(signal_obj)[source]

Bases: object

Provides methods to fetch and read the Spur measurement results.

fetch_all_spurs(selector_string, timeout)[source]

Fetches all the spurs across all ranges.

Parameters:
  • selector_string (string) –

    This parameter specifies a Selector String comprising of result name.

    Example:

    ”result::r1”

    You can use the build_result_string() method to build the selector string.

  • timeout (float) – This parameter specifies the timeout, in seconds, for fetching the specified measurement. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10.

Returns:

spur_frequency (float):

This parameter returns the array of frequencies, in Hz, of all detected spurs across all ranges.

spur_amplitude (float):

This parameter returns the array of powers, in dBm, of all detected spurs across all ranges.

spur_margin (float):

This parameter returns the array of the differences between the spur amplitude and the absolute limit at the spur frequency.

spur_absolute_limit (float):

This parameter returns the array of thresholds, in dBm, used to calculate the margin of the detected spur.

spur_range_index (int):

This parameter returns the array containing range indices corresponding to the detected spurs.

error_code (int):

Returns the status code of this method. The status code either indicates success or describes a warning condition.

Return type:

Tuple (spur_frequency, spur_amplitude, spur_margin, spur_absolute_limit, spur_range_index, error_code)

fetch_measurement_status(selector_string, timeout)[source]

Indicates the overall Spur measurement status.

Parameters:
  • selector_string (string) –

    This parameter specifies a Selector String comprising of result name.

    Example:

    ””

    ”result::r1”

    You can use the build_result_string() method to build the selector string.

  • timeout (float) – This parameter specifies the timeout, in seconds, for fetching the specified measurement. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10.

Returns:

measurement_status (enums.SpurMeasurementStatus):

This parameter indicates the overall measurement status.

Name (Value)

Description

Fail (0)

Indicates that the amplitude of the detected spurs is greater than the value of the Spur Results Spur Abs Limit attribute.

Pass (1)

Indicates that the amplitude of the detected spurs is lower than the value of the Spur Results Spur Abs Limit attribute.

error_code (int):

Returns the status code of this method. The status code either indicates success or describes a warning condition.

Return type:

Tuple (measurement_status, error_code)

fetch_range_absolute_limit_trace(selector_string, timeout, absolute_limit)[source]

Fetches the absolute limit line used in the range. Use “range<n>” as the selector string to read results from this method.

Parameters:
  • selector_string (string) –

    This parameter specifies a Selector String comprising of result name, and range number.

    Example:

    ”range0”

    ”result::r1/range0”

    You can use the build_range_string() method to build the selector string.

  • timeout (float) – This parameter specifies the timeout, in seconds, for fetching the specified measurement. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10.

  • absolute_limit (numpy.float32) – This parameter returns the absolute limit, in dBm, at each frequency bin in the range.

Returns:

x0 (float):

This parameter returns the start frequency of the channel. This value is expressed in Hz.

dx (float):

This parameter returns the frequency bin spacing. 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.

Return type:

Tuple (x0, dx, error_code)

fetch_range_spectrum_trace(selector_string, timeout, range_spectrum)[source]

Fetches the measured range spectrum trace. You can fetch traces only for the range index specified by the TRACE_RANGE_INDEX property.

Use “range<n>” as the selector string to read results from this method.

Parameters:
  • selector_string (string) –

    This parameter specifies a Selector String comprising of result name, and range number.

    Example:

    ”range0”

    ”result::r1/range0”

    You can use the build_range_string() method to build the selector string.

  • timeout (float) – This parameter specifies the timeout, in seconds, for fetching the specified measurement. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10.

  • range_spectrum (numpy.float32) – This parameter returns the array of averaged powers measured at each frequency bin. This value is expressed in dBm.

Returns:

x0 (float):

This parameter returns the start frequency. This value is expressed in Hz.

dx (float):

This parameter returns the frequency bin spacing. 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.

Return type:

Tuple (x0, dx, error_code)

fetch_range_status(selector_string, timeout)[source]

Fetches the range status for Spur measurements.

Use “range<n>” as the selector string to read results from this method.

Parameters:
  • selector_string (string) –

    This parameter specifies a Selector String comprising of result name, and range number.

    Example:

    ”range0”

    ”result::r1/range0”

    You can use the build_range_string() method to build the selector string.

  • timeout (float) – This parameter specifies the timeout, in seconds, for fetching the specified measurement. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10.

Returns:

range_status (enums.SpurRangeStatus):

This parameter indicates the measurement status for the frequency range.

detected_spurs (int):

This parameter returns the number of detected spurious emissions (Spur) in the specified frequency range.

error_code (int):

Returns the status code of this method. The status code either indicates success or describes a warning condition.

Return type:

Tuple (range_status, detected_spurs, error_code)

fetch_range_status_array(selector_string, timeout)[source]

Fetches the range status for Spur measurements.

Parameters:
  • selector_string (string) –

    This parameter specifies a Selector String comprising of result name.

    Example:

    ””

    ”result::r1”

    You can use the build_result_string() method to build the selector string.

  • timeout (float) – This parameter specifies the timeout, in seconds, for fetching the specified measurement. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10.

Returns:

range_status (enums.SpurRangeStatus):

This parameter indicates the array of measurement statuses for each frequency range.

number_of_detected_spurs (int):

This parameter returns the array of number of detected spurious emissions (Spur) in each frequency range.

error_code (int):

Returns the status code of this method. The status code either indicates success or describes a warning condition.

Return type:

Tuple (range_status, number_of_detected_spurs, error_code)

fetch_spur_measurement(selector_string, timeout)[source]

Fetches the information of Spurs in the range. Use “range<n>/spur<k>” as the selector string to read results from this method.

Parameters:
  • selector_string (string) –

    This parameter specifies a Selector String comprising of result name, range number, and spur number.

    Example:

    ”range0/spur0”

    ”result::r1/range0/spur0”

    You can use the build_spur_string() method to build the selector string.

  • timeout (float) – This parameter specifies the timeout, in seconds, for fetching the specified measurement. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10.

Returns:

spur_frequency (float):

This parameter returns the frequency, in Hz, of the detected spur.

spur_amplitude (float):

This parameter returns the power, in dBm, of the detected spur.

spur_margin (float):

This parameter returns the difference between the spur amplitude and the absolute limit at the spur frequency.

spur_absolute_limit (float):

This parameter returns the threshold, in dBm, used to calculate the margin of the detected spur.

error_code (int):

Returns the status code of this method. The status code either indicates success or describes a warning condition.

Return type:

Tuple (spur_frequency, spur_amplitude, spur_margin, spur_absolute_limit, error_code)

fetch_spur_measurement_array(selector_string, timeout)[source]

Fetches the information of Spurs in the range. Use “range<n>” as the active channel string to read results from this method.

Parameters:
  • selector_string (string) –

    This parameter specifies a Selector String comprising of result name, and range number.

    Example:

    ”range0”

    ”result::r1/range0”

    You can use the build_range_string() method to build the selector string.

  • timeout (float) – This parameter specifies the timeout, in seconds, for fetching the specified measurement. Set this value to an appropriate time, longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. The default value is 10.

Returns:

spur_frequency (float):

This parameter returns the array of frequencies, in Hz, of the detected spurs.

spur_amplitude (float):

This parameter returns the array of powers, in dBm, of the detected spurs.

spur_absolute_limit (float):

This parameter returns the array of thresholds, in dBm, used to calculate the margin of the detected spurs.

spur_margin (float):

This parameter returns the array of differences between the spur amplitude and the absolute limit at the spur frequency.

error_code (int):

Returns the status code of this method. The status code either indicates success or describes a warning condition.

Return type:

Tuple (spur_frequency, spur_amplitude, spur_absolute_limit, spur_margin, error_code)

get_measurement_status(selector_string)[source]

Indicates the overall measurement status.

You do not need to use a selector string to read this result for default signal and result instance. Refer to the Selector String topic for information about the string syntax for named signals and results.

Supported devices: PXIe-5665/5668

Name (Value)

Description

Fail (0)

A detected spur in the range is greater than the value of the Spur Results Spur Abs Limits attribute.

Pass (1)

All detected spurs in the range are lower than the value of the Spur Results Spur Abs Limit attribute.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (enums.SpurMeasurementStatus):

Indicates the overall measurement status.

error_code (int):

Returns the status code of this method. The status code either indicates success or describes a warning condition.

Return type:

Tuple (attr_val, error_code)

get_range_measurement_status(selector_string)[source]

Indicates the measurement status for the frequency range.

Use “range<n>” as the Selector String to read this result.

Supported devices: PXIe-5665/5668

Name (Value)

Description

Fail (0)

The amplitude of the detected spurs is greater than the value of the Spur Results Spur Abs Limit attribute.

Pass (1)

The amplitude of the detected spurs is lower than the value of the Spur Results Spur Abs Limit attribute.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (enums.SpurRangeStatus):

Indicates the measurement status for the frequency range.

error_code (int):

Returns the status code of this method. The status code either indicates success or describes a warning condition.

Return type:

Tuple (attr_val, error_code)

get_range_spur_absolute_limit(selector_string)[source]

Gets the threshold used to calculate the margin of the detected spurious emissions (Spur). This value is expressed in dBm. The measurement calculates the threshold using the absolute limit line specified by the RANGE_ABSOLUTE_LIMIT_MODE attribute.

Use “range<n>/spur<k>” as the Selector String to read this result.

Supported devices: PXIe-5665/5668

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the threshold used to calculate the margin of the detected spurious emissions (Spur). This value is expressed in dBm. The measurement calculates the threshold using the absolute limit line specified by the RANGE_ABSOLUTE_LIMIT_MODE attribute.

error_code (int):

Returns the status code of this method. The status code either indicates success or describes a warning condition.

Return type:

Tuple (attr_val, error_code)

get_range_spur_amplitude(selector_string)[source]

Gets the amplitude of the detected spurious emissions (Spur). This value is expressed in dBm.

Use “range<n>/spur<k>” as the Selector String to read this result.

Supported devices: PXIe-5665/5668

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the amplitude of the detected spurious emissions (Spur). 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.

Return type:

Tuple (attr_val, error_code)

get_range_spur_frequency(selector_string)[source]

Gets the frequency of the detected spurious emissions (Spur). This value is expressed in Hz.

Use “range<n>/spur<k>” as the Selector String to read this result.

Supported devices: PXIe-5665/5668

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the frequency of the detected spurious emissions (Spur). 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.

Return type:

Tuple (attr_val, error_code)

get_range_spur_margin(selector_string)[source]

Gets the difference between the amplitude and the absolute limit of the detected spurious emissions (Spur) at the Spur frequency.

Use “range<n>/spur<k>” as the Selector String to read this result.

Supported devices: PXIe-5665/5668

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the difference between the amplitude and the absolute limit of the detected spurious emissions (Spur) at the Spur frequency.

error_code (int):

Returns the status code of this method. The status code either indicates success or describes a warning condition.

Return type:

Tuple (attr_val, error_code)

get_range_spur_number_of_detected_spurs(selector_string)[source]

Gets the number of detected spurious emissions (Spur) in the specified frequency range.

Use “range<n>” as the Selector String to read this result.

Supported devices: PXIe-5665/5668

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (int):

Returns the number of detected spurious emissions (Spur) in the specified frequency range.

error_code (int):

Returns the status code of this method. The status code either indicates success or describes a warning condition.

Return type:

Tuple (attr_val, error_code)