# LFP plot options: lfpfname = '/home/mspacek/dev/blab/natmov/results/PVCre_0113/s01/PVCre_0113_s01_e11_LFP.mat' lfpchanis = [31] #range(32) # 0-based f1 = 59 # Hz relative2t0 = True lfpfigsize = 5, 2 # inches title = False width, tres = 2, 0.5 # s # plot LFP spectrograms: lfp = LFP(None, None) lfpmat = loadmat(lfpfname) ename = os.path.splitext(os.path.basename(lfpfname))[0].rstrip('_LFP') + '_specgram' lfp.data = lfpmat['lfp'] * 1000 # convert from mV to uV tlfp = intround(lfpmat['tlfp'][0] * 1e6) # convert from s to nearest us lfp.t0, lfp.t1 = tlfp[0], tlfp[-1] lfp.tres = intround((np.diff(tlfp)).mean()) # us lfp.sampfreq = intround(1e6 / lfp.tres) # Hz for chani in lfpchanis: lfp.specgram(f1=f1, chanis=chani, width=width, tres=tres, relative2t0=relative2t0, title=title, reclabel=False, figsize=lfpfigsize) titlestr = ename + '_c%d' % (chani+1) # 1-based chan ID gcfm().window.setWindowTitle(titlestr) # plot runspeed as a color map: width, tres = 10, 0.5 # s minspeed = 1 # cm/s, otherwise considered at rest runfname = '/home/mspacek/dev/blab/natmov/results/PVCre_0113/s01/PVCre_0113_s01_e11_runspeed.mat' runmat = loadmat(runfname) ename = os.path.splitext(os.path.basename(runfname))[0]