This commit is contained in:
efish 2018-11-29 09:30:10 +01:00
parent 3bcc778045
commit e7e8206100
2 changed files with 4 additions and 6 deletions

View File

@ -14,21 +14,19 @@ dataset = '2018-11-14-al-invivo-1'
# read eod and time of baseline
time, eod = read_baseline_eod(os.path.join(data_dir, dataset))
<<<<<<< HEAD
eod_norm = eod - np.mean(eod)
# calculate eod times and indices by zero crossings
threshold = 0
shift_eod = np.roll(eod_norm, 1)
eod_times = time[(eod_norm >= threshold) & (shift_eod < threshold)]
eod_times = time[(eod_norm >= threshold) & (shift_eod < threshold)]*40000
eod_duration = eod_times[2]- eod_times[1]
=======
>>>>>>> 5cd62554fa5af12a6a50661f0a60cd2b0457e702
# read spikes during baseline activity
spikes = read_baseline_spikes(os.path.join(data_dir, dataset))
# calculate interpike intervals and plot them

View File

@ -40,8 +40,8 @@ ax1 = fig.add_subplot(211)
plt.yticks(fontsize=18)
ax2 = fig.add_subplot(212, sharex=ax1)
plt.setp(ax1.get_xticklabels(), visible=False)
ax1.plot(time*1000, signal, color = 'midnightblue', lw = 1)
ax2.plot(time*1000, freq, color = 'midnightblue', lw = 3)
ax1.plot(time*1000, signal, color = 'royalblue', lw = 1)
ax2.plot(time*1000, freq, color = 'royalblue', lw = 3)
ax1.set_ylabel("field [mV]", fontsize = 22)