AcpResults

Provides methods to fetch and read the Acp measurement results.

class nirfmxspecan.acp_results.AcpResults(signal_obj)[source]

Bases: object

Provides methods to fetch and read the Acp measurement results.

fetch_absolute_powers_trace(selector_string, timeout, trace_index, absolute_powers_trace)[source]

Fetches the absolute powers trace for adjacent channel power (ACP) measurement.

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.

  • trace_index (int) – Specifies the index of the trace to fetch. The traceIndex can range from 0 to (Number of carriers + 2*Number of offsets).

  • absolute_powers_trace (numpy.float32) – This parameter returns the integrated power in dBm, or power spectral density in dBm/Hz, in the channel based on the power units specified.

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_carrier_measurement(selector_string, timeout)[source]

Returns the measured carrier power.

Use “carrier< * 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 carrier number.

    Example:

    ”carrier0”

    ”result::r1/carrier0”

    You can use the build_carrier_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:

absolute_power (float):

This parameter returns the measured carrier power. The carrier power is reported in dBm or dBm/Hz based on the value of the POWER_UNITS attribute.

total_relative_power (float):

This parameter returns the carrier power, in dB, measured relative to the total carrier power of all active carriers.

carrier_offset (float):

This parameter returns the center frequency, in Hz, of the carrier relative to the CENTER_FREQUENCY attribute.

integration_bandwidth (float):

This parameter returns the frequency range, in Hz, over which the measurement integrates the carrier power.

error_code (int):

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

Return type:

Tuple (absolute_power, total_relative_power, carrier_offset, integration_bandwidth, error_code)

fetch_frequency_resolution(selector_string, timeout)[source]

Returns the frequency resolution, in Hz, of the spectrum acquired by the measurement.

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:

frequency_resolution (float):

This parameter returns the frequency bin spacing, in Hz, of the spectrum acquired by the measurement.

error_code (int):

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

Return type:

Tuple (frequency_resolution, error_code)

fetch_offset_measurement(selector_string, timeout)[source]

Returns the absolute and relative powers measured in the offset channel. The relative powers are measured relative to the integrated power of the power reference carrier. The relative powers are not measured if you set the CARRIER_MODE attribute to Passive.

Use “offset<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 offset number.

    Example:

    ”offset0”

    ”result::r1/offset0”

    You can use the build_offset_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:

lower_relative_power (float):

This parameter returns the lower offset channel power, in dB, measured relative to the integrated power of the LOWER_OFFSET_POWER_REFERENCE_CARRIER attribute.

upper_relative_power (float):

This parameter returns the upper offset channel power, in dB, measured relative to the integrated power of the UPPER_OFFSET_POWER_REFERENCE_CARRIER attribute.

lower_absolute_power (float):

This parameter returns the lower offset channel power.

upper_absolute_power (float):

This parameter returns the upper offset channel power.

error_code (int):

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

Return type:

Tuple (lower_relative_power, upper_relative_power, lower_absolute_power, upper_absolute_power, error_code)

fetch_offset_measurement_array(selector_string, timeout)[source]

Returns the absolute and relative powers measured in the offset channel. The relative powers are measured relative to the integrated power of the power reference carrier. The relative powers are not measured if you set the CARRIER_MODE attribute for the reference carrier to Passive.

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:

lower_relative_power (float):

This parameter returns the array of lower offset channel powers, in dB, measured relative to the integrated power of the LOWER_OFFSET_POWER_REFERENCE_CARRIER attribute.

upper_relative_power (float):

This parameter returns the array of upper offset channel powers, in dB, measured relative to the integrated power of the UPPER_OFFSET_POWER_REFERENCE_CARRIER attribute.

lower_absolute_power (float):

This parameter returns the array of lower offset channel powers.

upper_absolute_power (float):

This parameter returns the array of upper offset channel powers.

error_code (int):

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

Return type:

Tuple (lower_relative_power, upper_relative_power, lower_absolute_power, upper_absolute_power, error_code)

