network (mwavepy.network)

Provides a n-port network class and associated functions.

Most of the functionality in this module is provided as methods and properties of the Network Class.

Network Class

Network([touchstone_file, name]) A n-port network.

Functions On Networks

connect(ntwkA, k, ntwkB, l) connect two n-port networks together.
innerconnect(ntwkA, k, l) connect two ports of a single n-port network.
cascade(ntwkA, ntwkB) cascade two 2-port Networks together
de_embed(ntwkA, ntwkB) de-embed ntwkA from ntwkB. this calls ntwkA.inv**ntwkB.
average(list_of_networks) calculates the average network from a list of Networks.
one_port_2_two_port(ntwk) calculates the two-port network given a symetric, reciprocal and

Supporting Functions

connect_s(A, k, B, l) connect two n-port networks’ s-matricies together.
innerconnect_s(A, k, l) connect two ports of a single n-port network’s s-matrix.
s2t(s) converts scattering parameters to scattering transfer parameters.
t2s(t) converts scattering transfer parameters to scattering parameters
inv(s) calculates ‘inverse’ s-parameter matrix, used for de-embeding
flip(a) invert the ports of a networks s-matrix, ‘flipping’ it over

Misc Functions

impedance_mismatch(z1, z2) creates a two-port network for a impedance mis-match
load_all_touchstones([dir, contains, f_unit]) loads all touchtone files in a given dir into a dictionary.
write_dict_of_networks(ntwkDict[, dir]) saves a dictionary of networks touchstone files in a given directory
csv_2_touchstone(filename) converts a csv file to a Network

Table Of Contents

Previous topic

Circuit Design: Single Stub Matching Network

Next topic

mwavepy.network.Network

This Page