WorkingBand

class mwavepy.WorkingBand(tline, frequency=None, z0=1)
A WorkingBand is an high-level object which exists solely to make
working with and creation of Networks within the same band, more concise and convenient.
A WorkingBand object has three properties:
frequency information (Frequency object) transmission line information (transmission line object) character impedance of medium
the methods of WorkingBand saves the user the hassle of repetitously
providing a tline and frequency type for every network creation.

note: frequency and tline classes are copied, so they are passed by value and not by-reference.

delay_load(Gamma0, d, unit='m', **kwargs)

creates a Network for a delayed load transmission line

takes:

Gamma0: reflection coefficient of load (not in dB) d: the length (see unit argument) [number] unit: string specifying the units of d. possible options are

‘m’: meters, physical length in meters (default) ‘deg’:degrees, electrical length in degrees ‘rad’:radians, electrical length in radians
**kwargs: key word arguments passed to match(), which is
called initially to create a ‘blank’ network. the kwarg ‘z0’ can be used to create a line of a given impedance
returns:
a 1-port Network class, representing a loaded transmission line of length d

note: this just calls, self.line(d,**kwargs) ** self.load(Gamma0, **kwargs)

delay_open(d, unit='m', **kwargs)

creates a Network for a delayed open transmission line

takes:

d: the length (see unit argument) [number] unit: string specifying the units of d. possible options are

‘m’: meters, physical length in meters (default) ‘deg’:degrees, electrical length in degrees ‘rad’:radians, electrical length in radians
**kwargs: key word arguments passed to match(), which is
called initially to create a ‘blank’ network. the kwarg ‘z0’ can be used to create a line of a given impedance
returns:
a 1-port Network class, representing a shorted transmission line of length d

note: this just calls, self.line(d,**kwargs) ** self.open(**kwargs)

delay_short(d, unit='m', **kwargs)

creates a Network for a delayed short transmission line

takes:

d: the length (see unit argument) [number] unit: string specifying the units of d. possible options are

‘m’: meters, physical length in meters (default) ‘deg’:degrees, electrical length in degrees ‘rad’:radians, electrical length in radians
**kwargs: key word arguments passed to match(), which is
called initially to create a ‘blank’ network. the kwarg ‘z0’ can be used to create a line of a given impedance
returns:
a 1-port Network class, representing a shorted transmission line of length d

note: this just calls, self.line(d,**kwargs) ** self.short(**kwargs)

frequency
guess_length_of_delay_short(aNtwk)

guess length of physical length of a Delay Short given by aNtwk

takes:
aNtwk: a mwavepy.ntwk type . (note: if this is a measurment
it needs to be normalized to the reference plane)
tline: transmission line class of the medium. needed for the
calculation of propagation constant
impedance_mismatch(z1, z2, **kwargs)

returns a two-port network for a impedance mis-match

takes:
z1: complex impedance of port 1 [ number, list, or 1D ndarray] z2: complex impedance of port 2 [ number, list, or 1D ndarray] **kwargs: passed to mwavepy.Network constructor
returns:
a 2-port network [mwavepy.Network]
line(d, unit='m', **kwargs)

creates a Network for a section of matched transmission line

takes:

d: the length (see unit argument) [number] unit: string specifying the units of d. possible options are

‘m’: meters, physical length in meters (default) ‘deg’:degrees, electrical length in degrees ‘rad’:radians, electrical length in radians
**kwargs: key word arguments passed to match(), which is
called initially to create a ‘blank’ network. the kwarg ‘z0’ can be used to create a line of a given impedance
returns:
a 2-port Network class, representing a transmission line of length d
note:
the only function called from the tline class is

propagation_constant(f,d), where f is frequency in Hz and d is distance in meters. so you can use any class which provides this and it will work .

example:
wb = WorkingBand(...) # create a working band object wb.line(90, ‘deg’, z0=50)
load(Gamma0, nports=1, **kwargs)

creates a Network for a Load termianting a transmission line

takes:

Gamma0: reflection coefficient of load (not in db) nports: number of ports. creates a short on all ports,

default is 1 [int]
**kwargs: key word arguments passed to match(), which is
called initially to create a ‘blank’ network
returns:
a 1-port Network class, where S = Gamma0*ones(...)
match(nports=1, z0=None, **kwargs)

creates a Network for a perfect matched transmission line (Gamma0=0)

takes:
nports: number of ports [int] **kwargs: key word arguments passed to Network Constructor
returns:
a n-port Network [mwavepy.Network]
open(nports=1, **kwargs)

creates a Network for a ‘open’ transmission line (Gamma0=1)

takes:
nports: number of ports. creates a short on all ports,
default is 1 [int]
**kwargs: key word arguments passed to match(), which is
called initially to create a ‘blank’ network
returns:
a n-port Network [mwavepy.Network]
short(nports=1, **kwargs)

creates a Network for a short transmission line (Gamma0=-1)

takes:
nports: number of ports. creates a short on all ports,
default is 1 [int]
**kwargs: key word arguments passed to match(), which is
called initially to create a ‘blank’ network
returns:
a n-port Network [mwavepy.Network]
splitter(nports=3, **kwargs)

returns an ideal, lossless n-way splitter.

takes:

nports: number of ports [int] **kwargs: key word arguments passed to match(), which is

called initially to create a ‘blank’ network.
returns:
a n-port Network [mwavepy.Network]
tee(**kwargs)

makes a ideal, lossless tee. (aka three port splitter)

takes:
**kwargs: key word arguments passed to match(), which is
called initially to create a ‘blank’ network.
returns:
a 3-port Network [mwavepy.Network]
note:
this just calls splitter(3)
theta_2_d(theta, deg=True)

converts electrical length to physical distance

takes:
theta: electrical length, (see deg for unit)[number] deg: is theta in degrees? [boolean]
returns:
d: physical distance in meters
note:
this calls the function electrical_length_2_distance which

is provided by transmissionLine.functions.py

thru(**kwargs)

creates a Network for a thru

takes:
**kwargs: key word arguments passed to match(), which is
called initially to create a ‘blank’ network
returns:
a 2-port Network class, representing a thru
note:
this just calls self.line(0)
tline
two_port_reflect(ntwk1, ntwk2, **kwargs)

generates a two-port reflective (S21=S12=0) network,from the responses of 2 one-port networks

takes:
ntwk1: Network type, seen from port 1 ntwk2: Network type, seen from port 2
returns:
result: two-port reflective Network type
example:
wb.two_port_reflect(wb.short(), wb.match())
white_gaussian_polar(phase_dev, mag_dev, n_ports=1, **kwargs)

creates a complex zero-mean gaussian white-noise signal of given standard deviations for phase and magnitude

takes:
phase_mag: standard deviation of magnitude phase_dev: standard deviation of phase n_ports: number of ports. defualt to 1 **kwargs: passed to Network() initializer
returns:
result: Network type

Previous topic

Network

Next topic

Calibration

This Page