fetch_relative_powers_trace(selector_string, timeout, trace_index, relative_powers_trace)[source]

Fetches the relative powers trace for adjacent channel power (ACP) measurement.

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.

  • trace_index (int) – Specifies the index of the trace to fetch. The traceIndex can range from 0 to (Number of carriers + 2*Number of offsets).

  • relative_powers_trace (numpy.float32) – This parameter returns the relative power, in dB, measured in each channel relative to power reference carrier.

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_spectrum(selector_string, timeout, spectrum)[source]

Fetches the spectrum used for adjacent channel power (ACP) measurement.

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.

  • 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_total_carrier_power(selector_string, timeout)[source]

Fetches the total integrated power of all the active carriers measured when you set the POWER_UNITS attribute to dBm. This method returns the power spectral density based on the power in all the active carriers measured when you set the ACP Power Units attribute to dBm/Hz.

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:

total_carrier_power (float):

This parameter returns the total integrated power of all the active carriers measured when you set the ACP Power Units attribute to dBm. This parameter returns the power spectral density based on the power in all the active carriers measured when you set the ACP Power Units attribute to dBm/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 (total_carrier_power, error_code)

get_carrier_absolute_power(selector_string)[source]

Gets the measured carrier power.

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

The carrier power is reported in dBm when you set the POWER_UNITS attribute to dBm, and in dBm/Hz when you set the ACP Power Units attribute to dBm/Hz.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the measured carrier power.

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_carrier_frequency(selector_string)[source]

Gets the center frequency of the carrier relative to the CENTER_FREQUENCY attribute. This value is expressed in Hz.

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the center frequency of the carrier relative to the CENTER_FREQUENCY attribute. 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_carrier_integration_bandwidth(selector_string)[source]

Gets the frequency range, over which the measurement integrates the carrier power. This value is expressed in Hz.

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the frequency range, over which the measurement integrates the carrier power. 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_carrier_total_relative_power(selector_string)[source]

Gets the carrier power measured relative to the total carrier power of all active carriers. This value is expressed in dB.

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the carrier power measured relative to the total carrier power of all active carriers. 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.

Return type:

Tuple (attr_val, error_code)

get_frequency_resolution(selector_string)[source]

Gets the frequency bin spacing of the spectrum acquired by the measurement. This value is expressed in Hz.

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.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the frequency bin spacing of the spectrum acquired by the measurement. 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_lower_offset_absolute_power(selector_string)[source]

Gets the lower offset channel power.

The offset channel power is reported in dBm when you set the POWER_UNITS attribute to dBm, and in dBm/Hz when you set the ACP Power Units attribute to dBm/Hz.

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the lower offset channel power.

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_lower_offset_frequency(selector_string)[source]

Gets the center frequency of the lower offset channel relative to the center frequency of the closest carrier. The offset frequency has a negative value.

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the center frequency of the lower offset channel relative to the center frequency of the closest carrier. The offset frequency has a negative value.

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_lower_offset_frequency_reference_carrier(selector_string)[source]

Gets the index of the carrier used as a reference to define the center frequency of the lower (negative) offset channel. Lower offset channels are channels that are to the left of the carrier.

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (int):

Returns the index of the carrier used as a reference to define the center frequency of the lower (negative) offset channel. Lower offset channels are channels that are to the left of the carrier.

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_lower_offset_integration_bandwidth(selector_string)[source]

Gets the integration bandwidth used to measure the power in the lower offset channel.

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the integration bandwidth used to measure the power in the lower offset channel.

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_lower_offset_power_reference_carrier(selector_string)[source]

Gets the index of the carrier used as the power reference to measure the lower (negative) offset channel relative power.

A value of -1 indicates that the total power of all active carriers is used as the reference power. The measurement uses the OFFSET_POWER_REFERENCE_CARRIER attribute to set the power reference.

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (int):

Returns the index of the carrier used as the power reference to measure the lower (negative) offset channel relative power.

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_lower_offset_relative_power(selector_string)[source]

