diff options
Diffstat (limited to 'code/glue/plot_spike_time_hist')
-rwxr-xr-x | code/glue/plot_spike_time_hist | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/code/glue/plot_spike_time_hist b/code/glue/plot_spike_time_hist new file mode 100755 index 0000000..ad45305 --- /dev/null +++ b/code/glue/plot_spike_time_hist @@ -0,0 +1,19 @@ +#!/bin/bash + +if [ -f "spikes.out" ]; then + cat spikes.out | cut -d, -f1 > spikes.out.timing + + echo "x = load('spikes.out.timing'); + y = hist(x, ceil(max(x)/10)); + y'" \ + | octave -q \ + | tr -dc "0123456789.\n" \ + | grep -v "^$" \ + > spikes.out.binned-timing + + echo "set title 'population frequency $PWD' + set terminal postscript + set output 'spikes.out.binned-timing.ps' + plot 'spikes.out.binned-timing' using 1 with lines" \ + | gnuplot +fi
\ No newline at end of file |