edges.cal.sparams.core.sparam_calibration

Functions for calibrating S-parameter measurements.

Functions for de-embedding and embedding 2-port networks, as well as generating S-parameters from calkit measurements.

edges.cal.sparams.core.sparam_calibration.average_reflection_coefficients(s: Sequence[ReflectionCoefficient]) ReflectionCoefficient[source]

Average multiple reflection coefficients.

edges.cal.sparams.core.sparam_calibration.average_sparams(s: Sequence[SParams]) SParams[source]

Average multiple reflection coefficients.

edges.cal.sparams.core.sparam_calibration.de_embed_network_from_calkit_measurements(measurements: CalkitReadings, sparams: SParams) CalkitReadings[source]

Compute the S-parameters of a 2-port network from calkit measurements.

This is a convenience wrapper around sparams_from_calkit_measurements().

Parameters:
  • measurements – The actual measurements of the calkit standards.

  • model – A model of the calkit standards. If None, ideal standards are assumed.

edges.cal.sparams.core.sparam_calibration.gamma2impedance(gamma: float | ndarray, z0: float | ndarray) float | ndarray[source]

Convert reflection coeffient to impedance.

See Eq. 19 of Monsalve et al. 2016.

Parameters:
  • gamma – Reflection coefficient.

  • z0 – Reference impedance.

Returns:

z – The impedance.

edges.cal.sparams.core.sparam_calibration.gamma_de_embed(gamma: ReflectionCoefficient, sparams: SParams) ReflectionCoefficient[source]

Remove the effect of a 2-port network from a reflection coefficient.

See Eq. 2 of Monsalve et al., 2016 or https://en.wikipedia.org/wiki/Scattering_parameters#S-parameters_in_amplifier_design

Parameters:
  • gamma – The reflection coefficient measured at the reference plane “in front” of the 2-port network / subsystem. The shape should be (N,), where N is the number of frequency points.

  • sparams – The S-matrix of the 2-port network / subsystem. The shape should be (2, 2, N), where N is the number of frequency points.

Returns:

gamma_de_embedded – The reflection coefficient at the desired reference plane, on the other side of the 2-port network. The shape is (N,), where N is the number of frequency points.

See also

gamma_embed

The inverse function to this one.

Notes

Given the reflection coefficient observed at a reference plane on one side of an electrical component/subsystem, this function returns the reflection coefficient at the reference plane on the other side of the subsystem:

 ---         ------------
|VNA| ---|---| SUBSYTEM |---|---
 ---         ------------
         ^                  ^
         |                  |
     MEAS. REF.          DESIRED REF.
       PLANE               PLANE
edges.cal.sparams.core.sparam_calibration.gamma_embed(gamma: ReflectionCoefficient, sparams: SParams) ReflectionCoefficient[source]

Add the effect of a 2-port network to a reflection coefficient.

See notes for gamma_de_embed(). This is the inverse function to that one.

Parameters:
  • sparams – The S-matrix of the two-port networok. Shape should be (2, 2, N), where N is the number of frequency points.

  • gamma – The reflection coefficient at the referance plan on one side of the 2-port network. Shape should be (N,), where N is the number of frequency points.

Returns:

gamma_ref – The reflection coefficient at the reference plane on the other side of the 2-port network. Shape is (N,), where N is the number of frequency points.

See also

gamma_de_embed

The inverse function to this one.

edges.cal.sparams.core.sparam_calibration.impedance2gamma(z: float | ndarray, z0: float | ndarray) float | ndarray[source]

Convert impedance to reflection coefficient.

See Eq. 19 of Monsalve et al. 2016.

Parameters:
  • z – Impedance.

  • z0 – Reference impedance.

Returns:

gamma – The reflection coefficient.

edges.cal.sparams.core.sparam_calibration.sparams_from_calkit_measurements(measurements: CalkitReadings, model: CalkitReadings | None = None) SParams[source]

Compute S-parameters of a 2-port network from calkit measurements.

This uses Eq. 3 of Monsalve et al., 2016.

Parameters:
  • measurements – The actual measurements of the calkit standards.

  • model – A model of the calkit standards. If None, ideal standards are assumed.