TwentydBBandwidthResults
Provides methods to fetch and read the TwentydBBandwidth measurement results.
- class nirfmxbluetooth.twenty_db_bandwidth_results.TwentydBBandwidthResults(signal_obj)[source]
Bases:
objectProvides methods to fetch and read the TwentydBBandwidth measurement results.
- fetch_measurement(selector_string, timeout)[source]
Fetches the 20dBBandwidth measurement results.
- 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.
- Returns:
- peak_power (float):
This parameter returns the peak power of the measured spectrum. This value is expressed in dBm.
- bandwidth (float):
This parameter returns the 20dB bandwidth of the received signal. It is computed as the difference between High Frequency and Low Frequency parameters. This value is expressed in Hz.
- high_frequency (float):
This parameter returns the highest frequency above the center frequency at which transmit power drops 20 dB below the peak power. This value is expressed in Hz.
- low_frequency (float):
This parameter returns the lowest frequency below the center frequency at which transmit power drops 20 dB below the peak 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 (peak_power, bandwidth, high_frequency, low_frequency, error_code)
- fetch_spectrum(selector_string, timeout, spectrum)[source]
Fetches the 20dBBandwidth spectrum trace.
- 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 averaged power 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)
- get_bandwidth(selector_string)[source]
Gets the 20dB bandwidth of the received signal. It is computed as the difference between 20dBBandwidth Results High Freq and 20dBBandwidth Results Low Freq. This value is expressed in Hz.
You do not need to use a selector string to read this result for the 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 20dB bandwidth of the received signal. It is computed as the difference between 20dBBandwidth Results High Freq and 20dBBandwidth Results Low Freq. 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_high_frequency(selector_string)[source]
Gets the highest frequency above the center frequency at which the transmit power drops 20 dB below the peak power. This value is expressed in Hz.
You do not need to use a selector string to read this result for the 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 highest frequency above the center frequency at which the transmit power drops 20 dB below the peak 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_low_frequency(selector_string)[source]
Gets the lowest frequency below the center frequency at which the transmit power drops 20 dB below the peak power. This value is expressed in Hz.
You do not need to use a selector string to read this result for the 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 lowest frequency below the center frequency at which the transmit power drops 20 dB below the peak 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_peak_power(selector_string)[source]
Gets the peak power of the measured spectrum. 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 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 peak power of the measured spectrum. 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)