# skrf.media.media.Media¶

class skrf.media.media.Media(frequency=None, z0=None)[source]

Abstract Base Class for a single mode on a transmission line media.

This class init’s with frequency and z0 (the port impedance); attributes shared by all media. Methods defined here make use of the properties :

• gamma - (complex) propgation constant
• Z0 - (complex) characteristic impedance

Which define the properties of specific media. Any sub-class of Media must implement these properties. gamma and Z0 should return complex arrays of the same length as frequency. gamma must follow the convention,

• positive real(gamma) = attenuation
• positive imag(gamma) = forward propagation
Parameters: frequency (Frequency object) – frequency band of this transmission line medium. If None, will default to 1-10ghz,
z0 : number, array-like, or None
the port impedance for media. Only needed if its different from the characterisitc impedance of the transmission line. if z0 is None then will default to Z0

Notes

The z0 parameter is needed in some cases. RectangularWaveguide is an example where you may need this, because the characteristic impedance is frequency dependent, but the touchstone’s created by most VNA’s have z0=1, or 50. so to prevent accidental impedance mis-match, you may want to manually set the z0 .

Attributes

 Z0 alpha real (attenuation) component of gamma beta imaginary (propagating) component of gamma gamma Propagation constant npoints v_g Complex group velocity (in m/s) v_p Complex phase velocity (in m/s) z0

Methods

 __init__ Initialize self. attenuator Ideal matched attenuator of a given length capacitor Capacitor copy delay_load Delayed load delay_open Delayed open transmission line delay_short Delayed Short electrical_length calculates the electrical length for a given distance extract_distance Determines physical distance from a transmission or reflection ntwk get_array_of impedance_mismatch Two-port network for an impedance mismatch inductor Inductor isolator two-port isolator line Transmission line of a given length and impedance load Load of given reflection coefficient. lossless_mismatch Lossless, symmetric mismatch defined by its return loss match Perfect matched load ($$\Gamma_0 = 0$$). mode create another mode in this medium open Open ($$\Gamma_0 = 1$$) plot random Complex random network. resistor Resistor short Short ($$\Gamma_0 = -1$$) shunt Shunts a Network shunt_capacitor Shunted capacitor shunt_delay_load Shunted delayed load shunt_delay_open Shunted delayed open shunt_delay_short Shunted delayed short shunt_inductor Shunted inductor splitter Ideal, lossless n-way splitter. tee Ideal, lossless tee. theta_2_d Converts electrical length to physical distance. thru Matched transmission line of length 0. to_meters Translate various units of distance into meters white_gaussian_polar Complex zero-mean gaussian white-noise network. write_csv write this media’s frequency,gamma,Z0, and z0 to a csv file.