diff options
Diffstat (limited to 'examples/spike_sync.py')
-rw-r--r-- | examples/spike_sync.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/spike_sync.py b/examples/spike_sync.py index 7f9e762..9c5f75c 100644 --- a/examples/spike_sync.py +++ b/examples/spike_sync.py @@ -30,6 +30,8 @@ plt.legend(loc="center right") plt.figure() +plt.subplot(211) + f = spk.spike_sync_profile_multi(spike_trains) x, y = f.get_plottable_data() plt.plot(x, y, '-b', alpha=0.7, label="SPIKE-Sync profile") @@ -37,6 +39,12 @@ plt.plot(x, y, '-b', alpha=0.7, label="SPIKE-Sync profile") x1, y1 = f.get_plottable_data(averaging_window_size=50) plt.plot(x1, y1, '-k', lw=2.5, label="averaged SPIKE-Sync profile") +plt.subplot(212) + +f_psth = spk.psth(spike_trains, bin_size=5.0) +x, y = f_psth.get_plottable_data() +plt.plot(x, y, '-k', alpha=1.0, label="PSTH") + print("Average:", f.avrg()) |