44 lines
1.4 KiB
Python
44 lines
1.4 KiB
Python
import os
|
|
import numpy as np
|
|
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()
|
|
|
|
|