summaryrefslogtreecommitdiff
path: root/examples/spike_sync.py
diff options
context:
space:
mode:
authorMario Mulansky <mario.mulansky@gmx.net>2015-02-03 16:40:55 +0100
committerMario Mulansky <mario.mulansky@gmx.net>2015-02-03 16:40:55 +0100
commit7989b2d337a0e5d2e0223d7fdec73833ff47c7bb (patch)
tree6d4fcfd1cf8ab3743ff023d361414d6c967d88e0 /examples/spike_sync.py
parentea61fc2ed03e42b3ea159b7ef7886d005c90e29f (diff)
first version of psth profile
Diffstat (limited to 'examples/spike_sync.py')
-rw-r--r--examples/spike_sync.py8
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())