ObwResults

Provides methods to fetch and read the Obw measurement results.

class nirfmxnr.obw_results.ObwResults(signal_obj)[source]

Bases: object

Provides methods to fetch and read the Obw measurement results.

fetch_measurement(selector_string, timeout)[source]

Returns the occupied bandwidth, absolute power, start frequency, and stop frequency of a component carrier or subblock.

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

    Example:

    ”subblock0”

    ”result::r1/subblock0”

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

occupied_bandwidth (float):

This parameter returns the bandwidth that occupies the specified percentage of the total power of the signal. This value is expressed in Hz. The occupied bandwidth is calculated using the following equation:

Occupied bandwidth = Stop frequency - Start frequency

absolute_power (float):

This parameter returns the power measured over the integration bandwidth of the component carrier. This value is expressed in dBm.

start_frequency (float):

This parameter returns the start frequency of the occupied bandwidth of carrier/subblock. This value is expressed in Hz.

stop_frequency (float):

This parameter returns the stop frequency of the occupied bandwidth of carrier/subblock. 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 (occupied_bandwidth, absolute_power, start_frequency, stop_frequency, error_code)

fetch_spectrum(selector_string, timeout, spectrum)[source]

Fetches the spectrum used for OBW measurements.

Parameters:
  • selector_string (string) –

    This parameter specifies a Selector String comprising of the result name. The default is “” (empty string).

    Example:

    ”result::r1”

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

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

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)

get_absolute_power(selector_string)[source]

Gets the total power measured in the spectrum acquired by the measurement. This value is expressed in dBm.

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the total power measured in the spectrum acquired by the measurement. 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_occupied_bandwidth(selector_string)[source]

Gets the bandwidth that occupies the specified percentage of the total power of the signal. This value is expressed in Hz. The occupied bandwidth is calculated using the following equation:

Occupied bandwidth = Stop frequency - Start frequency

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the bandwidth that occupies the specified percentage of the total power of the signal. This value is expressed in Hz. The occupied bandwidth is calculated using the following equation:

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

Gets the start frequency of the occupied bandwidth of carrier/subblock. This value is expressed in Hz. The occupied bandwidth is calculated using the following equation:

Occupied bandwidth = Stop frequency - Start frequency

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the start frequency of the occupied bandwidth of carrier/subblock. This value is expressed in Hz. The occupied bandwidth is calculated using the following equation:

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

Gets the stop frequency of the occupied bandwidth of carrier/subblock. This value is expressed in Hz. Occupied bandwidth is calculated using the following equation:

Occupied bandwidth = Stop frequency - Start frequency

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Returns the stop frequency of the occupied bandwidth of carrier/subblock. This value is expressed in Hz. Occupied bandwidth is calculated using the following equation:

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)