ObwResults
Provides methods to fetch and read the Obw measurement results.
- class nirfmxlte.obw_results.ObwResults(signal_obj)[source]
Bases:
objectProvides 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.
Refer to the LTE Occupied Bandwidth topic for more information about OBW measurements.
- 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 99 percentage of the total power of the signal within a carrier/subblock.
- absolute_power (float):
This parameter returns the power measured over the integration bandwidth of the carrier. The carrier power is reported in dBm when you set the
ACP_POWER_UNITSattribute to dBm, and in dBm/Hz when you set the ACP Pwr Units attribute to dBm/Hz.- start_frequency (float):
This parameter returns the start frequency of the subblock. The occupied bandwidth of a carrier/subblock is calculated using the following equation:
Stop frequency - Start frequency = Occupied bandwidth.
- stop_frequency (float):
This parameter returns the stop frequency of the subblock. The occupied bandwidth of a carrier/subblock is calculated using the following equation:
Stop frequency - Start frequency = Occupied bandwidth.
- 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.
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 carrier/subblock. 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 carrier/subblock. 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 99 percentage of the total power of the signal within a carrier/subblock. This value is expressed in Hz.
Refer to the LTE Occupied Bandwidth topic for more information.
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 99 percentage of the total power of the signal within a 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 (attr_val, error_code)
- get_start_frequency(selector_string)[source]
Gets the start frequency of the carrier/subblock. This value is expressed in Hz. The occupied bandwidth is calculated using the following equation:
Stop frequency - Start frequency = Occupied bandwidth
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 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 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 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)