# Path: skrf/tlineFunctions.py
# def surface_resistivity(f: NumberLike, rho: float, mu_r: float):
#     r"""
#     Surface resistivity.
# 
#     The surface resistivity is calculated as:
# 
# 
#     .. math::
# 
#         \frac{ \rho }{ \delta }
# 
#     where :math:`\delta` is the skin depth from :func:`skin_depth`.
# 
#     See www.microwaves101.com [#]_ or wikipedia [#]_ for more info.
# 
#     Parameters
#     ----------
#     f : number or array-like
#         frequency, in Hz
#     rho : number or array-like
#         bulk resistivity of material, in ohm*m
#     mu_r : number or array-like
#         relative permeability of material
# 
#     Returns
#     -------
#     surface resistivity : number of array-like
#         Surface resistivity in ohms/square
# 
#     References
#     ----------
#     .. [#] https://www.microwaves101.com/encyclopedias/sheet-resistance
#     .. [#] https://en.wikipedia.org/wiki/Sheet_resistance
# 
#     See Also
#     --------
#     skin_depth
#     """
#     return rho/skin_depth(rho=rho, f=f, mu_r=mu_r)
# 
# Path: skrf/constants.py
# INF = 1e99
# ALMOST_ZERO = 1e-12
# ZERO = 1e-4
# ONE = 1.0 + 1/1e14
# LOG_OF_NEG = -100
# K_BOLTZMANN = 1.38064852e-23
# T0 = 290.
# S_DEFINITIONS = ['power', 'pseudo', 'traveling']
# S_DEF_DEFAULT = 'power'
# def to_meters(d: NumberLike, unit: str = 'm', v_g: float = c) -> NumberLike:


from scipy.constants import  epsilon_0, mu_0
from scipy.special import ellipk
from numpy import pi, sqrt, log, zeros, ones
from .media import Media
from ..tlineFunctions import surface_resistivity
from ..constants import NumberLike
from typing import Union, TYPE_CHECKING
    from .. frequency import Frequency

    Parameters
    ----------
    frequency : :class:`~skrf.frequency.Frequency` object, optional
        frequency band of the media. The default is None.
    z0 : number, array-like, optional
        the port impedance for media. The default is None.
        Only needed if  its different from the characteristic impedance
        of the transmission.
    w : number, or array-like, optional
        width of center conductor, in m. Default is 70.
    s : number, or array-like
        width of gap, in m. Default is 4.
    ep_r : number, or array-like, optional
        relative permativity of substrate. Default is 3.
    t : number, or array-like, optional
        conductor thickness, in m.
        Default is None (metalization thickness neglected)
    rho : number, or array-like, optional
        resistivity of conductor. Default is None

    References
    ----------
    .. [#] http://qucs.sourceforge.net/docs/technical.pdf
    .. [#] http://www.qucs.sourceforge.net/

    """
    def __init__(self, frequency: Union['Frequency', None] = None,
                 z0: Union[NumberLike, None] = None,
                 w: NumberLike = 70, s: NumberLike = 4,

# Path: skrf/tlineFunctions.py
# def surface_resistivity(f: NumberLike, rho: float, mu_r: float):
#     r"""
#     Surface resistivity.
# 
#     The surface resistivity is calculated as:
# 
# 
#     .. math::
# 
#         \frac{ \rho }{ \delta }
# 
#     where :math:`\delta` is the skin depth from :func:`skin_depth`.
# 
#     See www.microwaves101.com [#]_ or wikipedia [#]_ for more info.
# 
#     Parameters
#     ----------
#     f : number or array-like
#         frequency, in Hz
#     rho : number or array-like
#         bulk resistivity of material, in ohm*m
#     mu_r : number or array-like
#         relative permeability of material
# 
#     Returns
#     -------
#     surface resistivity : number of array-like
#         Surface resistivity in ohms/square
# 
#     References
#     ----------
#     .. [#] https://www.microwaves101.com/encyclopedias/sheet-resistance
#     .. [#] https://en.wikipedia.org/wiki/Sheet_resistance
# 
#     See Also
#     --------
#     skin_depth
#     """
#     return rho/skin_depth(rho=rho, f=f, mu_r=mu_r)
# 
# Path: skrf/constants.py
# INF = 1e99
# ALMOST_ZERO = 1e-12
# ZERO = 1e-4
# ONE = 1.0 + 1/1e14
# LOG_OF_NEG = -100
# K_BOLTZMANN = 1.38064852e-23
# T0 = 290.
# S_DEFINITIONS = ['power', 'pseudo', 'traveling']
# S_DEF_DEFAULT = 'power'
# def to_meters(d: NumberLike, unit: str = 'm', v_g: float = c) -> NumberLike:


# Path: skrf/media/cpw.py
from scipy.constants import  epsilon_0, mu_0
from scipy.special import ellipk
from numpy import pi, sqrt, log, zeros, ones
from .media import Media
from ..tlineFunctions import surface_resistivity
from ..constants import NumberLike
from typing import Union, TYPE_CHECKING
    from .. frequency import Frequency


    Parameters
    ----------
    frequency : :class:`~skrf.frequency.Frequency` object, optional
        frequency band of the media. The default is None.
    z0 : number, array-like, optional
        the port impedance for media. The default is None.
        Only needed if  its different from the characteristic impedance
        of the transmission.
    w : number, or array-like, optional
        width of center conductor, in m. Default is 70.
    s : number, or array-like
        width of gap, in m. Default is 4.
    ep_r : number, or array-like, optional
        relative permativity of substrate. Default is 3.
    t : number, or array-like, optional
        conductor thickness, in m.
        Default is None (metalization thickness neglected)
    rho : number, or array-like, optional
        resistivity of conductor. Default is None

    References
    ----------
    .. [#] http://qucs.sourceforge.net/docs/technical.pdf
    .. [#] http://www.qucs.sourceforge.net/

    """
    def __init__(self, frequency: Union['Frequency', None] = None,
                 z0: Union[NumberLike, None] = None,
                 w: NumberLike = 70, s: NumberLike = 4,

                 ep_r: NumberLike = 3, t: Union[NumberLike, None] = None,