pyRFtk package

Submodules

pyRFtk.ConvertGeneral module

pyRFtk.ConvertGeneral.ConvertGeneral(Z2, S1, Z1, type1='V', type2='V')

CovertGeneral(Z2, S1, Z1, type1=”V”¸ type2=”V”)

Converts (an array of N frequencies of) scattering matrice(s) of type1 and port impedance(s) Z1 to type2 and port impedance(s) Z2

Z1, Z2port impedance(s)
scalar

all port impedances are the same for all ports and frequencies

1D-list/array

length must correspond to the number of ports; ports have different impedances but it is the same for all frequencies

2D-list/array :

the shape corresponds to (nF, nP)

S1 input S-matri-x/ces
shape:

scalar -> nFreqs = 1, nPorts=1 -> (1,1,1) 1D-list -> nFreqs=#, nPorts=1 -> (#,1,1) 2D-list -> nFreqs=1, nPorts=# -> (1,#,#) 3D-list -> nFreqs=*, nPorts=# -> (*,#,#)

type1, type2 : S-matrix types

“P”power wave Zk.imag==0

ak=(Vk+Zk.Ik)/(2.Zk**0.5) bk=(Vk-Zk.Ik)/(2.Zk**0.5)

“V”voltage waveZk.imag==0

ak=(Vk+Zk.Ik)/2, bk=(Vk-Zk.Ik)/2

“G”generalized s-matrix [Orfanidis] waveZk.imag!=0

ak=(Vk+Zk.Ik)/(2.Zk.real**0.5) bk=(Vk-Zk.Ik)/(2.Zk.real**0.5)

S2converted S-matri-x/ces

return value has the shape of S1

pyRFtk.ReadDictData module

pyRFtk.ReadDictData.ReadDictData(fpath, userdirs=['.'], envvar='', appdirs=[], missingOK=True, verbose=False)

read a text file representing a model (.mod4PJ, .model, .ciamod, …) and return the dict object

pyRFtk.ReadDictData.ReadDictString(s)

pyRFtk.ReadTSF module

pyRFtk.ReadTSF.ReadTSF(src, **kwargs)

read_tsf

read a touchstone file version 1

special comments:

!PORTS str, str, … , str !PART (TOP|BOTTOM)?(LEFT|RIGHT)? !SHAPE tuple of int !NUMBERING (UP|DOWN)? !REM !MARKERS list of frequencies

pyRFtk.S_from_VI module

pyRFtk.S_from_VI.S_from_VI(M, Z0=30.0)

returns the S on reference imedance Z0 from the VI transformation matrix M :

note S is defined for an oposite sign of I1 shown above (i.e. standard)

pyRFtk.S_from_Y module

pyRFtk.S_from_Y.S_from_Y(Y, Zbase=50.0)

returns the scattering matrix S defined on Zbase [Ohm] from an admittance matrix Y

always returns an numpy.ndarray unless the Z is a scalar

pyRFtk.S_from_Z module

pyRFtk.S_from_Z.S_from_Z(Z, Zbase=50.0)

returns the scattering matrix S defined on Zbase [Ohm] from an impedance matrix Z

always returns an numpy.ndarray unless the Z is a scalar

pyRFtk.Y_from_S module

pyRFtk.Y_from_S.Y_from_S(S, Zbase=50.0)

returns the scattering matrix S defined on Zbase [Ohm] from an admittance matrix Y

always returns an numpy.ndarray unless the Z is a scalar

pyRFtk.Z_from_S module

pyRFtk.Z_from_S.Z_from_S(S, Zbase=50.0)

returns the scattering matrix S defined on Zbase [Ohm] from an impedance matrix Z

always returns an numpy.ndarray unless the Z is a scalar

pyRFtk.circuit module

class pyRFtk.circuit.circuit(**kwargs)

Bases: object

Deprecated since version 1.0.0: ‘circuit’ has been replaced by ‘rfCircuit’ but kept here for compatibility with legacy code

this implements a circuit class for manipulating RFbase objects

RFobject must implement following methods/attributes

