def to_dict(I):
    """ Write the activity indicators inside `I` to a dictionary """
    d = {'vrad': I.RV, 'svrad': I.RVerror, 'fwhm': I.FWHM, 'contrast': I.
        contrast, 'bis_span': I.BIS, 'wspan': I.Wspan, 'vspan': I.Vspan}
    try:
        d['DATE-OBS'] = I.HDU[0].header['DATE-OBS']
    except AttributeError:
        pass
    try:
        d['MJD-OBS'] = I.HDU[0].header['MJD-OBS']
    except AttributeError:
        pass
    return d
