def read_event_file(filename):
    """Reads a .event file *filename* and returns a dict containing the header and records.  Each record contains a timestamp and an external event name."""
    master = []
    i = 0
    hdr = []
    start = False
    with open(filename, 'r') as f:
        for line in f:
            if not start:
                hdr.append(line)
                start = 'Series' in line
            else:
                rec = line.split(' ')
                ts = int(rec[0])
                tag = rec[1]
                master.append((ts,tag))
            i += 1
    return master, hdr