From b14fc1a294896fd83b5627415042efa63929e687 Mon Sep 17 00:00:00 2001 From: Lisa Date: Thu, 8 Aug 2019 13:16:12 +0200 Subject: [PATCH] first plot works --- ephys_analysis.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ephys_analysis.py b/ephys_analysis.py index 468ce20..d627a3f 100644 --- a/ephys_analysis.py +++ b/ephys_analysis.py @@ -48,9 +48,16 @@ if __name__ == '__main__': data_set + '.nix')) print(len(spike_data)) stims = [] - # for i in range(len(stim_pos)): - # embed() - # plt.plot(stim_pos) + for i in range(len(stim_pos)): + stim_y = [-38, -38] + plt.plot([stim_pos[i], stim_pos[i] + stim_extent[i]], stim_y, 'k') plt.plot(dims[:-1], voltage_trace[:-1]) - plt.scatter(spike_data[:-1], np.ones(len(spike_data)-1)*np.max(voltage_trace)) + spike_y = np.ones(len(spike_data))*80 + + for j in range(len(spike_data)): + print('length of current spike train: ', len(spike_data)) + for k in range(len(spike_data[j])): + print('current spike time is: ', spike_data[j][k]) + plt.plot(spike_data[j][k], -40, 'o', color='k') + plt.ylim([-100, -30]) plt.show() \ No newline at end of file