refnx/util/general.py
def penetration_depth(qq, rho):
    """
    Calculates the penetration depth of a neutron/xray beam

    Parameters
    ----------
    qq: float
        Q values to calculate the penetration depth at
    rho: float or complex
        Complex SLD of material

    Returns
    -------
    penetration_depth: float
    """
    kk = 0.25 * qq ** 2.0
    kk -= 4 * np.pi * rho
    temp = np.sqrt(kk + 0j)
    return np.abs(1 / temp.imag)

    Calculates the penetration depth of a neutron/xray beam

    Parameters
    ----------
    qq: float
        Q values to calculate the penetration depth at
    rho: float or complex
        Complex SLD of material

    Returns
    -------
    penetration_depth: float
    
Calculates the penetration depth of a neutron/xray beam
Parameters

float
Q values to calculate the penetration depth at
rho: float or complex
Complex SLD of material

Returns

float
Calculates the penetration depth of a neutron / xray beam Parameters float Q values to calculate the penetration depth at rho : float or complex Complex SLD of material Returns float
def penetration_depth(qq, rho):
    kk = 0.25 * qq ** 2.0
    kk -= 4 * np.pi * rho
    temp = np.sqrt(kk + 0j)
    return np.abs(1 / temp.imag)
def penetration_depth ( qq , rho ) : kk = 0.25 * qq ** 2.0 kk -= 4 * np . pi * rho temp = np . sqrt ( kk + 0j ) return np . abs ( 1 / temp . imag )
Calculates the penetration depth of a neutron/xray beam
Parameters
Calculates the penetration depth of a neutron / xray beam Parameters
"""
    Calculates the penetration depth of a neutron/xray beam

    Parameters
    ----------
    qq: float
        Q values to calculate the penetration depth at
    rho: float or complex
        Complex SLD of material

    Returns
    -------
    penetration_depth: float
    """
qq
rho