skrf.network.Network¶
- class skrf.network.Network(file=None, name=None, params=None, comments=None, f_unit=None, s_def='power', **kwargs)[source]¶
A n-port electrical network.
For instructions on how to create Network see
__init__()
. A 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
- Parameters
file (str) –
name (str) –
params (dict) –
comments (str) –
f_unit (str) –
s_def (str) –
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 |
|
The 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 |
|
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 |
|
Default interpolation method. |
|
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. |
|
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. |
|
one-port sub-network. |
|
one-port sub-network. |
|
one-port sub-network. |
|
one-port sub-network. |
|
one-port sub-network. |
|
one-port sub-network. |
|
one-port sub-network. |
|
one-port sub-network. |
|
one-port sub-network. |
|
one-port sub-network. |
|
one-port sub-network. |
|
one-port sub-network. |
|
one-port sub-network. |
|
one-port sub-network. |
|
one-port sub-network. |
|
one-port sub-network. |
|
one-port sub-network. |
|
one-port sub-network. |
|
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 parameters |
|
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 |
|
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. |
|
adds a flatband complex zero-mean gaussian white-noise signal of given standard deviations for magnitude and phase |
|
Returns a copy of this Network |
|
Copies the contents of another Network into self |
|
Returns 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. |
|
Swaps the ports of a 2n-port Network (inplace). |
|
Returns a flipped network, leaves self alone. |
|
Create a Network from its Z-parameters |
|
Applies a function parameter matrix, one frequency slice at a time |
|
Transform network from generalized mixed mode parameters [#]_ to single ended parameters |
|
Calculates 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 |
|
Returns whether the 2N-port network has n-th order reflection symmetry by checking \(S_{i,i} == S_{j,j}\) for appropriate pair(s) of \(i\) and \(j\). |
|
multiplies 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 |
|
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 dB, deg, smith, and complex in subplots. |
|
Plot dB(diag(passivity metric)) vs frequency. |
|
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 |
|
loads values from a touchstone file. |
|
Renormalize s-parameter matrix given a new port impedances. |
|
Renumbers ports of a Network (inplace). |
|
Returns 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 [#]_ |
|
sets the "A" (ie cascade) representation of the correlation matrix, based on the noise frequency and input parameters. |
|
Calculates time-domain step response of one-port. |
|
Returns 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 |
|
Returns 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 |
|
Returns the active Y-parameters of the network for a defined wave excitation a. |
|
Returns the active Z-parameters of the network for a defined wave excitation a. |
|
read a Network from a Touchstone file in a ziparchive |