Skip to content

unit

Some function to format physical dimensions.

Impedance(value)

Format complex impedance to string with engineer format.

Source code in passive_auto_design\units\unit.py
16
17
18
19
20
21
22
def Impedance(value):
    """
    Format complex impedance to string with engineer format.
    """
    if imag(value) < 0:
        return __res(real(value)) + " - j" + __res(-imag(value)) + r" $\Omega$"
    return __res(real(value)) + " + j" + __res(imag(value)) + r" $\Omega$"