def parseFile(input_file):
    """
    Take the output from calc_gr.tcl and parse it, returning a list of series
    in the file.
    """

    # Read in file
    f = open(input_file,'r')
    contents = f.readlines()
    f.close()
    
    # Find line that contains data (it will all be on one line, with the series
    # separated by { SERIES }.
    start_index = contents.index("BEGIN\n") + 1
    data = contents[start_index]

    # Create list of series data
    series_list = data.split("{")
    series_list = ["".join([x for x in s if x != "}"]) for s in series_list]
    series_list = [[float(x) for x in s.split()] for s in series_list]

    # Strip blank first line and last "frames processed" entries
    series_list.pop(0)
    series_list.pop(-1)

    return series_list