calc_vswr
- pysmithchart.utils.calc_vswr(Z_0, Z_L)[source]
Computes VSWR for a load impedance referenced to Z0.
This is a convenience wrapper that computes the reflection coefficient:
Γ = (Z_L - Z_0) / (Z_L + Z_0)
then converts its magnitude to VSWR:
This function assumes the standard lossless relationship between VSWR and the reflection coefficient magnitude.
- Parameters:
Z_0 – Reference (characteristic) impedance Z0 in ohms. Typically a real, positive number (e.g., 50 or 75). May be complex, but many transmission-line interpretations assume real Z0.
Z_L – Load impedance in ohms. May be complex.
- Returns:
The VSWR (a real, non-negative float). For a perfect match, VSWR = 1. As the mismatch approaches |Γ| -> 1, VSWR grows without bound.