This commit is contained in:
xaver 2020-06-24 15:42:11 +02:00
parent 78459c9000
commit 312685835e

View File

@ -3,11 +3,6 @@ import os
import glob
import IPython
from IPython import embed
"""
'lines = os.open('2020-06-22-aa', 'beats-eod.dat')
print(lines)
embed()
"""
@ -19,8 +14,8 @@ def parse_dataset(dataset_name):
print(type(lines))
time = []
frequencies = []
amplitudes = []
frequency = []
amplitude = []
for i in range(len(lines)):
print(lines[i])
@ -29,11 +24,16 @@ def parse_dataset(dataset_name):
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])
time.append(temp[0])
frequency.append(temp[1])
amplitude.append(temp[2])
return time, frequencies, amplitudes
return time, frequency, amplitude
plt.plot(time, frequencies)
dataset = 'D:\ jar project\ JAR\ 2020-06-22-aa\ beats-eod.dat'
t, f, a = parse_dataset(dataset)
plt.plot(t, f)
plt.show()