IMResults
Provides methods to fetch and read the IM measurement results.
- class nirfmxspecan.im_results.IMResults(signal_obj)[source]
Bases:
objectProvides methods to fetch and read the IM measurement results.
- fetch_fundamental_measurement(selector_string, timeout)[source]
Fetches the peak powers of the two fundamental tones.
- Parameters:
selector_string (string) –
This parameter specifies a Selector String comprising of 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, in seconds, for fetching the specified measurement. 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:
- lower_tone_power (float):
This parameter returns the peak power measured around the lower tone frequency when you set the
FUNDAMENTAL_LOWER_TONE_POWERattribute to True. This value is expressed in dBm. When you set the IM Local Peak Search Enabled attribute to False, the measurement returns the power at the lower tone frequency.- upper_tone_power (float):
This parameter returns the peak power measured around the upper tone frequency when you set the IM Local Peak Search Enabled attribute to True. This value is expressed in dBm. When you set the IM Local Peak Search Enabled attribute to False, the measurement returns the power at the upper tone frequency.
- error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
- Return type:
Tuple (lower_tone_power, upper_tone_power, error_code)
- fetch_intercept_power(selector_string, timeout)[source]
Fetches the output intercept powers for the intermod.
Use “intermod<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 intermod number.
Example:
”intermod0”
”result::r1/intermod0”
You can use the
build_intermod_string()method to build the selector string.timeout (float) – This parameter specifies the timeout, in seconds, for fetching the specified measurement. 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:
- intermod_order (int):
This parameter returns the order of the intermod.
- worst_case_output_intercept_power (float):
This parameter returns the worst case output intercept power which is equal to the minimum of the values of the
UPPER_OUTPUT_INTERCEPT_POWERandLOWER_OUTPUT_INTERCEPT_POWERresults. This value is expressed in dBm.- lower_output_intercept_power (float):
This parameter returns the lower output intercept power. This value is expressed in dBm.
- upper_output_intercept_power (float):
This parameter returns the upper output intercept power. 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 (intermod_order, worst_case_output_intercept_power, lower_output_intercept_power, upper_output_intercept_power, error_code)
- fetch_intercept_power_array(selector_string, timeout)[source]
Fetches the output intercept powers for the intermod.
- Parameters:
selector_string (string) –
This parameter specifies a Selector String comprising of 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, in seconds, for fetching the specified measurement. 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:
- intermod_order (int):
This parameter returns an array of the orders of the intermods.
- worst_case_output_intercept_power (float):
This parameter returns an array of the worst case output intercept powers which are equal to the minimum of the values of the
UPPER_OUTPUT_INTERCEPT_POWERandLOWER_OUTPUT_INTERCEPT_POWERresults. This value is expressed in dBm.- lower_output_intercept_power (float):
This parameter returns an array of the lower output intercept power values. This value is expressed in dBm.
- upper_output_intercept_power (float):
This parameter returns an array of the upper output intercept power values. 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 (intermod_order, worst_case_output_intercept_power, lower_output_intercept_power, upper_output_intercept_power, error_code)
- fetch_intermod_measurement(selector_string, timeout)[source]
Fetches the peak powers of the lower and upper intermods.
Use “intermod< * 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 intermod number.
Example:
”intermod0”
”result::r1/intermod0”
You can use the
build_intermod_string()method to build the selector string.timeout (float) – This parameter specifies the timeout, in seconds, for fetching the specified measurement. 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:
- intermod_order (int):
This parameter returns the order of the intermod.
- lower_intermod_absolute_power (float):
This parameter returns the peak power measured around the lower intermod frequency when you set the
LOCAL_PEAK_SEARCH_ENABLEDattribute to True. This value is expressed in dBm. When you set the IM Local Peak Search Enabled attribute to False, the measurement returns the power at the lower intermod frequency.- upper_intermod_absolute_power (float):
This parameter returns the peak power measured around the upper intermod frequency when you set the
LOCAL_PEAK_SEARCH_ENABLEDattribute to True. This value is expressed in dBm. When you set the IM Local Peak Search Enabled attribute to False, the measurement returns the power at the upper intermod frequency.- error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
- Return type:
Tuple (intermod_order, lower_intermod_absolute_power, upper_intermod_absolute_power, error_code)
- fetch_intermod_measurement_array(selector_string, timeout)[source]
Fetches an array of peak powers of the lower and upper intermods.
- Parameters:
selector_string (string) –
This parameter specifies a Selector String comprising of 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, in seconds, for fetching the specified measurement. 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:
- intermod_order (int):
This parameter returns an array of the orders of the intermods.
- lower_intermod_absolute_power (float):
This parameter returns an array of the peak power values measured around the lower intermod frequency when you set the
LOCAL_PEAK_SEARCH_ENABLEDattribute to True. This value is expressed in dBm. When you set the IM Local Peak Search Enabled attribute to False, the measurement returns the power at the lower intermod frequency.- upper_intermod_absolute_power (float):
This parameter returns an array of the peak power values measured around the upper intermod frequency when you set the IM Local Peak Search Enabled attribute to True. This value is expressed in dBm. When you set the IM Local Peak Search Enabled attribute to False, the measurement returns the power at the upper intermod frequency.
- error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
- Return type:
Tuple (intermod_order, lower_intermod_absolute_power, upper_intermod_absolute_power, error_code)
- fetch_spectrum(selector_string, timeout, spectrum_index, spectrum)[source]
Fetches the array of spectrums used for the IM measurement. The ** Spectrums ** parameter contains one spectrum element when you set the
MEASUREMENT_METHODproperty to ** Normal ** . When you set the IM Meas Method attribute to ** Dynamic Range ** or ** Segmented ** , each tone and intermod has a separate spectrum element in the ** Spectrums ** parameter.This array is populated in the following order:
Lower tone spectrum
Upper tone spectrum
Lower intermod<
n
> spectrum
Upper intermod<
n
> spectrum
- param selector_string:
This parameter specifies a Selector String comprising of result name.
Example:
“”
“result::r1”
You can use the
build_result_string()method to build the selector string.- type selector_string:
string
- param timeout:
This parameter specifies the timeout, in seconds, for fetching the specified measurement. 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.
- type timeout:
float
- param spectrum_index:
This parameter returns the data for the spectrum. This value is expressed in dBm.
- type spectrum_index:
int
- param spectrum:
This parameter returns the array of averaged powers measured at each frequency bin. This value is expressed in dBm.
- type spectrum:
numpy.float32
- 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.
- rtype:
Tuple (x0, dx, error_code)
- get_fundamental_lower_tone_power(selector_string)[source]
Gets the peak power measured around the lower tone frequency when you set the
LOCAL_PEAK_SEARCH_ENABLEDattribute to True. This value is expressed in dBm. When you set the IM Local Peak Search Enabled attribute to False, the measurement returns the power at the lower tone frequency.You do not need to use a selector string to read this result for 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 measured around the lower tone frequency when you set the
LOCAL_PEAK_SEARCH_ENABLEDattribute to True. This value is expressed in dBm. When you set the IM Local Peak Search Enabled attribute to False, the measurement returns the power at the lower tone frequency.- 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_fundamental_upper_tone_power(selector_string)[source]
Gets the peak power measured around the upper tone frequency when you set the
LOCAL_PEAK_SEARCH_ENABLEDattribute to True. This value is expressed in dBm. When you set the IM Local Peak Search Enabled attribute to False, the measurement returns the power at the upper tone frequency.You do not need to use a selector string to read this result for 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 measured around the upper tone frequency when you set the
LOCAL_PEAK_SEARCH_ENABLEDattribute to True. This value is expressed in dBm. When you set the IM Local Peak Search Enabled attribute to False, the measurement returns the power at the upper tone frequency.- 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_intermod_order(selector_string)[source]
Gets the order of the intermod.
Use “intermod<n>” as the selector string to read this result.
- Parameters:
selector_string (string) – Pass an empty string.
- Returns:
- attr_val (int):
Returns the order of the intermod.
- 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_lower_intermod_power(selector_string)[source]
Gets the peak power measured around the lower intermod frequency when you set the
LOCAL_PEAK_SEARCH_ENABLEDattribute to True. This value is expressed in dBm. When you set the IM Local Peak Search Enabled attribute to False, the measurement returns the power at the lower intermod frequency.Use “intermod<n>” as the selector string to read this result.
- Parameters:
selector_string (string) – Pass an empty string.
- Returns:
- attr_val (float):
Returns the peak power measured around the lower intermod frequency when you set the
LOCAL_PEAK_SEARCH_ENABLEDattribute to True. This value is expressed in dBm. When you set the IM Local Peak Search Enabled attribute to False, the measurement returns the power at the lower intermod frequency.- 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_lower_intermod_relative_power(selector_string)[source]
Gets the relative peak power measured around the lower intermod frequency when you set the
LOCAL_PEAK_SEARCH_ENABLEDattribute to True. This value is expressed in dBc. When you set the IM Local Peak Search Enabled attribute to False, the measurement returns the relative power at the lower intermod frequency.Use “intermod<n>” as the selector string to read this result.
- Parameters:
selector_string (string) – Pass an empty string.
- Returns:
- attr_val (float):
Returns the relative peak power measured around the lower intermod frequency when you set the
LOCAL_PEAK_SEARCH_ENABLEDattribute to True. This value is expressed in dBc. When you set the IM Local Peak Search Enabled attribute to False, the measurement returns the relative power at the lower intermod frequency.- 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_lower_output_intercept_power(selector_string)[source]
Gets the lower output intercept power. This value is expressed in dBm. Refer to the IM topic for more information about this result.
Use “intermod<n>” as the selector string to read this result.
- Parameters:
selector_string (string) – Pass an empty string.
- Returns:
- attr_val (float):
Returns the lower output intercept power. This value is expressed in dBm. Refer to the IM topic for more information about this result.
- 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_upper_intermod_power(selector_string)[source]
Gets the peak power measured around the upper intermod frequency when you set the
LOCAL_PEAK_SEARCH_ENABLEDattribute to True. This value is expressed in dBm. When you set the IM Local Peak Search Enabled attribute to False, the measurement returns the power at the upper intermod frequency.Use “intermod<n>” as the selector string to read this result.
- Parameters:
selector_string (string) – Pass an empty string.
- Returns:
- attr_val (float):
Returns the peak power measured around the upper intermod frequency when you set the
LOCAL_PEAK_SEARCH_ENABLEDattribute to True. This value is expressed in dBm. When you set the IM Local Peak Search Enabled attribute to False, the measurement returns the power at the upper intermod frequency.- 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_upper_intermod_relative_power(selector_string)[source]
Gets the relative peak power measured around the upper intermod frequency when you set the
LOCAL_PEAK_SEARCH_ENABLEDattribute to True. This value is expressed in dBc. When you set the IM Local Peak Search Enabled attribute to False, the measurement returns the relative power at the upper intermod frequency.Use “intermod<n>” as the selector string to read this result.
- Parameters:
selector_string (string) – Pass an empty string.
- Returns:
- attr_val (float):
Returns the relative peak power measured around the upper intermod frequency when you set the
LOCAL_PEAK_SEARCH_ENABLEDattribute to True. This value is expressed in dBc. When you set the IM Local Peak Search Enabled attribute to False, the measurement returns the relative power at the upper intermod frequency.- 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_upper_output_intercept_power(selector_string)[source]
Gets the upper output intercept power. This value is expressed in dBm. Refer to the IM topic for more information about this result.
Use “intermod<n>” as the selector string to read this result.
- Parameters:
selector_string (string) – Pass an empty string.
- Returns:
- attr_val (float):
Returns the upper output intercept power. This value is expressed in dBm. Refer to the IM topic for more information about this result.
- 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_worst_case_intermod_absolute_power(selector_string)[source]
Gets the worst case intermod power that is equal to the maximum of the values of both the
UPPER_INTERMOD_POWERandLOWER_INTERMOD_POWERresults. This value is expressed in dBm.Use “intermod<n>” as the selector string to read this result.
- Parameters:
selector_string (string) – Pass an empty string.
- Returns:
- attr_val (float):
Returns the worst case intermod power that is equal to the maximum of the values of both the
UPPER_INTERMOD_POWERandLOWER_INTERMOD_POWERresults. 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_worst_case_intermod_relative_power(selector_string)[source]
Gets the worst case intermod relative power that is equal to the maximum of the values of both the
UPPER_INTERMOD_RELATIVE_POWERandLOWER_INTERMOD_RELATIVE_POWERresults. This value is expressed in dBc.Use “intermod<n>” as the selector string to read this result.
- Parameters:
selector_string (string) – Pass an empty string.
- Returns:
- attr_val (float):
Returns the worst case intermod relative power that is equal to the maximum of the values of both the
UPPER_INTERMOD_RELATIVE_POWERandLOWER_INTERMOD_RELATIVE_POWERresults. This value is expressed in dBc.- 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_worst_case_output_intercept_power(selector_string)[source]
Gets the worst case output intercept power which is equal to the minimum of the values of the
UPPER_OUTPUT_INTERCEPT_POWERandLOWER_OUTPUT_INTERCEPT_POWERresults. This value is expressed in dBm.Use “intermod<n>” as the selector string to read this result.
- Parameters:
selector_string (string) – Pass an empty string.
- Returns:
- attr_val (float):
Returns the worst case output intercept power which is equal to the minimum of the values of the
UPPER_OUTPUT_INTERCEPT_POWERandLOWER_OUTPUT_INTERCEPT_POWERresults. 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)