import csv


def read_routes(dirname):
    """Read the routes table."""
    filename = "%s/routes.csv" % dirname
    names = []
    gammas = []
    with open(filename, newline="") as fp:
        reader = iter(csv.reader(fp))

        assert next(reader) == ["route", "gamma"]
        for line in reader:
            name, gamma = line
            names.append(name)
            gammas.append(float(gamma))

    return names, gammas