SParamsConfiguration

Provides methods to configure the SParams measurement.

class nirfmxvna.s_params_configuration.SParamsConfiguration(signal_obj)[source]

Bases: object

Provides methods to configure the SParams measurement.

configure_s_parameter(selector_string, s_parameter)[source]

Configures the S-Parameter to be measured in format S<receiver port number><source port number>

Use “sparam<n>” as the selector string to configure this method.

This method sets SPARAMS_SOURCE_PORT and SPARAMS_RECEIVER_PORT attributes.

Supported devices: NI PXIe-5633

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.

  • s_parameter (string) – This parameter specifies the S-Parameter to be measured in format S<receiver port number><source port number>.

Returns:

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

Return type:

int

export_to_snp_file(selector_string, snp_file_path)[source]

Exports the measured S-parameters to a SnP file.

You can set format of the exported S-Parameters using SPARAMS_SNP_DATA_FORMAT attribute, use SPARAMS_SNP_USER_COMMENT attribute to add any additional comments and use SPARAMS_SNP_PORTS attribute to specify a subset of VNA ports. This method exports the S-Parameters associated with SPARAMS_SNP_PORTS.

For a N-port VNA, assume that you measure S11, S12, …, S1M, S21, S22, …, S2M, SM1, SM2, …, SMM parameters, where M<=N. SnP file export behaviors for various scenarios are as follows:

Case 1: You specify file extension as S<N>P. S-Parameter data for ports M+1, M+2, .., N in the exported file are zero-filled when S-Parameter data is in linear format, and are filled with -200 dB magnitude and 45 degrees angle in log format.

Example: For a 2-Port VNA, if you measure only S11 and export the S-Parameters to a *.s2p file, then resulting file will contain measured S11 data and zero-filled S21, S12 and S22 data.

Case 2: You specify file extension as S<M>P. Resulting *.s<M>p file contains S-Parameters S11, …, SMM data.

Example: For a 2-Port VNA, if you measure only S11 and export the S-Parameters to a *.s1p file, then resulting file will contain measured S11 data

Parameters:
  • selector_string (string) –

    This parameter specifies a selector string comprising of result name.

    Example:

    ””

    ”result::r1”

    You can use the build_s_parameter_string() method to build the selector string.

  • snp_file_path (string) – This parameter Specifies the full path to the exported *.snp file. If the specified file doesn’t exist, RFmx creates a new file, whereas contents of an already existing file are overwritten.

Returns:

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

Return type:

int

get_format(selector_string)[source]

Gets the format of S-Parameter measurement.

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

The default value is Magnitude.

Name (Value)

Description

Magnitude (0)

Sets the format of the selected S-Parameter to Magnitude. You can specify SParams Magnitude Units.

Phase (1)

Sets the format of the selected S-Parameter to Phase. Phase values are expressed in degrees. Phase can be represented in various, mathematically equivalent ways such as phase wrapped between the range [-180, 180) degrees, or phase can be represented in an unwrapped manner. You can specify the phase representation by configuring Sparams Phase Trace Type.

Complex (2)

Sets the format of the selected S-Parameter as complex numbers in cartesian co-ordinates.

SWR (3)

Sets the format of the selected S-Parameter to Standing Wave Ratio (SWR). SWR is a unitless quantity.

Smith Impedance (4)

Sets the format of the selected S-Parameter to Smith Impedance. S-Parameter values are transformed into impedence values. Impedence values are expressed in ohms. You can use these values to plot on a Smith Chart.

Smith Admittance (5)

Sets the format of the selected S-Parameter to Smith Admittance. S-Parameter values are transformed into admittance values. Admittance values are expressed in siemens. You can use these values to plot on an Inverted Smith Chart.

Polar (6)

Sets the format of the selected S-Parameter as complex numbers in polar co-ordinates, where the radial axis (i.e., magnitude of the complex numbers) is always in linear scale and angular axis (phase) is represented in degrees and always wrapped between ±180 deg.

Group Delay (7)

