Return the flux of Cas A given a frequency and the year of observation.
    Based on the formula given in Baars et al., 1977.

    Parameters:

    freq - Observation frequency in MHz.
    year - Year of observation. May be floating-point.

    Returns: s, flux in Jy.

def cas_a (freq_mhz, year):
    """Return the flux of Cas A given a frequency and the year of observation.
    Based on the formula given in Baars et al., 1977.

    Parameters:

    freq - Observation frequency in MHz.
    year - Year of observation. May be floating-point.

    Returns: s, flux in Jy.

    """
    # The snu rule is right out of Baars et al. The dnu is corrected
    # for the frequency being measured in MHz, not GHz.

    snu = 10. ** (5.745 - 0.770 * np.log10 (freq_mhz)) # Jy
    dnu = 0.01 * (0.07 - 0.30 * np.log10 (freq_mhz)) # percent per yr.
    loss = (1 - dnu) ** (year - 1980.)
    return snu * loss