gauss function
This commit is contained in:
parent
f391261cea
commit
9952a13bf9
@ -18,8 +18,24 @@ for k in spikes.keys():
|
|||||||
else:
|
else:
|
||||||
df_map[df] = [k]
|
df_map[df] = [k]
|
||||||
|
|
||||||
embed()
|
spikes_mat = {}
|
||||||
exit()
|
for deltaf in df_map.keys():
|
||||||
|
for rep in df_map[deltaf]:
|
||||||
|
for phase in spikes[rep]:
|
||||||
|
#print(phase)
|
||||||
|
spikes_one_chirp = spikes[rep][phase]
|
||||||
|
if deltaf == '-50Hz' and phase == (9, 0.54):
|
||||||
|
spikes_mat[deltaf, rep, phase] = spikes_one_chirp
|
||||||
|
|
||||||
|
#embed()
|
||||||
|
#exit()
|
||||||
|
|
||||||
plot_spikes = spikes[(0, '-50Hz', '20%', '100Hz')][(0, 0.789)]
|
plot_spikes = spikes[(0, '-50Hz', '20%', '100Hz')][(0, 0.789)]
|
||||||
plt.scatter(plot_spikes, np.ones(len(plot_spikes)))
|
#hist_data = plt.hist(plot_spikes, bins=np.arange(-200, 400, 20))
|
||||||
|
fig, ax = plt.subplots()
|
||||||
|
ax.scatter(plot_spikes, np.ones(len(plot_spikes))*10, marker='|', color='k')
|
||||||
|
#ax.plot(hist_data[1][:-1], hist_data[0])
|
||||||
plt.show()
|
plt.show()
|
||||||
|
|
||||||
|
#embed()
|
||||||
|
#exit()
|
||||||
|
@ -17,3 +17,9 @@ def vector_strength(spike_times, eod_durations):
|
|||||||
phase_times[i] = (spike_times[i] / eod_durations[i]) * 2 * np.pi
|
phase_times[i] = (spike_times[i] / eod_durations[i]) * 2 * np.pi
|
||||||
vs = np.sqrt((1/n*sum(np.cos(phase_times)))**2 + (1/n*sum(np.sin(phase_times)))**2)
|
vs = np.sqrt((1/n*sum(np.cos(phase_times)))**2 + (1/n*sum(np.sin(phase_times)))**2)
|
||||||
return vs
|
return vs
|
||||||
|
|
||||||
|
|
||||||
|
def gaussian(x, mu, sig):
|
||||||
|
y = np.exp(-np.power(x - mu, 2.) / (2 * np.power(sig, 2.)))
|
||||||
|
return y
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user