huhu
This commit is contained in:
parent
6fdf60f69e
commit
275bd7a9b8
@ -20,9 +20,18 @@ spikes = read_baseline_spikes(os.path.join(data_dir, dataset))
|
||||
# calculate interpike intervals and plot them
|
||||
interspikeintervals = np.diff(spikes)
|
||||
|
||||
fig, ax = plt.subplots(figsize=(12/inch_factor, 8/inch_factor))
|
||||
plt.hist(interspikeintervals, bins=np.arange(0, np.max(interspikeintervals), 0.0001))
|
||||
plt.show()
|
||||
fig, ax = plt.subplots(figsize=(20/inch_factor, 10/inch_factor))
|
||||
plt.hist(interspikeintervals, bins=np.arange(0, np.max(interspikeintervals), 0.0001), color='darkblue')
|
||||
plt.xlabel("time [ms]", fontsize = 22)
|
||||
plt.xticks(fontsize = 18)
|
||||
plt.ylabel("number of \n interspikeintervals", fontsize = 22)
|
||||
plt.yticks(fontsize = 18)
|
||||
ax.spines["top"].set_visible(False)
|
||||
ax.spines["right"].set_visible(False)
|
||||
fig.tight_layout()
|
||||
#plt.show()
|
||||
plt.savefig('isis.pdf')
|
||||
|
||||
|
||||
# calculate coefficient of variation
|
||||
mu = np.mean(interspikeintervals)
|
||||
@ -64,21 +73,23 @@ std_eod = np.nanstd(eod_cuts, axis=0)*3
|
||||
time_axis = np.arange(max_cut)/sampling_rate*1000
|
||||
|
||||
# plot eod form and spike histogram
|
||||
fig, ax1 = plt.subplots(figsize=(12/inch_factor, 8/inch_factor))
|
||||
ax1.hist(spike_times, color='crimson')
|
||||
ax1.set_xlabel('time [ms]', fontsize=12)
|
||||
ax1.set_ylabel('number', fontsize=12)
|
||||
ax1.tick_params(axis='y', labelcolor='crimson')
|
||||
plt.yticks(fontsize=8)
|
||||
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.tick_params(axis='y', labelcolor='firebrick')
|
||||
plt.xticks(fontsize=18)
|
||||
plt.yticks(fontsize=18)
|
||||
ax1.spines['top'].set_visible(False)
|
||||
|
||||
ax2 = ax1.twinx()
|
||||
ax2.fill_between(time_axis, mu_eod+std_eod, mu_eod-std_eod, color='dodgerblue', alpha=0.5)
|
||||
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=12)
|
||||
ax2.tick_params(axis='y', labelcolor='dodgerblue')
|
||||
ax2.set_ylabel('voltage [mV]', fontsize=22)
|
||||
ax2.tick_params(axis='y', labelcolor='darkblue')
|
||||
ax2.spines['top'].set_visible(False)
|
||||
|
||||
plt.xticks(fontsize=8)
|
||||
plt.yticks(fontsize=8)
|
||||
plt.yticks(fontsize=18)
|
||||
fig.tight_layout()
|
||||
plt.show()
|
||||
#plt.show()
|
||||
plt.savefig('eodform_spikehist.pdf')
|
@ -15,11 +15,19 @@ spikes = read_baseline_spikes(os.path.join(data_dir, dataset))
|
||||
# calculate interpike intervals and plot them
|
||||
interspikeintervals = np.diff(spikes)*1000
|
||||
|
||||
fig, ax = plt.subplots(figsize=(12/inch_factor, 8/inch_factor))
|
||||
plt.hist(interspikeintervals, bins=np.arange(0, np.max(interspikeintervals), 0.1))
|
||||
ax.set_xlabel('time [ms]', fontsize=14)
|
||||
ax.set_ylabel('number of interspikeintervals', fontsize=14)
|
||||
fig, ax = plt.subplots(figsize=(20/inch_factor, 10/inch_factor))
|
||||
plt.hist(interspikeintervals, bins=np.arange(0, np.max(interspikeintervals), 0.0001), color='darkblue')
|
||||
plt.xlabel("time [ms]", fontsize = 22)
|
||||
plt.xticks(fontsize = 18)
|
||||
plt.ylabel("Number of \n Interspikeinterval", fontsize = 22)
|
||||
plt.yticks(fontsize = 18)
|
||||
ax.spines["top"].set_visible(False)
|
||||
ax.spines["right"].set_visible(False)
|
||||
fig.tight_layout()
|
||||
plt.show()
|
||||
plt.show()
|
||||
#plt.savefig('isis.pdf')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user