Skip to content

taper

This module give function to ease the design of RF-tapper

klopfenstein_taper(_z_start, _z_stop, _n_step, _rhomax=0.01)

return the _n_step profile of impedance for a transition from _z_start to _z_stop

Source code in passive_auto_design\devices\taper.py
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
def klopfenstein_taper(_z_start, _z_stop, _n_step, _rhomax=0.01):
    """
    return the _n_step profile of impedance for a transition from
    _z_start to _z_stop
    """
    rho0 = gamma(_z_start, _z_stop)
    z_mid = 0.5 * np.log(_z_stop * _z_start)
    n_mid = int(np.floor(_n_step / 2))
    a_coeff = np.arccosh(rho0.value / _rhomax)
    ln_z = np.zeros((_n_step,))
    for i in range(1, n_mid + 1):
        ln_z[i + n_mid] = z_mid + _rhomax * (
            1 + a_coeff**2 * __phi(a_coeff, i / n_mid)
        )
        ln_z[n_mid - i] = z_mid + _rhomax * (
            1 - a_coeff**2 * __phi(a_coeff, i / n_mid)
        )
    ln_z[n_mid] = z_mid + _rhomax
    return PhysicalDimension(
        value=np.exp(ln_z, dtype=complex), scale="lin", unit=r"$\Omega$"
    )

linear_taper(_z_start, _z_stop, _n_step)

return the _n_step profile of impedance for a transition from _z_start to _z_stop

Source code in passive_auto_design\devices\taper.py
11
12
13
14
15
16
17
18
19
20
def linear_taper(_z_start, _z_stop, _n_step):
    """
    return the _n_step profile of impedance for a transition from
    _z_start to _z_stop
    """
    return PhysicalDimension(
        value=np.linspace(_z_start, _z_stop, _n_step, dtype=complex),
        scale="lin",
        unit=r"\Omega",
    )