Sets the format of the selected S-Parameter to Group Delay. Group delay represents the time it takes for the signal to pass through a device under test. The delay is expressed in seconds. Group delay vs. frequency is derived from phase vs. frequency response. At a given frequency point, group delay is computed by selecting two nearby frequency points and taking the ratio of the phase difference to the frequency separation between them. The frequency separation between the two selected points is called the group delay aperture. You can control the aperture by first configuring SParams Group Delay Aperture Mode and once the mode is selected, you can set the aperture by configuring SParams Group Delay Aperture Points, SParams Group Delay Aperture Percentage or SParams Group Delay Aperture Frequency Span. For example, if the number of aperture points is equal to 3, then group delay at a nth frequency point is computed by selecting the (n-1)th frequency point and (n+1)th frequency point.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (enums.SParamsFormat):

Specifies the format of 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_group_delay_aperture_frequency_span(selector_string)[source]

Gets the group delay aperture in terms of the frequency separation between the two frequency points selected for group delay computation for all S-Parameters for which SPARAMS_FORMAT attribute is set to Group Delay and SPARAMS_GROUP_DELAY_APERTURE_MODE attribute is set to Frequency Span.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is 50 MHz.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Specifies the group delay aperture in terms of the frequency separation between the two frequency points selected for group delay computation for all S-Parameters for which SPARAMS_FORMAT attribute is set to Group Delay and SPARAMS_GROUP_DELAY_APERTURE_MODE attribute is set to Frequency Span.

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

Gets the aperture mode to be used for the computation of group delay for all S-Parameters for which SPARAMS_FORMAT attribute is set to Group Delay.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is Points.

Name (Value)

Description

Points (0)

Sets group delay aperture mode to Points. You can specify the aperture in terms of the number of frequency points by configuring SParams Group Delay Aperture Points.

Percentage (1)

Sets group delay aperture mode to Percentage. You can specify the aperture in terms of the frequency separation expressed in percentage by configuring SParams Group Delay Aperture Percentage.

Frequency Span (2)

Sets group delay aperture to Frequency Span. You can specify the aperture in terms of the frequency separation by configuring SParams Group Delay Aperture Frequency Span.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (enums.SParamsGroupDelayApertureMode):

Specifies the aperture mode to be used for the computation of group delay for all S-Parameters for which SPARAMS_FORMAT attribute is set to Group Delay.

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

Gets the group delay aperture in terms of the frequency separation between the two frequency points selected for group delay computation, where separation is expressed as a percentage of the total measurement frequency range for all S-Parameters for which SPARAMS_FORMAT attribute is set to Group Delay and SPARAMS_GROUP_DELAY_APERTURE_MODE attribute is set to Percentage.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is 5 %.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Specifies the group delay aperture in terms of the frequency separation between the two frequency points selected for group delay computation, where separation is expressed as a percentage of the total measurement frequency range for all S-Parameters for which SPARAMS_FORMAT attribute is set to Group Delay and SPARAMS_GROUP_DELAY_APERTURE_MODE attribute is set to Percentage.

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

Gets the group delay aperture in terms of the number of frequency points that separates the two frequency points for all S-Parameters for which SPARAMS_FORMAT attribute is set to Group Delay and SPARAMS_GROUP_DELAY_APERTURE_MODE attribute is set to Points. You must set the value of this attribute between 2 and the total number of frequency points in the measurement frequency range.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is 11.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (float):

Specifies the group delay aperture in terms of the number of frequency points that separates the two frequency points for all S-Parameters for which SPARAMS_FORMAT attribute is set to Group Delay and SPARAMS_GROUP_DELAY_APERTURE_MODE attribute is set to Points. You must set the value of this attribute between 2 and the total number of frequency points in the measurement frequency range.

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

Gets the magnitude units for all S-Parameters for which you set SPARAMS_FORMAT attribute to Magnitude.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is dB.

Name (Value)

Description

dB (0)

Sets S-Parameter magnitude units to dB.

Linear (1)

Sets S-Parameter magnitude units to linear such that S-Parameters are reported in linear scale (V/V).

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (enums.SParamsMagnitudeUnits):

