def get_cspad(azav, gas_det, bin_low, bin_high):
    """
    Get the intensity of the diffraction ring on the CSPAD.

    The returned value is normalized to the intensity from the gas detector.

    Parameters
    ----------
    azav : ndarray
        Azimuthal average calculated from CSPAD.

    gas_det : float
        Gas detector intensity.

    bin_low : int
        The bin number of the lower bound of the intensity integration.

    bin_high : int
        The bin number of the upper bound of the intensity integration.

    Returns
    -------
    intensity : float
        Sum of 5 qbins above and below the center, normalized by gas detector.
    """

    intensity = sum(azav[bin_low:bin_high]) / gas_det
    return intensity