(attribute) Zbase float (attribute) ports list of strings (method) __len__ integer = number of ports (#p) (method) getS input:

fs float or list/array of floats, frequencies in Hz Zbase float, params dict

output: - list/array of f’s -> array of Smatrices [#f,#p,#p]

single f -> single Smatrix [#p,#p]

  • the resulting Smatrices are converted to Zbase if given else the Smatrix is given in the circuit’s Zbase (default 50 Ohm)

(method) set *args, **kwargs

circuit building methods

addblock(name, RFobj, ports, params) connect(*ports) terminate(port, Z=complex | Y=complex | RC=complex)

unused ports automatically become external ports

Get_internalSmatrix(f, nodes, Zbase=None)

given a set of (internal) nodes try and find a corresponding Smatrix

Solution(f. E, Zbase=self.Zbase, nodes=None, flags={})

returns a dict of (node, (V, I, Vf, Vr)) pairs for a excitation E at the fequency f [Hz] where node is the node’s name, V its voltage, I the current flowing into the node, Vf the forward voltage wave into the node and Vr the voltage wave reflected from the node.

E and the returned voltage wave quantities are expressed for a reference impedance Zbase which defaults to the circuit’s one.

addblock(name, RFobj, ports=None, params={}, **kwargs)

inputs: name : str an ID of the added block RFobj : the added rf object:

this object must minimally implement __len__ returning

the number of ports

portsa port mapping
  • can be a list of length the number of ports

  • of a dict mapping the PF object’s portnames to new

    names.

  • or ommitted to generate a generic set of names

paramsthe parameters that will be supplied to the RFobject’s

getS(…) method

kwargs:
xpos: the (relative) position of the RFobject’s ports
  • can be a scalar

  • a list of lenght the number of ports

connect(*ports)

inputs are existing as well as not yet existing ports

copy()
extS()
extS returns the S-matrix solution of the current state of the

circuit matrix for the circuit’s base impedance (self.Zbase)

it is called after e.g. getS(f, Zbase, params) has recursively filled all the circuit’s block S-matrices in its matrix.

getS(fs, Zbase=None, params={}, flags={})
listBlocks()
maxV(f, E, Zbase=None, Id=None, flags={}, **kwargs)

kwargs : future extesnsion ? xpos: list-like position of ports

set(**kwargs)
solve(f, E, Zbase)

solves the circuit for the excitation given in Zbase (defaults to self.Zbase) and flags (defaults to no flags) at frequency f

returns the solution at all nodes

terminate(port, **kwargs)

pyRFtk.codebase module

pyRFtk.codebase.list1dir(path, level=' ')

pyRFtk.compareSs module

pyRFtk.compareSs.compareSs(fs, Ss, cs=[], lbls=[], **figkwargs)

pyRFtk.config module

pyRFtk.config.CleanUpLogFile()
pyRFtk.config.fscale(frm, to='Hz')
pyRFtk.config.get_class_that_defined_method(meth)
pyRFtk.config.ident(message, d=0)
pyRFtk.config.logident(message, printargs=False, stacklev=2)
pyRFtk.config.setLogLevel(level)

pyRFtk.findpath module

pyRFtk.findpath.existspath(fpattern, userdirs=['.'], envvar='', appdirs=[], missingOK=True, verbose=False)

same as findpath but does not raise an exception : just return an empty string

pyRFtk.findpath.findpath(fpattern, userdirs, envar, appdirs, missingOK, verbose)

fpattern : the file’s basename to search for

envvarif an environment variable is set with aseparated set of

directories then these directories will be searched first in the order of appearance in the environment variable (default : ‘’)

usersdirslist of directories searched next in order of appearance

(default [‘.’])

appdirslist of directories searched finally in order of appearance

(default [])

missingOK : do not raise IOError when a directory does not exist

verbose : print debugging messages

pyRFtk.getlines module

pyRFtk.getlines.getlines(src)

Given a source return an iterator function returning the next line of text in the source.

The source can be a multiline string, a string path to a file or a file descriptor such as returned when opening a file.

pyRFtk.maxfun module

pyRFtk.maxfun.maxfun(xs, ys)

pyRFtk.plotVSWs module

pyRFtk.plotVSWs.plotVSWs(VSWs, maxlev=4, Id=None, **kwargs)
pyRFtk.plotVSWs.scaleVSW(VSW, scale)
pyRFtk.plotVSWs.strVSW(VSW, indent=0)

pyRFtk.printMatrices module

pyRFtk.printMatrices.printDB(C, pfmt='%7.3f%+7.1f°, ', printzeros='0')

pretty print a complex matrix

pyRFtk.printMatrices.printM(M, pfmt='%7.3f%+7.3fj, ', pfun=<function <lambda>>, printzeros='0')

pretty str a complex matrix to print or write to a file

pyRFtk.printMatrices.printMA(C, pfmt='%8.5f %+7.2f°, ', printzeros='0')

pretty print a complex matrix

pyRFtk.printMatrices.printR(R, pfmt='%7.3f, ', printzeros='0')

pretty print (the real part) of a (possibly complex) matrix

pyRFtk.printMatrices.printRI(C, pfmt='%7.3f%+7.3fj, ', printzeros='0')

pretty print a complex matrix

pyRFtk.printMatrices.strM(M, pfmt='%7.3f%+7.3fj, ', pfun=<function <lambda>>, printzeros='0')

pretty ‘str’ a complex matrix

pyRFtk.resolveTLparams module

class pyRFtk.resolveTLparams.TLresolver(**kwargs)

Bases: object

pyRFtk.rf3dBHybrid module

pyRFtk.rfArcObj module

class pyRFtk.rfArcObj.rfArcObj(*args, **kwargs)

Bases: rfBase

get1S(f)

pyRFtk.rfBase module

pyRFtk.rfBase.add_debug_code(func)
class pyRFtk.rfBase.rfBase(*args, **kwargs)

Bases: object

rfBase is the parent class of all RF objects

__init__ implements the setting of Id, Zbase, portnames copy, __copy__, __deepcopy__ __getstate__, __setstate__ __str__ __len__ get1S, getS tsf2str, write_tsf maxV

asstr(full=0)
copy()
get1S(f)
getS(fs=None, **kwargs)
maxV(f, E, Zbase=None, Id=None, xpos=0.0, **kwargs)
set(**kwargs)

set attributes of the object if present

tsf2str(**kwargs)

return a multiline string which is the touchstone v1 representation of the rfBase object’s data.

kwargs:
fs: [Hz] (default self.fs) frequencies to collect in the

touchstone

Zbase: [Ohm] (default self.Zbase) get the S-matrix data on

reference impedance Zbase

tfmt[] (default f’#MHZ S MA R {self.Zbase}’) the touchstone

file format

comments: [] (default self.Id) a multiline comment string added

at the top of the file

Note: Zbase is only used when R is not supplied in tfmt to define

the reference impedance Zref for the touchstone. If Zref is supplied in the tfmt then it overrules Zbase.

write_tsf(tsbasename, **kwargs)

pyRFtk.rfCircuit module

class pyRFtk.rfCircuit.rfCircuit(*args, **kwargs)

Bases: rfBase

this implements a circuit class for manipulating RFbase objects, it depends on the :class: ‘rfObject’ class which must implement following methods/attributes

(attribute) Zbase float (attribute) ports list of strings (method) __len__ integer = number of ports (#p) (method) getS input:

fs float or list/array of floats, frequencies in Hz Zbase float, params dict

output: - list/array of f’s -> array of Smatrices [#f,#p,#p]

single f -> single Smatrix [#p,#p]

  • the resulting Smatrices are converted to Zbase if given else the Smatrix is given in the circuit’s Zbase (default 50 Ohm)

(method) set *args, **kwargs

circuit building methods

addblock(name, RFobj, ports, params) connect(*ports) terminate(port, Z=complex | Y=complex | RC=complex)

unused ports automatically become external ports

TODO: rename and order external ports as requested TODO: rethink on how to set parameters TODO: check logic for the status of solved or not TODO: use external sNp if available

Get_internalSmatrix(f, nodes, Zbase=None)

given a set of (internal) nodes try and find a corresponding Smatrix

Solution(f. E, Zbase=self.Zbase, nodes=None, flags={})

returns a dict of (node, (V, I, Vf, Vr)) pairs for a excitation E at the fequency f [Hz] where node is the node’s name, V its voltage, I the current flowing into the node, Vf the forward voltage wave into the node and Vr the voltage wave reflected from the node.

E and the returned voltage wave quantities are expressed for a reference impedance Zbase which defaults to the circuit’s one.

nodes: None, [ nodes ]

If the requested nodes input is None all nodes are evaluated recursively in the whole circuit.

If nodes is [] then anyway the nodes at the level if the object are evaluated but the nodes in subblocks are not evaluated.

So there may be more nodes evaluated than requested.

addblock(name, RFobj, ports=None, params={}, **kwargs)

adds a previously defined circuit block to the circuit

Parameters:
  • name – str an ID of the added block

  • RFobj

    the added rf object: this object must minimally implement __len__ returning

    the number of ports

  • ports

    a port mapping : - can be a list of length the number of ports - of a dict mapping the PF object’s portnames to new

    names.

    • or ommitted to generate a generic set of names

  • params – the parameters that will be supplied to the RFobject’s getS(…) method

  • kwargs – relpos: the (relative) position of the RFobject

connect(*ports)

connects the specified ports in the circuit.

Params ports:

existing as well as not yet existing ports

deembed(IntPorts={}, ExtPorts={})

deembeds ports State of the rfCircuit object: it solves for (Sinternal is not explicitly known)

Parameters:
  • IntPorts

    list of size 2 tuples or dict [ (rfCircuit.port, rfCircuit.port_new), … ] or { rfCircuit.port:rfCircuit.port_new, … }

    these are the “internal” ports of the circuit i.e. these are connected through the RFobj

  • ExtPorts

    list of size 2 tuples or dict [ (rfCircuit.port, rfCircuit.port), … ] or { rfCircuit.port:rfCircuit.port, … }

    these are the “external” ports of the circuit i.e. these are connected through the RFobj

extS()

returns the S-matrix solution of the current state of the circuit matrix for the circuit’s base impedance (self.Zbase) it is called after e.g. getS(f, Zbase, params) has recursively filled all the circuit’s block S-matrices in its matrix.

findObj(location)
getS(fs, Zbase=None, params={}, flags={})
getpos(node)

return the position of the node

Parameters:

node – The node

listBlocks()
maxV(f, E, Zbase=None, Id=None, flags={}, **kwargs)

kwargs : future extension ?

resolve_xpos()

tries to build and xpos based on the underlying blocks’ information

set(*args, **kwargs)
kwargs: dict of
(“blkID”, sdict)

where sdict is a similar dict that goes further into the chain of nested rf objects

(“>attr”, value)

where attr is an rf object’s attribute that gets the value

e.g.

rfCircuitA | +- rfRLC1 | | | +- Ls | +- rfCircuitB


+- rfTRL1

+- L

rfCircuitA.set(rfRLC1= {“Ls”:20e-9},

rfCircuitB= {“rfTRL1”: {“L”:1.0}}

or

rfCircuitA.set({‘rfRLC1.Ls’:20e-9,

‘rfCircuitB.rfTRL1.L’:1.0’})

or

rfCircuitA.set(‘rfRLC1.Ls’, 20e-9) rfCircuitA.set(‘rfCircuitB.rfTRL1’, {‘L:1.0})

The purpose of the different formalisms:

.set(‘kw’, {attr1: val1, attr2: val2}, …)

or .set((‘kw’, {attr1: val1, attr2: val2}), …) or .set(kw = {attr1: val1, attr2: val2}, …)

is to be able to set multiple attributes at once.

in case a single attribute needs to be set:

.set(‘kw.attr’, val, …)

or .set((‘kw.attr’, val), … ) but .set(kw.attr = val, … ) will not work !! thus .set(kw = {‘attr’: val}, … }

The kwarg formulation is more restrictive if one wants to loop over multiple objects where one wants to set the attributes.

Possibly the kwarg formalism need to be cancelled ?

solve(f, E, Zbase)

solves the circuit for the excitation given in Zbase (defaults to self.Zbase) and flags (defaults to no flags) at frequency f

sets the solution at all waves in self.sol

terminate(port, **kwargs)

terminates the given port, can be either to ground by specifying some Z value or leave it open by specifying Y=0

Parameters:
  • port – The port to terminate

  • kwargs – With what to terminate the port (e.g Z=5)

pyRFtk.rfGTL module

pyRFtk.rfGTL.processGTL(fMHz, Zbase, GTL_data, **kwargs)

a GTL data structure is as follows:

{‘Portnames’: ordered list of port names (if a sNp touchstone file is

provided the order must match),

‘sNp’ : optional touchstone file, # * future extension *

‘relpos’{‘p1’:position, … } where the p1 are some or all of the

portnames,

‘variables’: { dict of substitutions },

‘defaults’ : { dict of default AddBlockGTL kwargs }, # * future extension *

‘GTL{

‘TLid1’: { # AddBlockGTL kwargs General TL section 1

length: float

Portnames: [ list of 2 portnames ], # portname =

# str | (str, dict) | dict # dict = CT.Terminate kwargs

relpos: float # optional: position of 1st port

… General_TL kwargs of the TL properties …

}, # TLid1

‘TLidN’: { AddBlockGTL kwargs General TL section N

… TLid 1 …

}, # TLidN

}, # GTL

}

class pyRFtk.rfGTL.rfGTL(path2model, objkey=None, variables={}, **kwargs)

Bases: rfCircuit

copy()
getS(fs, Zbase=None, params={}, flags={})
getSgtl(fs, Zbase=None, params={}, flags={})

pyRFtk.rfObject module

class pyRFtk.rfObject.rfObject(*args, **kwargs)

Bases: object

The purpose of rfObject is to create a frequency vs. S-matrix “glorified” LUT

The creation of the rfObject can be done in several manners:

  1. the simplest is to load a touchstone file e.g. produced by Ansys/HFSS and the likes

    myObject = rfObject(touchstone=<path_to_touchstone>)

  2. another method is the fill the table manually

    portnames = <list of ports> myObject = rfObject(ports = portnames]

    for fHz in fHzs:

    S = <calculate S> myObject.setS(fHz, S)

Once an rfObject is created the 2 main methods of use are:

rfObject.getS(fHz, Zbase=None)

and

excitation = {port1:a1, … } Vamx, rfObject.maxV(fHz, excitation)

S_from_Y(Y)

returns the scattering matrix S defined on Zbase [Ohm] from an impedance matrix Z

S_from_Z(Z)

returns the scattering matrix S defined on Zbase [Ohm] from an impedance matrix Z

convert2newZbase(newZbase)

convert_Zbase

converts the rfObject’s Ss and Zbase to newZbase

newZbase: target reference impedance

copy()
deembed(ports)

deembeds the ports with a simple lossless TL of length L and characteristic impedance Z

ports is a dict containing the ports to be deembeded: the value is either a scalar (int, float) giving L assuming the default Z being the object’s Zbase or a 2-tuple (L, Z) or a dict which is passed as kwargs to rfTRL.

Positive L means the deembeding is into the port

getS(fs, **kw)
maxV(f, E, Zbase=None, ID='<rfObject>', **kwargs)
process_kwargs()
read_tsf(src, **kwargs)
setS(f, S, Portnames=None)
sortports(order=<slot wrapper '__lt__' of 'str' objects>)

pyRFtk.rfRLC module

class pyRFtk.rfRLC.rfRLC(*args, **kwargs)

Bases: object

  1. – Cs – Ls – Rs –+– (p)

    Cp Lp Rp | | | +—+—+


    Gnd

kwargs:

Zbase : reference impedance [50 Ohm] ports : port names [[‘s’,’p’]] Rp : parallel resistance [+inf Ohm] Lp : parallel inductance [+inf H] Cp : parallel capacity [0 F] Rs : series resistance [0 Ohm] Ls : series inductance [0 H] Cs : series capacity [+inf F]

thus the default is : (s) – (p)

asstr(full=False)
copy()
getS(fs, Zbase=None, params={}, **kw)
maxV(f, E, Zbase=None, ID=None, **kwargs)
set(**kwargs)

pyRFtk.rfTRL module

class pyRFtk.rfTRL.rfTRL(*args, **kwargs)

Bases: object

this class defines a TL rf object

Parameters:
  • ID – an identifier (optional) could be used for logging errors and warnings

  • ports – (default [‘1’,’2’]) names the ports on either side of the TL section

  • L – (default 0[m]) total length of the TL section

  • Zbase – (default 50[Ohm]) reference impedance of the S-matrix representing the TL section

  • dx

    (default int(72)) dimensional step along the axis of the TL section that is used to solve the telegraphist’s ODE as well as the requested VI standing waves.

    If an int-like is given the intitial step is estimated as a 1/Nth of the wavelength along the transmission line.

    If a float-like is given it is taken as the dimensional step size. This initial estimate is refined so that an integer number of steps fits the TL section’s length.

    if a [floats]-like is given end points are added as necessary and the list is used as the node points along the TL. TODO: implement this.

  • odeparams – (default {‘rtol’:1E-12, ‘atol’:1E-12})

  • xpos – (default 0[m]) relative position of the first port of the TL section. useful to position VI standing waves on figures.

  • sNp – sNp-object (default=None) TODO: implement

TL parameters can be given as:

float-like

just a constant value along the length of the TL section

[floats]-like

the TL section is split in len([floats])-1 segments that have a piece-wise linear varying value of the paramter (note: continuous). A list of 1 long is treated as a float-like

[[floats],[floats]]-like

the node positions are given in the first [floats] and their values in the second [floats]. The node positions do not need to start or end on the TL boundaries: the values are linarly interpolated or extrapolated to the nearest as the case may be.

In case any of the supplied parameters are not constant the solving for the TL’s S-matrix and VI standing waves will invoke an ODE solver to solve the telegraphist’s equation. Otherwise the (constant) complex characteristic impedance and propagation constant is (derived form the supplied parameters and) used to explicitly solve the telegraphist’s equation.

Global TL properties:

Z0TL: [Ohm] characteristic impedance of the TL

LTL: [H/m] line inductance of the TL CTL: [F/m] line capacitance of the TL

rTL: [Ohm/m] line resistance of the TL

rTLO: [[Ohm/m] line resistance of the outer conductor of the TL rTLI: [Ohm/m] line resistance of the inner conductor of the TL

gTL: [Mho/m] medium conductance of the TL

A: [1/m] attenuation constant AdB: [dB/m] attenuation constant in dB/m

Conductor properties:

rho: [Ohm.m] specific resistivity of the conductors

rhoO: [Ohm.m] specific resistivity of the outer conductor rhoI: [Ohm.m] specific resistivity of the inner conductor

murO: [mu0] outer conductor’s permeability murI: [mu0] inner conductor’s permeability

Medium properies:

sigma: [Mho/m] specific conductivity of the medium tand: [1] medium dielectric loss tangent

epsr: [epsilon0] medium’s relative permitivity mur: [mu0] medium’s relative permeability

etar: [eta0] medium’s relative impedance

vr: [c0] medium’s relative wave velocity

Geometric properties:

OD: [m] outer diameter of a circular coaxial TL ID: [m] inner diameter of a circular coaxial TL

qTL: [1/m] rTL = (w rho mur mu0 / 2)**0.5 * qTL qTLO: [1/m] rTLO= (w rhoO murO mu0 / 2)**0.5 * qTLO qTLI: [1/m] rTLI = (w rhoI murI mu0 / 2)**0.5 * qTLI

Implemented methods:

__init__(**kwargs):

performs the initial build of the TL section’s properties

__str__:

returns a nicely formated string describing the defined TL section

__len__:

(mandatory for RF objects) returns the number of ports

set(**kwargs):

(mandatory for RF objects) modifies some of the properties of the TL section

currently implemented:

L for a constant TL section TODO: expand on the parameters and remove constant condition

solveVI(f->float, [V0 -> np.complex, I0-> np.complex]): -> np.array

solves the telegraphist’s equation either explicitly for constant TL sections or through an ODE solver otherwise. returns depending on the input parameters (see method)

getS(fs, Zbase=None, params={})

returns the S-matrix/ces for the requested frequency/ies [Hz] for the reference impedance Zbase (or the object’s reference impedance if not supplied). Prior to the evaluation the params-dict is passed to the object’s set method as **params.

VISWs(f, E, Zbase=None)

returns xs, (

maxV(f, E, Zbase=None)

VISWs(f, E, Zbase=None)
asstr(full=False)
copy()
getS(fs, Zbase=None, params={}, **kw)

returns an (array of) S-matrice(s) at the frequency(ies)fs

Returns a single S-matrix for a float-like frequency fs [Hz] or a 1D array of S-matrices for a [floats]-like fs.

The returned S-matrice(s) is(are) defined at the object’s reference impedance or at the supplied reference impedance Zbase.

The object’s set function self.set(**kwargs) is called with **params prior to the evaluation.

maxV(f, E, Zbase=None, ID='<top>', **kwargs)
set(**kwargs)
solveVI(f, V0=None, I0=None)

Solves the telegraphist’s equation

The telegraphist’s equation is solved for frequency f[Hz] either explicitly for a TL section with constant TL parameters or using scipy.integrate.odeint otherwise.

The node points along the TL are defined through the atribute ‘dx’.

TODO: for an int-like ‘dx’ and a non-constant TL section the estimation

of the node points is not correctly implemented.

Note: in the telegrapher’s equation the currents are flowing out of the

‘sink’ port (V0,I0) and into the ‘source’ port (would be V1=self.U[-1], I1= self.I[-1].

pyRFtk.str_dict module

pyRFtk.str_dict.str_dict(adict)

pyRFtk.tictoc module

pyRFtk.tictoc.tic()
pyRFtk.tictoc.toc(t0=None)

pyRFtk.whoami module

pyRFtk.whoami.whoami(pname=None, dframe=1)

Module contents