ChpResults

Provides methods to fetch and read the Chp measurement results.

class nirfmxwcdma.chp_results.ChpResults(signal_obj)[source]

Bases: object

Provides methods to fetch and read the Chp measurement results.

fetch_carrier_measurement(selector_string, timeout)[source]

Fetches the absolute and relative powers of the carrier for the CHP measurement. The relative power is relative to the total carrier power.

Use “carrier<n>” as the selector string to configure 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 time for which the method waits for the measurement to complete. This value is expressed in seconds. 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 carrier power integrated over a bandwidth of 5 MHz. This value is expressed in dBm.

relative_power (float):

This parameter returns the carrier power relative to the CHP_RESULTS_TOTAL_CARRIER_POWER attribute. 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 (absolute_power, relative_power, error_code)

fetch_carrier_measurement_array(selector_string, timeout)[source]

Fetches an array of absolute powers and array of relative powers of the carriers for the CHP measurement. The relative power is relative to the total carrier power.

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 time for which the method waits for the measurement to complete. This value is expressed in seconds. 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 an array of carrier powers integrated over a bandwidth of 5 MHz. This value is expressed in dBm.

relative_power (float):

This parameter returns an array of carrier powers relative to the CHP_RESULTS_TOTAL_CARRIER_POWER attribute. 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 (absolute_power, relative_power, error_code)

fetch_spectrum(selector_string, timeout, spectrum)[source]

Fetches the spectrum used for the CHP 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 time for which the method waits for the measurement to complete. This value is expressed in seconds. 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 averaged power at each frequency bin. The 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 carrier power for the CHP 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 time for which the method waits for the measurement to complete. This value is expressed in seconds. 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. 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 (total_carrier_power, error_code)

get_carrier_absolute_power(selector_string)[source]

Gets the carrier power integrated over a bandwidth of 5 MHz.

The carrier is centered at a frequency determined by the CENTER_FREQUENCY and CARRIER_FREQUENCY attributes.

Use “carrier<k>” as the selector string to read this result.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the carrier power integrated over a bandwidth of 5 MHz.

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

Gets the carrier power relative to the value of the CHP_RESULTS_TOTAL_CARRIER_POWER attribute.

This value is expressed in dB.

Use “carrier<k>” as the selector string to read this result.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the carrier power relative to the value of the CHP_RESULTS_TOTAL_CARRIER_POWER 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_total_carrier_power(selector_string)[source]

Gets the sum of all active carrier powers, where each carrier power corresponds to the value of the CHP_RESULTS_CARRIER_ABSOLUTE_POWER attribute. For a single-carrier measurement, total carrier power is the same as carrier absolute power.

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 topic for information about the string syntax for named signals and named results.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the sum of all active carrier powers, where each carrier power corresponds to the value of the CHP_RESULTS_CARRIER_ABSOLUTE_POWER attribute. For a single-carrier measurement, total carrier power is the same as carrier absolute 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)