Specifies the magnitude units for all S-Parameters for which you set SPARAMS_FORMAT attribute to Magnitude.

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

Gets the active measurement memory for performing mathematical operations when several measurement memories are associated with the configured S-Parameter. If only one measurement memory is associated with the configured S-Parameter, that measurement memory will be used for mathematical operations.

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

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (string):

Specifies the active measurement memory for performing mathematical operations when several measurement memories are associated with the configured S-Parameter. If only one measurement memory is associated with the configured S-Parameter, that measurement memory will be used for mathematical operations.

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

Gets the mathematical operation between the configured S-Parameter and its active measurement memory. All mathematical operations are applied on complex data before being formatted.

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

The default value is Off.

Name (Value)

Description

Off (0)

No mathematical operation is performed.

Add (1)

Data in measurement memory is added to S-Parameter data.

Subtract (2)

Data in measurement memory is subtracted from S-Parameter data.

Multiply (3)

S-Parameter data is multiplied by the data in measurement memory.

Divide (4)

S-Parameter data is divided by the data in measurement memory.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (enums.SParamsMathFunction):

Specifies the mathematical operation between the configured S-Parameter and its active measurement memory. All mathematical operations are applied on complex data before being formatted.

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

Gets whether to enable the Sparams measurement.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is False.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (bool):

Specifies whether to enable the Sparams 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_number_of_s_parameters(selector_string)[source]

Gets the number of S-Parameters to measure.

Note1: S-Parameters of a N-port DUT can be represented by N^2 canonical S-Parameters viz. S11, S12,…,S1N, S21, S22,…,S2N, SN1, SN2,…,SNN such that B = S A where S denotes the S-Parameter matrix with Sij being the element in the ithrow and jthcolumn. Similarly A denotes the matrix composed of the incident waves. Element Aij denotes the wave parameter aiji.e., wave measured at the reference reciever on port <i> with port <j> as the source. Similarly B denotes the matrix composed of the scatterred waves. Element Bij denotes the wave parameter biji.e., wave measured at the test reciever on port <i> with port <j> as the source.

You can configure each measured S-Parameter in RFmxVNA SParams measurement to be returned in one of several supported formats using SPARAMS_FORMAT attribute. Example1: If you want to fetch magnitude and phase information of S11, then set Number of S-Parameters attribute to 2, then for both SParam indices 0 and 1, set Parameter attribute to “S11”. Then set SPARAMS_FORMAT attribute to Magnitude for Sparam index 0 and to Phase for SParam index 1.

Note2: You can set many SParam indices to share the same Parameter and Format attribute values making them duplicates of each other.

If you increase this attribute value from N to N+K, then existing N SParams are not affected but K new SParams are added. If you reduce number of SParams from N to N-K, then last K SParams are deleted without affecting the remaining N-K SParams.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is 1.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (int):

Specifies the number of S-Parameters to measure.

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

Gets the phase type for all S-Parameters for which SPARAMS_FORMAT attribute is set to Phase. Phase can be represented in two mathematically equivalent ways viz. phase wrapped between the range [-180, 180) degrees, and phase can be represented in an unwrapped manner.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is Wrapped.

Name (Value)

Description

Wrapped (0)

The reported S-Parameter phase is wrapped between -180 degress to +180 degrees.

Unwrapped (1)

The reported S-Parameter phase is unwrapped.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (enums.SParamsPhaseTraceType):

Specifies the phase type for all S-Parameters for which SPARAMS_FORMAT attribute is set to Phase. Phase can be represented in two mathematically equivalent ways viz. phase wrapped between the range [-180, 180) degrees, and phase can be represented in an unwrapped manner.

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

Gets the receiver port name of the S-Parameter. S-Parameter is denoted by “S_<receiver port name>_<source port name>”.

For example, to measure S21, set this attribute to “port2”.

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

The default value is “port1”.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (string):

Specifies the receiver port name of the S-Parameter. S-Parameter is denoted by “S_<receiver port name>_<source port name>”.

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

Returns the S-Parameter being measured in format S(receiver port number)(source port number)

