Represents a n-port microwave network.
z0: characteristic impedance f: frequency vector in Hz. see also frequency, which is a
Frequency object (see help on this class for more info)
various other network properties are accesable as well as plotting routines are also defined for convenience,
most properties are derived from the specifications given for touchstone files.
adds a complex zero-mean gaussian white-noise signal of given standard deviations for magnitude and phase
the frequency vector for the network, in Hz.
swaps the ports of a two port
returns a Frequency object, see frequency.py
calculates an interpolated network. defualt interpolation type is linear. see notes about other interpolation types
a network representing inverse s-parameters, for de-embeding
multiplys a complex bivariate gaussian white-noise signal of given standard deviations for magnitude and phase. magnitude mean is 1, phase mean is 0
perturb s-parameters by small amount. this is usefule to work-around numerical bugs. takes:
amount: amount to add to s parameters
the number of ports the network has.
passivity metric for a multi-port network. It returns
a matrix who’s diagonals are equal to the total power received at all ports, normalized to the power at a single excitement port.
mathmatically, this is a test for unitary-ness of the s-parameter matrix.
where H is conjugate transpose of S, and * is dot product
note: see more at, http://en.wikipedia.org/wiki/Scattering_parameters#Lossless_networks
generic plotting function for plotting a Network’s attribute in polar form
takes:
plots all s parameters in log magnitude
show_legend: boolean, to turn legend show legend of not **kwargs - passed to the matplotlib.plot command
plots the magnitude of the scattering parameter of indecies m, n in log magnitude
m - first index, int n - second indext, int ax - matplotlib.axes object to plot on, used in case you
want to update an existing plot.
show_legend: boolean, to turn legend show legend of not **kwargs - passed to the matplotlib.plot command
plots the phase of a scattering parameter of indecies m, n in degrees
m - first index, int n - second indext, int ax - matplotlib.axes object to plot on, used in case you
want to update an existing plot.
show_legend: boolean, to turn legend show legend of not **kwargs - passed to the matplotlib.plot command
plots the phase of a scattering parameter of indecies m, n in unwrapped degrees
m - first index, int n - second indext, int ax - matplotlib.axes object to plot on, used in case you
want to update an existing plot.
show_legend: boolean, to turn legend show legend of not **kwargs - passed to the matplotlib.plot command
plots the magnitude of a scattering parameter of indecies m, n not in magnitude
m - first index, int n - second indext, int ax - matplotlib.axes object to plot on, used in case you
want to update an existing plot.
show_legend: boolean, to turn legend show legend of not **kwargs - passed to the matplotlib.plot command
plots the scattering parameter of indecies m, n in polar form
m - first index, int n - second indext, int ax - matplotlib.axes object to plot on, used in case you
want to update an existing plot.
show_legend: boolean, to turn legend show legend of not **kwargs - passed to the matplotlib.plot command
plots the phase of a scattering parameter of indecies m, n in radians
m - first index, int n - second indext, int ax - matplotlib.axes object to plot on, used in case you
want to update an existing plot.
show_legend: boolean, to turn legend show legend of not **kwargs - passed to the matplotlib.plot command
plots the phase of a scattering parameter of indecies m, n in unwrapped radians
m - first index, int n - second indext, int ax - matplotlib.axes object to plot on, used in case you
want to update an existing plot.
show_legend: boolean, to turn legend show legend of not **kwargs - passed to the matplotlib.plot command
plots the scattering parameter of indecies m, n on smith chart
m - first index, int n - second indext, int r - radius of smith chart ax - matplotlib.axes object to plot on, used in case you
want to update an existing plot.
show_legend: boolean, to turn legend show legend of not **kwargs - passed to the matplotlib.plot command
generic plotting function for plotting a Network’s attribute vs frequency.
takes:
loads values from a touchstone file.
The scattering parameter matrix.
s-matrix has shape fxnxn, where;
f is frequency axis and, n’s are port indicies
returns the phase of the s-parameters, in radians
returns the unwrapped phase of the s-paramerts, in degrees
returns the magnitude of the s-parameters.
returns the phase of the s-parameters, in radians.
returns the unwrapped phase of the s-parameters, in radians.
returns the t-parameters, which are also known as wave cascading matrix.
write a touchstone file representing this network. the only format supported at the moment is :
HZ S RI
the characteristic impedance of the network.
z0 can be may be a number, or numpy.ndarray of shape n or fxn.