def read_dates(infile):
    """Read a file of dates (one per line) and write to a list.

    Assumes there is a metadata file corresponding to infile which 
    has exactly the same name but ends with .met

    """
    
    fin = open(infile, 'r')
    date_list = []
    for line in fin:
        date_list.append(line.rstrip('\n'))
    fin.close()

    file_body = infile.split('.')[0]
    with open (file_body+'.met', 'r') as metfile:
        date_metadata=metfile.read()

    return date_list, date_metadata