ChpResults
Provides methods to fetch and read the Chp measurement results.
- class nirfmxcdma2k.chp_results.ChpResults(signal_obj)[source]
Bases:
objectProvides methods to fetch and read the Chp measurement results.
- fetch_carrier_absolute_power(selector_string, timeout)[source]
Returns the absolute carrier power of the CHP measurement.
- Parameters:
selector_string (string) –
This parameter specifies a Selector String comprising of result name. Examples:
””
”signal::sig1”
”result::r1”
”signal::sig1/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:
- carrier_absolute_power (float):
This parameter returns the averaged channel power measured in the specified integration bandwidth. 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 (carrier_absolute_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. Examples:
””
”signal::sig1”
”result::r1”
”signal::sig1/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 or dBm/Hz.
- 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_carrier_absolute_power(selector_string)[source]
Gets the averaged CHP measured in the specified integration bandwidth. 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 named results.
- Parameters:
selector_string (string) – Pass an empty string.
- Returns:
- attr_val (float):
Returns the averaged CHP measured in the specified integration bandwidth. 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)