refnx/util/general.py
def resolution_double_chopper(
    wavelength, z0=0.358, R=0.35, freq=24, H=0.005, xsi=0, L=7.5, tau_da=0
):
    """
    Calculates the fractional resolution of a double chopper pair, dl/l.

    Parameters
    ----------
    wavelength: float
        wavelength in Angstroms
    z0: float
        distance between chopper pair (m)
    R: float
        radius of chopper discs (m)
    freq: float
        rotation frequency of choppers (Hz)
    N: float
        number of windows in chopper pair
    H: float
        height of beam (m)
    xsi: float
        phase opening of chopper pair (degrees)
    L: float
        Flight length of instrument (m)
    tau_da : float
        Width of timebin (s)

    Returns
    -------
    res: float
        Fractional wavelength resolution of a double chopper system.
    """
    TOF = L / wavelength_velocity(wavelength)
    tc = tauC(wavelength, xsi=xsi, z0=z0, freq=freq)
    tau_h = H / R / (2 * np.pi * freq)
    return 0.68 * np.sqrt(
        (tc / TOF) ** 2 + (tau_h / TOF) ** 2 + (tau_da / TOF) ** 2
    )

    Calculates the fractional resolution of a double chopper pair, dl/l.

    Parameters
    ----------
    wavelength: float
        wavelength in Angstroms
    z0: float
        distance between chopper pair (m)
    R: float
        radius of chopper discs (m)
    freq: float
        rotation frequency of choppers (Hz)
    N: float
        number of windows in chopper pair
    H: float
        height of beam (m)
    xsi: float
        phase opening of chopper pair (degrees)
    L: float
        Flight length of instrument (m)
    tau_da : float
        Width of timebin (s)

    Returns
    -------
    res: float
        Fractional wavelength resolution of a double chopper system.
    
Calculates the fractional resolution of a double chopper pair, dl/l.
Parameters



Returns

float
Fractional wavelength resolution of a double chopper system.
Calculates the fractional resolution of a double chopper pair dl / l . Parameters Returns float Fractional wavelength resolution of a double chopper system .
def resolution_double_chopper(
    wavelength, z0=0.358, R=0.35, freq=24, H=0.005, xsi=0, L=7.5, tau_da=0
):
    TOF = L / wavelength_velocity(wavelength)
    tc = tauC(wavelength, xsi=xsi, z0=z0, freq=freq)
    tau_h = H / R / (2 * np.pi * freq)
    return 0.68 * np.sqrt(
        (tc / TOF) ** 2 + (tau_h / TOF) ** 2 + (tau_da / TOF) ** 2
    )
def resolution_double_chopper ( wavelength , z0 = 0.358 , R = 0.35 , freq = 24 , H = 0.005 , xsi = 0 , L = 7.5 , tau_da = 0 ) : TOF = L / wavelength_velocity ( wavelength ) tc = tauC ( wavelength , xsi = xsi , z0 = z0 , freq = freq ) tau_h = H / R / ( 2 * np . pi * freq ) return 0.68 * np . sqrt ( ( tc / TOF ) ** 2 + ( tau_h / TOF ) ** 2 + ( tau_da / TOF ) ** 2 )
Calculates the fractional resolution of a double chopper pair, dl/l.
Calculates the fractional resolution of a double chopper pair dl / l .
"""
    Calculates the fractional resolution of a double chopper pair, dl/l.

    Parameters
    ----------
    wavelength: float
        wavelength in Angstroms
    z0: float
        distance between chopper pair (m)
    R: float
        radius of chopper discs (m)
    freq: float
        rotation frequency of choppers (Hz)
    N: float
        number of windows in chopper pair
    H: float
        height of beam (m)
    xsi: float
        phase opening of chopper pair (degrees)
    L: float
        Flight length of instrument (m)
    tau_da : float
        Width of timebin (s)

    Returns
    -------
    res: float
        Fractional wavelength resolution of a double chopper system.
    """
wavelength
z0
R
freq
H
xsi
L
tau_da