SParamsResults

Provides methods to fetch and read the SParams measurement results.

class nirfmxvna.s_params_results.SParamsResults(signal_obj)[source]

Bases: object

Provides methods to fetch and read the SParams measurement results.

fetch_x_data(selector_string, timeout)[source]

Fetches an array of frequency values when you perform S-Parameter measurement with SWEEP_TYPE attribute set to List or Linear or Segment. It fetches an array of time values when you perform S-Parameter measurement with SWEEP_TYPE attribute set to CW Time.

Parameters:
  • selector_string (string) –

    This parameter specifies a selector string comprising of result name.

    Example:

    ””

    ”result::r1”

  • 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:

x (float):

This parameter returns X-Axis Data.

error_code (int):

Returns the status code of this method. The status code either indicates success or describes a warning condition.

Return type:

Tuple (x, error_code)

fetch_y_data(selector_string, timeout)[source]

Fetches the S-Parameter data for all SPARAMS_FORMAT types.

Use “sparam<n>” as the selector string to read results from this method.

For different SPARAMS_FORMAT, the data is returned as follows:

SParam Format

Y1

Y2

Magnitude (0)

Magnitude of the S-Parameter data

Empty array

Phase (1)

Phase of the S-Parameter data

Empty array

Complex (2)

Real part of the complex S-Parameter data

Imaginary part of the complex S-Parameter data

SWR (3)

Standing wave ratio computed from the S-Parameter data

Empty array

Smith Impedance (4)

Real part of the complex impedance computed from the S-Parameter data

Imaginary part of the complex impedance computed from the S-Parameter data

Smith Admittance (5)

Real part of the complex admittance computed from the S-Parameter data

Imaginary part of the complex admittance computed from the S-Parameter data

Polar (6)

Magnitude of the S-Parameter data

Phase of the S-Parameter data

Group Delay (7)

Group delay computed from the S-Parameter data

Empty array

Parameters:
  • selector_string (string) –

    This parameter specifies a selector string comprising of result name, and S-Parameter number.

    Example:

    ”sparam0”

    ”result::r1/sparam0”

    You can use the build_s_parameter_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:

y1 (float):

This parameter returns Y1 data array. You can refer to the method description for interpreting Y data based on SPARAMS_FORMAT type.

y2 (float):

This parameter returns Y2 data array. You can refer to the method description for interpreting Y data based on SPARAMS_FORMAT type.

error_code (int):

Returns the status code of this method. The status code either indicates success or describes a warning condition.

Return type:

Tuple (y1, y2, error_code)

get_correction_level(selector_string)[source]

Gets the level of error correction applied to the specified S-Parameter measurement.

Use “sparam<n>” as the selector string to read this attribute.

Name (value)

Description

Uncorrected

Correction is not applied to the configured S-Parameter.

N-Port

Full N-Port correction is applied to the configured S-Parameter, where N refers to the number of VNA ports involved in the correction.

1-Path

One Path Two Port correction is applied to the configured transmission measurement. Refer to CORRECTION_PORT_SUBSET_RESPONSE_PORTS attribute for more information about one-path two-port correction.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (string):

Returns the level of error correction applied to the specified S-Parameter measurement.

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_correction_state(selector_string)[source]

Gets the error correction state of the VNA S-Parameter measurement.

Use “sparam<n>” as the selector string to read this attribute.

Name (Value)

Description

None (0)

Error correction is not applied.

Corrected (1)

Error correction is applied without interpolation using the error terms from the calset.

Interpolated (2)

Error correction is applied with error terms for at least one sweep point interpolated from the calset error terms.

Settings Modified (3)

Settings during the measurment differ from those used during calibration.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (enums.SParamsCorrectionState):

Returns the error correction state of the VNA S-Parameter measurement.

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)