49 lines
1.6 KiB
Python
49 lines
1.6 KiB
Python
import os
|
|
import numpy as np
|
|
import matplotlib.pyplot as plt
|
|
from IPython import embed
|
|
from jar_functions import mean_noise_cut
|
|
from matplotlib.mlab import specgram
|
|
import DataLoader as dl
|
|
|
|
#print(np.logspace(-3, 1, 10))
|
|
'''for idx, dataset in enumerate(datasets):
|
|
datapath = os.path.join(base_path, dataset)
|
|
for info, key, time, data in dl.iload_traces(datapath, repro='Beats', before=0.0, after=0.0):
|
|
'''
|
|
|
|
'''base_path = 'D:\\jar_project\\JAR'
|
|
|
|
#nicht: -5Hz delta f, 19-aa, 22-ae, 22-ad (?)
|
|
datasets = [#'2020-06-19-aa', #-5Hz delta f, horrible fit
|
|
#'2020-06-19-ab', #-5Hz delta f, bad fit
|
|
#'2020-06-22-aa', #-5Hz delta f, bad fit
|
|
#'2020-06-22-ab', #-5Hz delta f, bad fit
|
|
#'2020-06-22-ac', #-15Hz delta f, good fit
|
|
#'2020-06-22-ad', #-15Hz delta f, horrible fit
|
|
#'2020-06-22-ae', #-15Hz delta f, horrible fit
|
|
'2020-06-22-af', #-15Hz delta f, good fit
|
|
#'2020-07-21-ak' #sin
|
|
]
|
|
for idx, dataset in enumerate(datasets):
|
|
datapath = os.path.join(base_path, dataset)
|
|
for info, key, time, data in dl.iload_traces(datapath, repro='Beats', before=0.0, after=0.0):
|
|
print(data[0])
|
|
|
|
dat = np.arange(100)
|
|
|
|
for d in range(int(len(data)/10)):
|
|
nfft = 2
|
|
|
|
spec, freqs, times = specgram(data[0][d*10:(d+1)*10], NFFT=nfft, noverlap=nfft*0.5)
|
|
|
|
#print(freqs)
|
|
#print(times)
|
|
embed()'''
|
|
|
|
g = [1.2917623576698833, -5.479055166593157, -2.689492238578325, -0.11604244418416806, -0.05353823781665627]
|
|
a = [0.2, 0.002, 0.02, 0.5, 1.0]
|
|
|
|
plt.plot(a, g)
|
|
plt.show()
|