import matplotlib.pyplot as plt import os import glob import IPython from IPython import embed """ 'lines = os.open('2020-06-22-aa', 'beats-eod.dat') print(lines) embed() """ def parse_dataset(dataset_name): assert(os.path.exists(dataset_name)) f = open(dataset_name, 'r') lines = f.readlines() f.close() print(type(lines)) time = [] frequencies = [] amplitudes = [] for i in range(len(lines)): print(lines[i]) l = lines[i].strip() if len(l) > 0 and l[0] is not '#': temp = list(map(float, l.split(l))) time.append([0]) frequencies.append([1]) amplitudes.append([2]) return time, frequencies, amplitudes plt.plot(time, frequencies)