08.07 analysis step_stimulus not perfect, but works

This commit is contained in:
xaver 2020-07-08 14:36:21 +02:00
parent f80f6b7583
commit 275b4bc473

View File

@ -40,7 +40,7 @@ for infodataset in infodatasets:
ID.append(identifier) ID.append(identifier)
for dataset in datasets: for idx, dataset in enumerate(datasets):
#input of the function #input of the function
frequency, time, amplitude, eodf, deltaf, stimulusf, duration, pause = parse_dataset(dataset) frequency, time, amplitude, eodf, deltaf, stimulusf, duration, pause = parse_dataset(dataset)
dm = np.mean(duration) dm = np.mean(duration)
@ -62,7 +62,7 @@ for dataset in datasets:
freq_all.append(norm.tolist()) freq_all.append(norm.tolist())
time_all.append(ct_arr) time_all.append(ct_arr)
plt.plot(ct_arr, norm, color = 'grey', label='fish=%s' % ID) plt.plot(ct_arr, norm, color = 'grey', label='fish=%s' % ID[idx])
# fit function # fit function
sv, sc = curve_fit(step_response, ct_arr[ct_arr < dm], norm[ct_arr < dm]) #step_values and step_cov sv, sc = curve_fit(step_response, ct_arr[ct_arr < dm], norm[ct_arr < dm]) #step_values and step_cov