ModSpectrumResults
Provides methods to fetch and read the ModSpectrum measurement results.
- class nirfmxbluetooth.modspectrum_results.ModSpectrumResults(signal_obj)[source]
Bases:
objectProvides methods to fetch and read the ModSpectrum measurement results.
- fetch_spectrum(selector_string, timeout, spectrum)[source]
Fetches the ModSpectrum spectrum trace.
- Parameters:
selector_string (string) –
This parameter specifies a Selector String comprising of offset number, and the result name.
Example:
”offset0”
”result::r1/offset0”
You can use the RFmxBT Build Offset 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 parameterReturns the averaged power measured at each frequency bin. This value is expressed in dBm.
- Returns:
- x0 (float):
This parameterReturns the start frequency. This value is expressed in Hz.
- dx (float):
This parameterReturns 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 6 dB bandwidth of the received signal. It is computed as the difference between
HIGH_FREQUENCYandLOW_FREQUENCY. 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 6 dB bandwidth of the received signal. It is computed as the difference between
HIGH_FREQUENCYandLOW_FREQUENCY. 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 6dB 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 6dB 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 6 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 6 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)