Use “sparam(n)” as the selector string for this method.

Supported devices: NI PXIe-5633

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.

Returns:

s_parameter (string):

This parameter returns the S-Parameter being measured in format S<receiver port number><source port number>.

error_code (int):

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

Return type:

Tuple (s_parameter, error_code)

get_snp_data_format(selector_string)[source]

Gets the format in which the measured S-parameters are saved in a SnP file.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is Auto.

Name (Value)

Description

Auto (0)

RFmx automatically selects the appropriate SnP Data Format based on the value specified for SParams Format attribute. If you set SParams Format to Complex or SWR or Smith Impedence or Smith Admittance or Group Delay, S-parameters are saved in the Real-Imaginary format. If you set SParams Format to Magnitude, S-parameters are saved as either Log Magnitude-Angle or Linear Magnitude-Angle according to SParams Magnitude Units. If you set SParams Format to Phase or Polar, S-parameters are saved as Linear Magnitude-Angle by default.

Log Magnitude-Angle (1)

All available S-parameters are represented as a pair of columns - first column stores magnitude of a S-Parameter in log scale (dB) and second column stores phase of the S-Parameter in degrees.

Real-Imaginary (2)

All available S-parameters are represented as a pair of columns - first column stores real part of the complex-valued S-Parameter and second column stores imaginary part.

Linear Magnitude-Angle (3)

All available S-parameters are represented as a pair of columns - first column stores magnitude of a S-Parameter in linear scale (V/V) and second column stores phase of the S-Parameter in degrees.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (enums.SParamsSnPDataFormat):

Specifies the format in which the measured S-parameters are saved in a SnP file.

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

Gets the ports for which the measured S-parameters are saved to file.

You do not need to use a selector string to configure or read this attribute for the default signal 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 (string):

Specifies the ports for which the measured S-parameters are saved to file.

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

Gets a string that is incorporated into saved SnP file. You can specify any arbitrary string to add any meta information that you may want to store along with the measured S-Parameters data in SnP file. RFmx automatically adds a special token(!) at the start of this string such that any standard SnP file parsers would ignore this line. Additionally, multiline comments are allowed and each line is appended with the next line escape character.

You do not need to use a selector string to configure or read this attribute for the default signal 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 (string):

Specifies a string that is incorporated into saved SnP file. You can specify any arbitrary string to add any meta information that you may want to store along with the measured S-Parameters data in SnP file. RFmx automatically adds a special token(!) at the start of this string such that any standard SnP file parsers would ignore this line. Additionally, multiline comments are allowed and each line is appended with the next line escape character.

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

Gets the source port name of the S-Parameter. S-Parameter is denoted by “S_<receiver port name>_<source port name>”.

For example, to measure S21, set this attribute to “port1”.

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

The default value is “port1”.

Parameters:

selector_string (string) – Pass an empty string.

Returns:

attr_val (string):

Specifies the source port name of the S-Parameter. S-Parameter is denoted by “S_<receiver port name>_<source port name>”.

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)

set_format(selector_string, value)[source]

Sets the format of S-Parameter measurement.

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

The default value is Magnitude.

Name (Value)

Description

Magnitude (0)

Sets the format of the selected S-Parameter to Magnitude. You can specify SParams Magnitude Units.

Phase (1)

Sets the format of the selected S-Parameter to Phase. Phase values are expressed in degrees. Phase can be represented in various, mathematically equivalent ways such as phase wrapped between the range [-180, 180) degrees, or phase can be represented in an unwrapped manner. You can specify the phase representation by configuring Sparams Phase Trace Type.

Complex (2)

Sets the format of the selected S-Parameter as complex numbers in cartesian co-ordinates.

SWR (3)

Sets the format of the selected S-Parameter to Standing Wave Ratio (SWR). SWR is a unitless quantity.

Smith Impedance (4)

Sets the format of the selected S-Parameter to Smith Impedance. S-Parameter values are transformed into impedence values. Impedence values are expressed in ohms. You can use these values to plot on a Smith Chart.

Smith Admittance (5)

