skrf.network.Network
- class skrf.network.Network(file=None, name=None, params=None, comments=None, f_unit=None, s_def=None, **kwargs)[source]
An n-port electrical network.
For instructions on how to create Network see
__init__()
. An n-port network [1] may be defined by three quantities * network parameter matrix (s, z, or y-matrix) * port characteristic impedance matrix * frequency informationThe
Network
class stores these data structures internally in the form of complexnumpy.ndarray
’s. These arrays are not interfaced directly but instead through the use of the properties:Property
Meaning
Scattering parameter matrix.
Characteristic impedance matrix.
Frequency vector.
Although these docs focus on s-parameters, other equivalent network representations such as
z
andy
are available. Scalar projections of the complex network parameters are accessible through properties as well. These also returnnumpy.ndarray
’s.Property
Meaning
Real part of the s-matrix.
Imaginary part of the s-matrix.
Magnitude of the s-matrix.
Magnitude in log scale of the s-matrix.
Phase of the s-matrix in degrees.
The following operations act on the networks s-matrix.
Operator
Function
+
Element-wise addition of the s-matrix.
-
Element-wise difference of the s-matrix.
*
Element-wise multiplication of the s-matrix.
/
Element-wise division of the s-matrix.
**
Cascading (only for 2-ports).
//
De-embedding (for 2-ports, see
inv
).Different components of the
Network
can be visualized through various plotting methods. These methods can be used to plot individual elements of the s-matrix or all at once. For more info about plotting see the Plotting tutorial.Method
Meaning
Plot complex s-parameters on smith chart.
Plot real part of s-parameters vs frequency.
Plot imaginary part of s-parameters vs frequency.
Plot magnitude of s-parameters vs frequency.
Plot magnitude (in dB) of s-parameters vs frequency.
Plot phase of s-parameters (in degrees) vs frequency.
Plot phase of s-parameters (in unwrapped degrees) vs frequency.
Network
objects can be created from a touchstone or pickle file (see__init__()
), by aMedia
object, or manually by assigning the network properties directly.Network
objects can be saved to disk in the form of touchstone files with thewrite_touchstone()
method.An exhaustive list of
Network
Methods and Properties (Attributes) are given belowReferences
Attributes
Component functions like 're', 'im', 'mag', 'db', etc. |
|
Primary Network Properties list like 's', 'z', 'y', etc. |
|
Y-axis labels to the plotting functions. |
|
abcd parameter matrix. |
|
The arcl component of the a-matrix. |
|
The arcl_unwrap component of the a-matrix. |
|
The db component of the a-matrix. |
|
The db10 component of the a-matrix. |
|
The deg component of the a-matrix. |
|
The deg_unwrap component of the a-matrix. |
|
The im component of the a-matrix. |
|
The mag component of the a-matrix. |
|
The rad component of the a-matrix. |
|
The rad_unwrap component of the a-matrix. |
|
The re component of the a-matrix. |
|
The time component of the a-matrix. |
|
The time_db component of the a-matrix. |
|
The time_impulse component of the a-matrix. |
|
The time_mag component of the a-matrix. |
|
The time_step component of the a-matrix. |
|
The vswr component of the a-matrix. |
|
The frequency vector for the network, in Hz. |
|
The frequency vector for the noise of the network, in Hz. |
|
Frequency information for the network. |
|
The optimum source reflection coefficient to minimize noise. |
|
Group delay. |
|
Hybrid parameter matrix. |
|
The arcl component of the h-matrix. |
|
The arcl_unwrap component of the h-matrix. |
|
The db component of the h-matrix. |
|
The db10 component of the h-matrix. |
|
The deg component of the h-matrix. |
|
The deg_unwrap component of the h-matrix. |
|
The im component of the h-matrix. |
|
The mag component of the h-matrix. |
|
The rad component of the h-matrix. |
|
The rad_unwrap component of the h-matrix. |
|
The re component of the h-matrix. |
|
The time component of the h-matrix. |
|
The time_db component of the h-matrix. |
|
The time_impulse component of the h-matrix. |
|
The time_mag component of the h-matrix. |
|
The time_step component of the h-matrix. |
|
The vswr component of the h-matrix. |
|
A |
|
Maximum available power gain for K > 1 and maximum stable power gain for K <= 1 (in linear). |
|
Maximum stable power gain (in linear). |
|
The ABCD form of the noise correlation matrix for the network. |
|
The minimum noise figure for the network. |
|
The minimum noise figure for the network in dB. |
|
Whether this network has noise. |
|
The number of ports the network has. |
|
The number of ports the network has. |
|
Passivity metric for a multi-port network. |
|
Array of size nports with the mode of each port. |
|
Returns a list of tuples, for each port index pair. |
|
Reciprocity metric for a multi-port network. |
|
Reciprocity metric #2 |
|
The equivalent noise resistance for the network. |
|
Scattering parameter matrix. |
|
The arcl component of the s-matrix. |
|
The arcl_unwrap component of the s-matrix. |
|
The db component of the s-matrix. |
|
The db10 component of the s-matrix. |
|
The deg component of the s-matrix. |
|
The deg_unwrap component of the s-matrix. |
|
The im component of the s-matrix. |
|
Inverted scattering parameter matrix. |
|
The mag component of the s-matrix. |
|
Scattering parameter matrix with s_def = 'power'. |
|
Scattering parameter matrix with s_def = 'pseudo'. |
|
The rad component of the s-matrix. |
|
The rad_unwrap component of the s-matrix. |
|
The re component of the s-matrix. |
|
The time component of the s-matrix. |
|
The time_db component of the s-matrix. |
|
The time_impulse component of the s-matrix. |
|
The time_mag component of the s-matrix. |
|
The time_step component of the s-matrix. |
|
Scattering parameter matrix with s_def = 'traveling'. |
|
The vswr component of the s-matrix. |
|
Stability factor. |
|
Scattering transfer parameter matrix. |
|
The arcl component of the t-matrix. |
|
The arcl_unwrap component of the t-matrix. |
|
The db component of the t-matrix. |
|
The db10 component of the t-matrix. |
|
The deg component of the t-matrix. |
|
The deg_unwrap component of the t-matrix. |
|
The im component of the t-matrix. |
|
The mag component of the t-matrix. |
|
The rad component of the t-matrix. |
|
The rad_unwrap component of the t-matrix. |
|
The re component of the t-matrix. |
|
The time component of the t-matrix. |
|
The time_db component of the t-matrix. |
|
The time_impulse component of the t-matrix. |
|
The time_mag component of the t-matrix. |
|
The time_step component of the t-matrix. |
|
The vswr component of the t-matrix. |
|
Mason's unilateral power gain (in linear). |
|
Admittance parameter matrix. |
|
The arcl component of the y-matrix. |
|
The arcl_unwrap component of the y-matrix. |
|
The db component of the y-matrix. |
|
The db10 component of the y-matrix. |
|
The deg component of the y-matrix. |
|
The deg_unwrap component of the y-matrix. |
|
The im component of the y-matrix. |
|
The mag component of the y-matrix. |
|
The optimum source admittance to minimize noise. |
|
The rad component of the y-matrix. |
|
The rad_unwrap component of the y-matrix. |
|
The re component of the y-matrix. |
|
The time component of the y-matrix. |
|
The time_db component of the y-matrix. |
|
The time_impulse component of the y-matrix. |
|
The time_mag component of the y-matrix. |
|
The time_step component of the y-matrix. |
|
The vswr component of the y-matrix. |
|
Impedance parameter matrix. |
|
Characteristic impedance[s] of the network ports. |
|
The arcl component of the z-matrix. |
|
The arcl_unwrap component of the z-matrix. |
|
The db component of the z-matrix. |
|
The db10 component of the z-matrix. |
|
The deg component of the z-matrix. |
|
The deg_unwrap component of the z-matrix. |
|
The im component of the z-matrix. |
|
The mag component of the z-matrix. |
|
The optimum source impedance to minimize noise. |
|
The rad component of the z-matrix. |
|
The rad_unwrap component of the z-matrix. |
|
The re component of the z-matrix. |
|
The time component of the z-matrix. |
|
The time_db component of the z-matrix. |
|
The time_impulse component of the z-matrix. |
|
The time_mag component of the z-matrix. |
|
The time_step component of the z-matrix. |
|
The vswr component of the z-matrix. |
Methods
Network constructor. |
|
Adds a complex zero-mean gaussian white-noise. |
|
Add a flatband complex zero-mean gaussian white-noise signal of given standard deviations for magnitude and phase. |
|
Return a copy of this Network. |
|
Copy the contents of another Network into self. |
|
Return a copy of a frequency subset of this Network. |
|
Crop Network based on start and stop frequencies. |
|
Returns a cropped network, leaves self alone. |
|
Add phase delay to a given port. |
|
Drop invalid values based on duplicate and non increasing frequency values. |
|
Extrapolate S-parameters down to 0 Hz and interpolate to uniform spacing. |
|
Swap the ports of a 2n-port Network (inplace). |
|
Returns a flipped network, leaves self alone. |
|
Create a Network from its Z-parameters. |
|
Apply a function parameter matrix, one frequency slice at a time. |
|
Returns loci of gain circles for a given port (0 or 1) and a specified gain. |
|
Transform network from generalized mixed mode parameters [#]_ to single ended parameters. |
|
Calculate time-domain impulse response of one-port. |
|
Interpolate a Network along frequency axis. |
|
Interpolate the current Network along frequency axis (inplace). |
|
Test for losslessness. |
|
Test for passivity. |
|
Test for reciprocity. |
|
Return whether the 2N-port network has n-th order reflection symmetry by checking. |
|
Multiply a complex bivariate gaussian white-noise signal of given standard deviations for magnitude and phase. |
|
The noise figure for the network if the source impedance is z. |
|
Returns loci of noise figure circles for a specified noise figure. |
|
Return dB(NF) foreach gamma_source x noise_frequency. |
|
Normalized non-reciprocity metric. |
|
Perturb s-parameters by small amount. |
|
Plot something vs frequency |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
Plot dB, deg, smith, and complex in subplots. |
|
Plot dB(diag(passivity metric)) vs frequency. |
|
plot the Network attribute |
|
plot the Network attribute |
|
Plot reciprocity metric. |
|
Plot reciprocity metric #2. |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
Plots the scattering parameter on a smith chart. |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
plot the Network attribute |
|
Read a Network from a 'ntwk' file. |
|
Load values from a touchstone file. |
|
Renormalize s-parameter matrix given a new port impedances. |
|
Renumber ports of a Network (inplace). |
|
Return a renumbered Network, leave self alone. |
|
Interpolate the current Network along frequency axis (inplace). |
|
Rotate S-parameters |
|
Returns the active s-parameters of the network for a defined wave excitation a. |
|
Transform network from single ended parameters to generalized mixed mode parameters [#]_. |
|
Set the "A" (ie cascade) representation of the correlation matrix, based on the noise frequency and input parameters. |
|
Returns loci of stability circles for a given port (0 or 1). |
|
Calculate time-domain step response of one-port. |
|
Return a subnetwork of a the Network from a list of port numbers. |
|
Time gate this Network. |
|
Convert attributes of a Network to a pandas DataFrame. |
|
Return the active VSWR of the network for a defined wave excitation a. |
|
Return a windowed version of s-matrix. |
|
Write the Network to disk using the |
|
Write contents of network to a spreadsheet, for your boss to use. |
|
Serialize and convert network to a JSON string. |
|
Write a contents of the |
|
Return the active Y-parameters of the network for a defined wave excitation a. |
|
Return the active Z-parameters of the network for a defined wave excitation a. |
|
Read a Network from a Touchstone file in a ziparchive. |