def read_elastodyn_dat(path):
    """Get dictionary from an elastodyn dat file"""
    d = {}
    with open(path, 'r') as ed:
        end = False
        for line in ed:
            contents = line.split()
            if contents[0] == 'OutList':
                end = True
            if end:
                break
            if not line.startswith('--'):
                try:
                    d[contents[1]] = float(contents[0])
                except ValueError:
                    d[contents[1]] = contents[0]
    return d