spiketools.measures.trials.compute_pre_post_averages¶
- spiketools.measures.trials.compute_pre_post_averages(frs_pre, frs_post, avg_type='mean')[source]¶
Compute the average firing rate across pre & post event windows.
- Parameters:
- frs_pre, frs_post1d array
Firing rates across pre & post event windows.
- avg_type{‘mean’, ‘median’}
The type of averaging function to use.
- Returns:
- avg_pre, avg_postfloat
The average firing rates for the pre & post event windows.
Examples
Compute the average pre & post event firing rates:
>>> frs_pre = np.array([5, 3, 1]) >>> frs_post = np.array([12, 8, 10]) >>> compute_pre_post_averages(frs_pre, frs_post, avg_type='mean') (3.0, 10.0)