skrf.io.touchstone.hfss_touchstone_2_gamma_z0

skrf.io.touchstone.hfss_touchstone_2_gamma_z0(filename)[source]

Extracts Z0 and Gamma comments from touchstone file.

Takes a HFSS-style Touchstone file with Gamma and Z0 comments and extracts a triplet of arrays being: (frequency, Gamma, Z0)

Parameters:

filename (string) – the HFSS-style Touchstone file

Returns:

  • f (npy.ndarray) – frequency vector (in Hz)

  • gamma (complex npy.ndarray) – complex propagation constant

  • z0 (npy.ndarray) – complex port impedance

Return type:

tuple[ndarray, ndarray, ndarray]

Examples

>>> f,gamm,z0 = rf.hfss_touchstone_2_gamma_z0('line.s2p')