def write_file(filename, probe, original=None, date=None, title=None, notes
    =None, run=None, charge=None):
    """
    Save probe as SNS reduced file.
    """
    from datetime import datetime as dt
    parts = []
    if original is None:
        original = filename
    if date is None:
        date = dt.strftime(dt.now(), '%Y-%m-%d %H:%M:%S')
    parts.append('#F ' + original)
    parts.append('#D ' + date)
    if run is not None:
        parts.append('#C Run Number: %s' % run)
    if title is not None:
        parts.append('#C Title: %s' % title)
    if notes is not None:
        parts.append('#C Notes: %s' % notes)
    parts.append("#C Detector Angle: (%g, 'degree')" % probe.T[0])
    if charge is not None:
        parts.append('#C Proton Charge: %s' % charge)
    parts.append('')
    parts.append('#N 5')
    parts.append('#L Q(1/A) dQ(1/A) R() dR() L(A)')
    parts.append('')
    header = '\n'.join(parts)
    probe.write_data(filename, columns=['Q', 'dQ', 'R', 'dR', 'L'], header=
        header)
