buh
This commit is contained in:
parent
da80327826
commit
4d5110c4b9
@ -81,8 +81,8 @@ ax3.set_ylabel('EOD [mV]', fontsize=22)
|
||||
ax3.xaxis.set_tick_params(labelsize=18)
|
||||
ax3.yaxis.set_tick_params(labelsize=18)
|
||||
|
||||
ax3.set_xlabel('time [ms]', fontsize=22)
|
||||
ax4.set_xlabel('time [ms]', fontsize=22)
|
||||
ax3.set_xlabel('Time [ms]', fontsize=22)
|
||||
ax4.set_xlabel('Time [ms]', fontsize=22)
|
||||
ax4.xaxis.set_tick_params(labelsize=18)
|
||||
ax4.set_yticklabels([])
|
||||
|
||||
|
@ -28,9 +28,9 @@ fig, ax = plt.subplots(figsize=(20/inch_factor, 10/inch_factor))
|
||||
plt.plot(time[10000:20000]*1000, ampl, color='royalblue')
|
||||
plt.plot(time[10000:20000][p]*1000, ampl[p], lw=2, color='k')
|
||||
plt.plot(time[10000:20000][t]*1000, ampl[t], lw=2, color='k')
|
||||
ax.set_xlabel("time [ms]", fontsize = 22)
|
||||
ax.set_xlabel("Time [ms]", fontsize = 22)
|
||||
plt.xticks(fontsize = 18)
|
||||
ax.set_ylabel("eod amplitude [mV]", fontsize = 22)
|
||||
ax.set_ylabel("EOD amplitude [mV]", fontsize = 22)
|
||||
plt.yticks(fontsize = 18)
|
||||
ax.spines["top"].set_visible(False)
|
||||
ax.spines["right"].set_visible(False)
|
||||
|
@ -26,7 +26,6 @@ eod_times = time[(eod_norm >= threshold) & (shift_eod < threshold)]
|
||||
|
||||
eod_duration = eod_times[2]- eod_times[1] #time in s
|
||||
|
||||
eod_duration = eod_times[2]- eod_times[1]
|
||||
|
||||
|
||||
|
||||
@ -37,9 +36,9 @@ interspikeintervals = np.diff(spikes)/eod_duration
|
||||
|
||||
fig, ax = plt.subplots(figsize=(20/inch_factor, 10/inch_factor))
|
||||
plt.hist(interspikeintervals, bins=np.arange(0, np.max(interspikeintervals), 0.1), color='royalblue')
|
||||
plt.xlabel("eod cycles", fontsize = 22)
|
||||
plt.xlabel("EOD cycles", fontsize = 22)
|
||||
plt.xticks(fontsize = 18)
|
||||
plt.ylabel("number of \n interspikeintervals", fontsize = 22)
|
||||
plt.ylabel("Number of \n interspikeintervals", fontsize = 22)
|
||||
plt.yticks(fontsize = 18)
|
||||
ax.spines["top"].set_visible(False)
|
||||
ax.spines["right"].set_visible(False)
|
||||
@ -91,8 +90,8 @@ time_axis = np.arange(max_cut)/sampling_rate*1000
|
||||
# plot eod form and spike histogram
|
||||
fig, ax1 = plt.subplots(figsize=(20/inch_factor, 10/inch_factor))
|
||||
ax1.hist(spike_times, color='firebrick')
|
||||
ax1.set_xlabel('time [ms]', fontsize=22)
|
||||
ax1.set_ylabel('number', fontsize=22)
|
||||
ax1.set_xlabel('Time [ms]', fontsize=22)
|
||||
ax1.set_ylabel('Number', fontsize=22)
|
||||
ax1.tick_params(axis='y', labelcolor='firebrick')
|
||||
plt.xticks(fontsize=18)
|
||||
plt.yticks(fontsize=18)
|
||||
@ -101,7 +100,7 @@ ax1.spines['top'].set_visible(False)
|
||||
ax2 = ax1.twinx()
|
||||
ax2.fill_between(time_axis, mu_eod+std_eod, mu_eod-std_eod, color='royalblue', alpha=0.5)
|
||||
ax2.plot(time_axis, mu_eod, color='black', lw=2)
|
||||
ax2.set_ylabel('voltage [mV]', fontsize=22)
|
||||
ax2.set_ylabel('Voltage [mV]', fontsize=22)
|
||||
ax2.tick_params(axis='y', labelcolor='royalblue')
|
||||
ax2.spines['top'].set_visible(False)
|
||||
|
||||
|
@ -8,7 +8,7 @@ from IPython import embed
|
||||
# define sampling rate and data path
|
||||
sampling_rate = 40 #kHz
|
||||
data_dir = "../data"
|
||||
dataset = "2018-11-09-ad-invivo-1"
|
||||
dataset = "2018-11-14-al-invivo-1"
|
||||
inch_factor = 2.54
|
||||
# parameters for binning, smoothing and plotting
|
||||
cut_window = 60
|
||||
@ -88,14 +88,14 @@ for df in df_phase_time.keys():
|
||||
ax[1].plot(time_axis[0+5*sampling_rate:-5*sampling_rate], smoothed_spikes[0+5*sampling_rate:-5*sampling_rate]*1000, color='royalblue', lw = 2)
|
||||
|
||||
ax[0].set_title('$\Delta$f = %s Hz' %(df), fontsize = 18)
|
||||
ax[0].set_ylabel('repetition', fontsize=22)
|
||||
ax[0].set_ylabel('Repetition', fontsize=22)
|
||||
ax[0].yaxis.set_label_coords(-0.1, 0.5)
|
||||
ax[0].set_yticks(np.arange(1, len(plot_trials)+1,2))
|
||||
ax[0].set_yticklabels(np.arange(1, len(plot_trials)+1,2), fontsize=18)
|
||||
|
||||
ax[1].set_xlabel('time [ms]', fontsize=22)
|
||||
ax[1].set_xlabel('Time [ms]', fontsize=22)
|
||||
ax[1].yaxis.set_label_coords(-0.1, 0.5)
|
||||
ax[1].set_ylabel('firing rate [Hz]', fontsize=22)
|
||||
ax[1].set_ylabel('Firing rate [Hz]', fontsize=22)
|
||||
plt.xticks(fontsize=18)
|
||||
plt.yticks(fontsize=18)
|
||||
fig.tight_layout()
|
||||
|
@ -47,8 +47,8 @@ ax1.set_ylabel("field [mV]", fontsize = 22)
|
||||
|
||||
|
||||
ax1.yaxis.set_label_coords(-0.1, 0.5)
|
||||
ax2.set_xlabel("time [ms]", fontsize = 22)
|
||||
ax2.set_ylabel("frequency [Hz]", fontsize = 22)
|
||||
ax2.set_xlabel("Time [ms]", fontsize = 22)
|
||||
ax2.set_ylabel("Frequency [Hz]", fontsize = 22)
|
||||
ax2.yaxis.set_label_coords(-0.1, 0.5)
|
||||
plt.xticks(fontsize=18)
|
||||
plt.yticks(fontsize=18)
|
||||
|
Loading…
Reference in New Issue
Block a user