commit 78459c900007b1449b668cebd39b9c4fb52c2d12 Author: xaver Date: Wed Jun 24 14:41:03 2020 +0200 haLLOP diff --git a/second_try.py b/second_try.py new file mode 100644 index 0000000..edc24df --- /dev/null +++ b/second_try.py @@ -0,0 +1,39 @@ +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) \ No newline at end of file