AmpmResults
Provides methods to fetch and read the Ampm measurement results.
- class nirfmxspecan.ampm_results.AmpmResults(signal_obj)[source]
Bases:
objectProvides methods to fetch and read the Ampm measurement results.
- fetch_am_to_am_trace(selector_string, timeout)[source]
Fetches the AM to AM trace, where the Reference Powers array forms the x-axis of the trace; and the Measured AM to AM and Curve Fit AM to AM arrays form the y-axis of the trace.
- 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:
- reference_powers (float):
This parameter returns the array of reference powers. This value is expressed in dBm.
Reference Powers are the instantaneous powers at the input port of the DUT when you set the
REFERENCE_POWER_TYPEattribute to Input, and Reference Powers are the instantaneous powers at the output port of the DUT when you set the AMPM Ref Pwr Type attribute to Output.- measured_am_to_am (float):
This parameter returns the gain values corresponding to the reference powers. This value is expressed in dB.
- curve_fit_am_to_am (float):
This parameter returns the polynomial fit gain values corresponding to the reference powers. This value is expressed in dB.
- error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
- Return type:
Tuple (reference_powers, measured_am_to_am, curve_fit_am_to_am, error_code)
- fetch_am_to_pm_trace(selector_string, timeout)[source]
Fetches the AM to PM trace, where the Reference Powers array forms the x-axis of the trace; and the Measured AM to PM and Curve Fit AM to PM arrays form the y-axis of the trace.
- 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:
- reference_powers (float):
This parameter returns the array of reference powers. This value is expressed in dBm.
Reference Powers are the instantaneous powers at the input port of the DUT when you set the
REFERENCE_POWER_TYPEattribute to Input, and Reference Powers are the instantaneous powers at the output port of the DUT when you set the AMPM Ref Pwr Type attribute to Output.- measured_am_to_pm (float):
This parameter returns the polynomial fit phase distortion values corresponding to the reference powers. This value is expressed in degrees.
- curve_fit_am_to_pm (float):
This parameter returns the phase distortion values corresponding to the reference powers. This value is expressed in degrees.
- error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
- Return type:
Tuple (reference_powers, measured_am_to_pm, curve_fit_am_to_pm, error_code)
- fetch_compression_points(selector_string, timeout)[source]
Fetches the compression points.
- 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:
- input_compression_point (float):
This parameter returns the theoretical input power at which the device gain drops by the compression level, specified by the
COMPRESSION_POINT_LEVELparameter, from its mean linear gain. This value is expressed in dBm.- output_compression_point (float):
This parameter returns the theoretical output power at which device gain drops by the compression level, specified by the
COMPRESSION_POINT_LEVELparameter, from its mean linear gain. 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 (input_compression_point, output_compression_point, error_code)
- fetch_curve_fit_coefficients(selector_string, timeout)[source]
Fetches the coefficients of the polynomials that approximate the AM-to-AM and AM-to-PM responses of the device under test.
- 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:
- am_to_am_coefficients (float):
This parameter returns the coefficients of the polynomial that approximates the AM-to-AM characteristic of the device under test.
- am_to_pm_coefficients (float):
This parameter returns the coefficients of the polynomial that approximates the AM-to-PM characteristic of the device under test.
- error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
- Return type:
Tuple (am_to_am_coefficients, am_to_pm_coefficients, error_code)
- fetch_curve_fit_residual(selector_string, timeout)[source]
Fetches the polynomial approximation residuals for AM-to-AM and AM-to-PM response of the device under test.
- 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:
- am_to_am_residual (float):
This parameter returns the approximation error, in dB, in the polynomial approximation of the AM-to-AM characteristic of the device under test.
- am_to_pm_residual (float):
This parameter returns the approximation error, in degrees, in the polynomial approximation of the AM-to-PM characteristic of the device under test.
- error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
- Return type:
Tuple (am_to_am_residual, am_to_pm_residual, error_code)
- fetch_dut_characteristics(selector_string, timeout)[source]
Fetches the mean linear gain, 1 dB compression point, and mean RMS EVM of the DUT.
- 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:
- mean_linear_gain (float):
This parameter returns the average linear gain, in dB, of the device under test, computed by rejecting signal samples suffering gain compression.
- one_db_compression_point (float):
This parameter returns the theoretical output power, in dBm, at which gain of the device under test drops by 1 dB from its mean linear gain. This parameter returns NaN when the AM-to-AM characteristics of the device under test are flat.
- mean_rms_evm (float):
This parameter returns the ratio, as a percentage, of l2norm of difference between the normalized reference and acquired waveforms, to the l2norm of the normalized reference waveform.
- error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
- Return type:
Tuple (mean_linear_gain, one_db_compression_point, mean_rms_evm, error_code)
- fetch_error(selector_string, timeout)[source]
Fetches the maximum gain error range, phase error range, and mean phase error for the DUT.
- 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:
- gain_error_range (float):
This parameter returns the peak-to-peak deviation, in dB, in the gain of the device under test.
- phase_error_range (float):
This parameter returns the peak-to-peak deviation, in degrees, in the phase distortion of the acquired signal relative to the reference waveform caused by the device under test.
- mean_phase_error (float):
This parameter returns the mean phase error, in degrees, of the acquired signal relative to the reference waveform caused by the device under test.
- error_code (int):
Returns the status code of this method. The status code either indicates success or describes a warning condition.
- Return type:
Tuple (gain_error_range, phase_error_range, mean_phase_error, error_code)
- fetch_processed_mean_acquired_waveform(selector_string, timeout, processed_mean_acquired_waveform)[source]
Fetches the averaged acquired waveform, corrected for frequency, phase and DC offsets, used to perform the AMPM measurement.
- 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.
processed_mean_acquired_waveform (numpy.complex64) – This parameter returns the complex baseband samples, in volts.
- Returns:
- x0 (float):
This parameter returns the start time, in seconds.
- dx (float):
This parameter returns the sample duration, in seconds.
- 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)
- fetch_processed_reference_waveform(selector_string, timeout, processed_reference_waveform)[source]
Fetches the segment of the reference waveform used to perform the AMPM measurement.
- 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.
processed_reference_waveform (numpy.complex64) – This parameter returns the complex baseband samples, in volts.
- Returns:
- x0 (float):
This parameter returns the start time, in seconds.
- dx (float):
This parameter returns the sample duration, in seconds.
- 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)
- fetch_relative_phase_trace(selector_string, timeout, relative_phase)[source]
Fetches the phase of the processed mean acquired waveform relative to the processed reference waveform.
- 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.
relative_phase (numpy.float32) – This parameter returns the instantaneous relative phase. This value is expressed in degree.
- Returns:
- x0 (float):
This parameter returns the start time, in seconds.
- dx (float):
This parameter returns the sample duration, in seconds.
- 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)
- fetch_relative_power_trace(selector_string, timeout, relative_power)[source]
Fetches the power of the processed mean acquired waveform relative to the processed reference waveform.
- 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.
relative_power (numpy.float32) – This parameter returns the instantaneous relative power, in dB.
- Returns:
- x0 (float):
This parameter returns the start time, in seconds.
- dx (float):
This parameter returns the sample duration, in seconds.
- 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_1_db_compression_point(selector_string)[source]
Gets the theoretical output power at which the gain of the device under test drops by 1 dB from a gain reference computed based on the value that you specify for the
COMPRESSION_POINT_GAIN_REFERENCEattribute. This value is expressed in dBm. This attribute returns NaN when the AM-to-AM characteristics of the device under test are flat.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 theoretical output power at which the gain of the device under test drops by 1 dB from a gain reference computed based on the value that you specify for the
COMPRESSION_POINT_GAIN_REFERENCEattribute. This value is expressed in dBm. This attribute returns NaN when the AM-to-AM characteristics of the device under test are flat.- 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_am_to_am_curve_fit_coefficients(selector_string)[source]
Gets the coefficients of the polynomial that approximates the measured AM-to-AM characteristic of the device under test.
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 coefficients of the polynomial that approximates the measured AM-to-AM characteristic of the device under test.
- 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_am_to_am_curve_fit_residual(selector_string)[source]
Gets the approximation error of the polynomial approximation of the measured device under test AM-to-AM characteristic. This value is expressed in dB.
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 approximation error of the polynomial approximation of the measured device under test AM-to-AM characteristic. This value is expressed in dB.
- 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_am_to_pm_curve_fit_coefficients(selector_string)[source]
Gets the coefficients of the polynomial that approximates the measured AM-to-PM characteristic of the device under test.
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 coefficients of the polynomial that approximates the measured AM-to-PM characteristic of the device under test.
- 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_am_to_pm_curve_fit_residual(selector_string)[source]
Gets the approximation error of the polynomial approximation of the measured AM-to-PM characteristic of the device under test. This value is expressed in degrees.
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 approximation error of the polynomial approximation of the measured AM-to-PM characteristic of the device under test. This value is expressed in degrees.
- 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_compression_point_gain_reference(selector_string)[source]
Gets the gain reference used for compression point calculation. This value is expressed in dB.
You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the Selector String topic for information about the string syntax for named signals.
- Parameters:
selector_string (string) – Pass an empty string.
- Returns:
- attr_val (float):
Returns the gain reference used for compression point calculation. This value is expressed in dB.
- 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_gain_error_range(selector_string)[source]
Gets the peak-to-peak deviation of the device under test gain. This value is expressed in dB.
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-to-peak deviation of the device under test gain. This value is expressed in dB.
- 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_input_compression_point(selector_string)[source]
Gets the theoretical input power at which the gain of the device drops by a compression level, specified through the
COMPRESSION_POINT_LEVELattribute, from a gain reference computed based on the value that you specify for theCOMPRESSION_POINT_GAIN_REFERENCEattribute. This value is expressed in dBm.You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the Selector String topic for information about the string syntax for named signals.
- Parameters:
selector_string (string) – Pass an empty string.
- Returns:
- attr_val (float):
Returns the theoretical input power at which the gain of the device drops by a compression level, specified through the
COMPRESSION_POINT_LEVELattribute, from a gain reference computed based on the value that you specify for theCOMPRESSION_POINT_GAIN_REFERENCEattribute. 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_mean_linear_gain(selector_string)[source]
Gets the average linear gain of the device under test, computed by rejecting signal samples containing gain compression. This value is expressed in dB.
- Parameters:
selector_string (string) – Pass an empty string.
- Returns:
- attr_val (float):
Returns the average linear gain of the device under test, computed by rejecting signal samples containing gain compression. This value is expressed in dB.
- 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_mean_phase_error(selector_string)[source]
Gets the mean phase error of the acquired signal relative to the reference waveform caused by the device under test. This value is expressed in degrees.
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 mean phase error of the acquired signal relative to the reference waveform caused by the device under test. This value is expressed in degrees.
- 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_mean_rms_evm(selector_string)[source]
Gets the ratio, as a percentage, of l2norm of difference between the normalized reference and acquired waveforms, to the l2norm of the normalized reference waveform.
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 ratio, as a percentage, of l2norm of difference between the normalized reference and acquired waveforms, to the l2norm of the normalized reference waveform.
- 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_output_compression_point(selector_string)[source]
Gets the theoretical output power at which the gain of the device drops by a compression level, specified through the
COMPRESSION_POINT_LEVELattribute, from a gain reference computed based on the value that you specify for theCOMPRESSION_POINT_GAIN_REFERENCEattribute. This value is expressed in dBm.You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the Selector String topic for information about the string syntax for named signals.
- Parameters:
selector_string (string) – Pass an empty string.
- Returns:
- attr_val (float):
Returns the theoretical output power at which the gain of the device drops by a compression level, specified through the
COMPRESSION_POINT_LEVELattribute, from a gain reference computed based on the value that you specify for theCOMPRESSION_POINT_GAIN_REFERENCEattribute. 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_peak_reference_power(selector_string)[source]
Gets the peak reference power. This value is expressed in dBm.
You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the Selector String topic for information about the string syntax for named signals.
- Parameters:
selector_string (string) – Pass an empty string.
- Returns:
- attr_val (float):
Returns the peak reference 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 (attr_val, error_code)
- get_peak_reference_power_gain(selector_string)[source]
Gets the gain at the peak reference power. This value is expressed in dB.
You do not need to use a selector string to read this attribute for the default signal and result instance. Refer to the Selector String topic for information about the string syntax for named signals.
- Parameters:
selector_string (string) – Pass an empty string.
- Returns:
- attr_val (float):
Returns the gain at the peak reference power. This value is expressed in dB.
- 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_phase_error_range(selector_string)[source]
Gets the peak-to-peak deviation of the phase distortion of the acquired signal relative to the reference waveform caused by the device under test. This value is expressed in degrees.
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-to-peak deviation of the phase distortion of the acquired signal relative to the reference waveform caused by the device under test. This value is expressed in degrees.
- 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)