Sets the format of the selected S-Parameter to Smith Admittance. S-Parameter values are transformed into admittance values. Admittance values are expressed in siemens. You can use these values to plot on an Inverted Smith Chart.

Polar (6)

Sets the format of the selected S-Parameter as complex numbers in polar co-ordinates, where the radial axis (i.e., magnitude of the complex numbers) is always in linear scale and angular axis (phase) is represented in degrees and always wrapped between ±180 deg.

Group Delay (7)

Sets the format of the selected S-Parameter to Group Delay. Group delay represents the time it takes for the signal to pass through a device under test. The delay is expressed in seconds. Group delay vs. frequency is derived from phase vs. frequency response. At a given frequency point, group delay is computed by selecting two nearby frequency points and taking the ratio of the phase difference to the frequency separation between them. The frequency separation between the two selected points is called the group delay aperture. You can control the aperture by first configuring SParams Group Delay Aperture Mode and once the mode is selected, you can set the aperture by configuring SParams Group Delay Aperture Points, SParams Group Delay Aperture Percentage or SParams Group Delay Aperture Frequency Span. For example, if the number of aperture points is equal to 3, then group delay at a nth frequency point is computed by selecting the (n-1)th frequency point and (n+1)th frequency point.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (enums.SParamsFormat, int) – Specifies the format of S-Parameter measurement.

Returns:

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

Return type:

int

set_group_delay_aperture_frequency_span(selector_string, value)[source]

Sets the group delay aperture in terms of the frequency separation between the two frequency points selected for group delay computation for all S-Parameters for which SPARAMS_FORMAT attribute is set to Group Delay and SPARAMS_GROUP_DELAY_APERTURE_MODE attribute is set to Frequency Span.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is 50 MHz.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (float) – Specifies the group delay aperture in terms of the frequency separation between the two frequency points selected for group delay computation for all S-Parameters for which SPARAMS_FORMAT attribute is set to Group Delay and SPARAMS_GROUP_DELAY_APERTURE_MODE attribute is set to Frequency Span.

Returns:

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

Return type:

int

set_group_delay_aperture_mode(selector_string, value)[source]

Sets the aperture mode to be used for the computation of group delay for all S-Parameters for which SPARAMS_FORMAT attribute is set to Group Delay.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is Points.

Name (Value)

Description

Points (0)

Sets group delay aperture mode to Points. You can specify the aperture in terms of the number of frequency points by configuring SParams Group Delay Aperture Points.

Percentage (1)

Sets group delay aperture mode to Percentage. You can specify the aperture in terms of the frequency separation expressed in percentage by configuring SParams Group Delay Aperture Percentage.

Frequency Span (2)

Sets group delay aperture to Frequency Span. You can specify the aperture in terms of the frequency separation by configuring SParams Group Delay Aperture Frequency Span.

Parameters:
Returns:

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

Return type:

int

set_group_delay_aperture_percentage(selector_string, value)[source]

Sets the group delay aperture in terms of the frequency separation between the two frequency points selected for group delay computation, where separation is expressed as a percentage of the total measurement frequency range for all S-Parameters for which SPARAMS_FORMAT attribute is set to Group Delay and SPARAMS_GROUP_DELAY_APERTURE_MODE attribute is set to Percentage.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is 5 %.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (float) – Specifies the group delay aperture in terms of the frequency separation between the two frequency points selected for group delay computation, where separation is expressed as a percentage of the total measurement frequency range for all S-Parameters for which SPARAMS_FORMAT attribute is set to Group Delay and SPARAMS_GROUP_DELAY_APERTURE_MODE attribute is set to Percentage.

Returns:

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

Return type:

int

set_group_delay_aperture_points(selector_string, value)[source]

Sets the group delay aperture in terms of the number of frequency points that separates the two frequency points for all S-Parameters for which SPARAMS_FORMAT attribute is set to Group Delay and SPARAMS_GROUP_DELAY_APERTURE_MODE attribute is set to Points. You must set the value of this attribute between 2 and the total number of frequency points in the measurement frequency range.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is 11.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (float) – Specifies the group delay aperture in terms of the number of frequency points that separates the two frequency points for all S-Parameters for which SPARAMS_FORMAT attribute is set to Group Delay and SPARAMS_GROUP_DELAY_APERTURE_MODE attribute is set to Points. You must set the value of this attribute between 2 and the total number of frequency points in the measurement frequency range.

