y_to_s_matrix
y_to_s_matrix(y_matrix, impedances=50.0)Convert a Y-matrix (admittance matrix) to an S-matrix (scattering matrix).
Uses the travelling-wave S-parameter convention:
where .
This is a direct conversion (more efficient than Y→Z→S).
Note
The |v_0|/v_0 phase correction factor from the full
travelling-wave definition is omitted. This is exact for lossless
reference media and an excellent approximation for low-loss ports.
Args
- y_matrix (YMatrix): The admittance matrix to convert.
- impedances (complex | float | dict[str, complex | float]): Reference impedance(s). If a single number, all terminals use the same impedance. If a dict, maps terminal names to their reference impedances. Defaults to 50.0.
Returns
SMatrix: The converted scattering matrix.