Skip to content

Commit

Permalink
Update example with mean spike rate calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
ntolley authored and jasmainak committed Sep 27, 2020
1 parent b8e5ce6 commit be56b8f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions examples/plot_simulate_evoked.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,19 @@
spikes = read_spikes(op.join(tmp_dir_name, 'spk_*.txt'))
spikes.plot()

###############################################################################
# We can additionally calculate the mean spike rates for each cell class by
# specifying a time window with tstart and tstop.
all_rates = spikes.mean_rates(tstart=0, tstop=170, gid_dict=net.gid_dict,
mean_type='all')
trial_rates = spikes.mean_rates(tstart=0, tstop=170, gid_dict=net.gid_dict,
mean_type='trial')
print('Mean spike rates across trials:')
print(all_rates)
print('Mean spike rates for individual trials:')
print(trial_rates)


###############################################################################
# Now, let us try to make the exogenous driving inputs to the cells
# synchronous and see what happens
Expand Down

0 comments on commit be56b8f

Please sign in to comment.