Returns:

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

Return type:

int

set_magnitude_units(selector_string, value)[source]

Sets the magnitude units for all S-Parameters for which you set SPARAMS_FORMAT attribute to Magnitude.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is dB.

Name (Value)

Description

dB (0)

Sets S-Parameter magnitude units to dB.

Linear (1)

Sets S-Parameter magnitude units to linear such that S-Parameters are reported in linear scale (V/V).

Parameters:
Returns:

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

Return type:

int

set_math_active_measurement_memory(selector_string, value)[source]

Sets the active measurement memory for performing mathematical operations when several measurement memories are associated with the configured S-Parameter. If only one measurement memory is associated with the configured S-Parameter, that measurement memory will be used for mathematical operations.

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

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (string) – Specifies the active measurement memory for performing mathematical operations when several measurement memories are associated with the configured S-Parameter. If only one measurement memory is associated with the configured S-Parameter, that measurement memory will be used for mathematical operations.

Returns:

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

Return type:

int

set_math_function(selector_string, value)[source]

Sets the mathematical operation between the configured S-Parameter and its active measurement memory. All mathematical operations are applied on complex data before being formatted.

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

The default value is Off.

Name (Value)

Description

Off (0)

No mathematical operation is performed.

Add (1)

Data in measurement memory is added to S-Parameter data.

Subtract (2)

Data in measurement memory is subtracted from S-Parameter data.

Multiply (3)

S-Parameter data is multiplied by the data in measurement memory.

Divide (4)

S-Parameter data is divided by the data in measurement memory.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (enums.SParamsMathFunction, int) – Specifies the mathematical operation between the configured S-Parameter and its active measurement memory. All mathematical operations are applied on complex data before being formatted.

Returns:

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

Return type:

int

set_measurement_enabled(selector_string, value)[source]

Sets whether to enable the Sparams measurement.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is False.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (bool) – Specifies whether to enable the Sparams measurement.

Returns:

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

Return type:

int

set_number_of_s_parameters(selector_string, value)[source]

Sets the number of S-Parameters to measure.

Note1: S-Parameters of a N-port DUT can be represented by N^2 canonical S-Parameters viz. S11, S12,…,S1N, S21, S22,…,S2N, SN1, SN2,…,SNN such that B = S A where S denotes the S-Parameter matrix with Sij being the element in the ithrow and jthcolumn. Similarly A denotes the matrix composed of the incident waves. Element Aij denotes the wave parameter aiji.e., wave measured at the reference reciever on port <i> with port <j> as the source. Similarly B denotes the matrix composed of the scatterred waves. Element Bij denotes the wave parameter biji.e., wave measured at the test reciever on port <i> with port <j> as the source.

You can configure each measured S-Parameter in RFmxVNA SParams measurement to be returned in one of several supported formats using SPARAMS_FORMAT attribute. Example1: If you want to fetch magnitude and phase information of S11, then set Number of S-Parameters attribute to 2, then for both SParam indices 0 and 1, set Parameter attribute to “S11”. Then set SPARAMS_FORMAT attribute to Magnitude for Sparam index 0 and to Phase for SParam index 1.

Note2: You can set many SParam indices to share the same Parameter and Format attribute values making them duplicates of each other.

If you increase this attribute value from N to N+K, then existing N SParams are not affected but K new SParams are added. If you reduce number of SParams from N to N-K, then last K SParams are deleted without affecting the remaining N-K SParams.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is 1.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (int) – Specifies the number of S-Parameters to measure.

Returns:

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

Return type:

int

set_phase_trace_type(selector_string, value)[source]

Sets the phase type for all S-Parameters for which SPARAMS_FORMAT attribute is set to Phase. Phase can be represented in two mathematically equivalent ways viz. phase wrapped between the range [-180, 180) degrees, and phase can be represented in an unwrapped manner.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is Wrapped.

