skrf.taper.Klopfenstein.__init__
- Klopfenstein.__init__(**kw)[source]
Generic 1D Taper Constructor.
- Parameters:
med (
Media
) –A
Media
object or a @classmethod __init__, used to generate the transmission line. See med_kw for arguments. Examples:skrf.media.RectangularWaveguide # a class
skrf.media.RectangularWaveguide.from_z0 # an init
start (number) – starting value for param
stop (number) – stop value for param
n_sections (int) – number of sections in taper
f (Callable) – function defining the taper transition. must take either no arguments or take (x,length, start, stop). see f_is_normed arguments
length (number) – physical length of the taper (in length_unit)
length_unit (str) – unit of length variable. see skrf.to_meters
param (str) – name of the parameter of med that varies along the taper
f_is_normed (bool) – is f scalable and normalized. ie can f just be scaled to fit different start/stop conditions? if so then f is called with no arguments, and must have domain and raings of [0,1], and [0,1]
f_kw (dict) – passed to f() when called
med_kw (dict) – passed to med.__init__ when an instance is created
Note
The default behaviour should is to taper based on impedance. To do this we inspect the med class for a from_z0 init method, and if it exists, we assign it to med attribute, in __init__. Admittedly having med be a class or a method is abuse, it makes for a intuitive operation.
Examples
Create a linear taper from 100 to 1000mil
>>> from skrf import Frequency, RectangularWaveguide, Taper1D, mil, inch >>> taper = Taper1D(med=RectangularWaveguide, param='a', start=100*mil, stop=1000*mil, length=1*inch, n_sections=20, f=lambda x: x, f_is_normed=True, med_kw={'frequency':Frequency(75,110,101,'ghz')})