Gets the lower offset channel power measured relative to the integrated power of the power reference carrier. This value is expressed in dB.

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the lower offset channel power measured relative to the integrated power of the power reference carrier. 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.

Return type:

Tuple (attr_val, error_code)

get_total_carrier_power(selector_string)[source]

Gets the total integrated power, in dBm, of all the active carriers measured when you set the POWER_UNITS attribute to dBm.

Returns the power spectral density, in dBm/Hz, based on the power in all the active carriers measured when you set the ACP Power Units attribute to dBm/Hz.

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.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the total integrated power, in dBm, of all the active carriers measured when you set the POWER_UNITS attribute to 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_upper_offset_absolute_power(selector_string)[source]

Gets the upper offset channel power.

The offset channel power is reported in dBm when you set the POWER_UNITS attribute to dBm, and in dBm/Hz when you set the ACP Power Units attribute to dBm/Hz.

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the upper offset channel power.

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_upper_offset_frequency(selector_string)[source]

Gets the center frequency of the upper offset channel relative to the center frequency of the closest carrier. The offset frequency has a positive value.

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the center frequency of the upper offset channel relative to the center frequency of the closest carrier. The offset frequency has a positive value.

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_upper_offset_frequency_reference_carrier(selector_string)[source]

Gets the index of the carrier used as a reference to define the center frequency of the upper (positive) offset channel. Upper offset channels are channels that are to the right of the carrier.

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (int):

Returns the index of the carrier used as a reference to define the center frequency of the upper (positive) offset channel. Upper offset channels are channels that are to the right of the carrier.

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_upper_offset_integration_bandwidth(selector_string)[source]

Gets the integration bandwidth used to measure the power in the upper offset channel.

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the integration bandwidth used to measure the power in the upper offset channel.

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_upper_offset_power_reference_carrier(selector_string)[source]

Gets the index of the carrier used as the power reference to measure the upper (positive) offset channel relative power.

A value of -1 indicates that the total power of all active carriers is used as the reference power. The measurement uses the OFFSET_POWER_REFERENCE_CARRIER attribute to set the power reference.

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (int):

Returns the index of the carrier used as the power reference to measure the upper (positive) offset channel relative power.

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_upper_offset_relative_power(selector_string)[source]

Gets the upper offset channel power measured relative to the integrated power of the power reference carrier. This value is expressed in dB.

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the upper offset channel power measured relative to the integrated power of the power reference carrier. 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.

Return type:

Tuple (attr_val, error_code)

read(selector_string, timeout)[source]

Configures hardware for acquisition, performs measurement on acquired data, and returns the adjacent channel power (ACP) measurement results.

Parameters:
  • selector_string (string) – Pass an empty string. The signal name that is passed when creating the signal configuration is used.

  • 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. The default value is 10.

Returns:

carrier_absolute_power (float):

This parameter returns the power measured in carrier 0. The carrier power is reported in dBm or dBm/Hz based on the value of the POWER_UNITS attribute.

offset_ch0_lower_relative_power (float):

This parameter returns the power measured in offset 0 in the negative band, relative to the power measured in the reference carrier specified using the LOWER_OFFSET_POWER_REFERENCE_CARRIER attribute.

offset_ch0_upper_relative_power (float):

This parameter returns the power measured in offset 0 in the positive band, relative to the power measured in the reference carrier specified using the UPPER_OFFSET_POWER_REFERENCE_CARRIER attribute.

offset_ch1_lower_relative_power (float):

This parameter returns the power measured in offset 1 in the negative band, relative to the power measured in the reference carrier specified using the ACP Results Lower Offset Pwr Ref Carrier attribute.

offset_ch1_upper_relative_power (float):

This parameter returns the power measured in offset 1 in the positive band, relative to the power measured in the reference carrier specified using the ACP Results Upper Offset Pwr Ref Carrier 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 (carrier_absolute_power, offset_ch0_lower_relative_power, offset_ch0_upper_relative_power, offset_ch1_lower_relative_power, offset_ch1_upper_relative_power, error_code)