12345678910111213 |
- # whole file
- # nperseg = data01.shape[0] // 20
- nperseg = 1000
- t_stop = 60 * 1000
- ff, tt, Sxx1 = signal.spectrogram(data01[:t_stop, :], params.lfp.fs, axis=0, nperseg=nperseg, noverlap=int(nperseg * 0.5))
- # t_idx = (tt > 0) & (tt < 200)
- f_idx = (ff > 0) & (ff < 100)
- print(ff.shape)
- plt.clf()
- plt.pcolormesh(tt, ff[f_idx], np.log10(Sxx1[f_idx, 3, :]))
- # plt.pcolormesh(tt, ff[f_idx], Sxx1[f_idx, 8, :])
- plt.show()
|