def get_rnx_band_from_freq(frequency):
    """
    Obtain the frequency band

    >>> get_rnx_band_from_freq(1575420030.0)
    1
    >>> get_rnx_band_from_freq(1600875010.0)
    1
    >>> get_rnx_band_from_freq(1176450050.0)
    5
    >>> get_rnx_band_from_freq(1561097980.0)
    2
    """

    # Backwards compatibility with empty fields (assume GPS L1)
    ifreq = 154 if frequency == '' else round(frequency / 10.23e6)

    # QZSS L1 (154), GPS L1 (154), GAL E1 (154), and GLO L1 (156)
    if ifreq >= 154:
        return 1
    # QZSS L5 (115), GPS L5 (115), GAL E5 (115)
    elif ifreq == 115:
        return 5
    # BDS B1I (153)
    elif ifreq == 153:
        return 2
    else:
        raise ValueError("Cannot get Rinex frequency band from frequency [ {0} ]. "
        "Got the following integer frequency multiplier [ {1:.2f} ]\n".format(frequency, ifreq))

    return ifreq