lfp_aux1.py 414 B

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