Name (Value)

Description

Wrapped (0)

The reported S-Parameter phase is wrapped between -180 degress to +180 degrees.

Unwrapped (1)

The reported S-Parameter phase is unwrapped.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (enums.SParamsPhaseTraceType, int) – Specifies the phase type for all S-Parameters for which SPARAMS_FORMAT attribute is set to Phase. Phase can be represented in two mathematically equivalent ways viz. phase wrapped between the range [-180, 180) degrees, and phase can be represented in an unwrapped manner.

Returns:

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

Return type:

int

set_receiver_port(selector_string, value)[source]

Sets the receiver port name of the S-Parameter. S-Parameter is denoted by “S_<receiver port name>_<source port name>”.

For example, to measure S21, set this attribute to “port2”.

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

The default value is “port1”.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (string) – Specifies the receiver port name of the S-Parameter. S-Parameter is denoted by “S_<receiver port name>_<source port name>”.

Returns:

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

Return type:

int

set_snp_data_format(selector_string, value)[source]

Sets the format in which the measured S-parameters are saved in a SnP file.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

The default value is Auto.

Name (Value)

Description

Auto (0)

RFmx automatically selects the appropriate SnP Data Format based on the value specified for SParams Format attribute. If you set SParams Format to Complex or SWR or Smith Impedence or Smith Admittance or Group Delay, S-parameters are saved in the Real-Imaginary format. If you set SParams Format to Magnitude, S-parameters are saved as either Log Magnitude-Angle or Linear Magnitude-Angle according to SParams Magnitude Units. If you set SParams Format to Phase or Polar, S-parameters are saved as Linear Magnitude-Angle by default.

Log Magnitude-Angle (1)

All available S-parameters are represented as a pair of columns - first column stores magnitude of a S-Parameter in log scale (dB) and second column stores phase of the S-Parameter in degrees.

Real-Imaginary (2)

All available S-parameters are represented as a pair of columns - first column stores real part of the complex-valued S-Parameter and second column stores imaginary part.

Linear Magnitude-Angle (3)

All available S-parameters are represented as a pair of columns - first column stores magnitude of a S-Parameter in linear scale (V/V) and second column stores phase of the S-Parameter in degrees.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (enums.SParamsSnPDataFormat, int) – Specifies the format in which the measured S-parameters are saved in a SnP file.

Returns:

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

Return type:

int

set_snp_ports(selector_string, value)[source]

Sets the ports for which the measured S-parameters are saved to file.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (string) – Specifies the ports for which the measured S-parameters are saved to file.

Returns:

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

Return type:

int

set_snp_user_comment(selector_string, value)[source]

Sets a string that is incorporated into saved SnP file. You can specify any arbitrary string to add any meta information that you may want to store along with the measured S-Parameters data in SnP file. RFmx automatically adds a special token(!) at the start of this string such that any standard SnP file parsers would ignore this line. Additionally, multiline comments are allowed and each line is appended with the next line escape character.

You do not need to use a selector string to configure or read this attribute for the default signal instance. Refer to the Selector String topic for information about the string syntax for named signals.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (string) – Specifies a string that is incorporated into saved SnP file. You can specify any arbitrary string to add any meta information that you may want to store along with the measured S-Parameters data in SnP file. RFmx automatically adds a special token(!) at the start of this string such that any standard SnP file parsers would ignore this line. Additionally, multiline comments are allowed and each line is appended with the next line escape character.

Returns:

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

Return type:

int

set_source_port(selector_string, value)[source]

Sets the source port name of the S-Parameter. S-Parameter is denoted by “S_<receiver port name>_<source port name>”.

For example, to measure S21, set this attribute to “port1”.

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

The default value is “port1”.

Parameters:
  • selector_string (string) – Pass an empty string.

  • value (string) – Specifies the source port name of the S-Parameter. S-Parameter is denoted by “S_<receiver port name>_<source port name>”.

Returns:

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

Return type:

int