All methods demonstrated on this web page are based on the subsection Measuring Firing Rates of section 1.2 Spike Trains and Firing Rates of Dayan, P., Abbott, L. F., & Abbott, L. (2001). Theoretical neuroscience: Computational and mathematical modeling of neural systems.
Neurons communicate with each other by firing so-called action potentials . A single action potential usually has a duration of roughly one millisecond. If we ignore its duration, amplitude and shape, we can treat an action potential as a stereotypical on-off event, where a single action potential firing is called a spike. A sequence of spikes recorded over a single trial is called a spike train. If we record multiple trials we can average the number of spikes fired at a specific time point over these trials. The resulting value is the firing rate of the neuron at a specific time point. Since we can only record a limited number of trials the real firing rate can only be approximated but not determined exactly. In the following we will look at different methods to approximate firing rates. For demonstration purposes only a single spike train will be used. By averaging over multiple trials before applying any of the discussed methods, more accurate results can be achieved.
Spike Count RateThe simplest approach to measuring firing rates is to count the number of spikes occurring within a given time frame.
If we count over the whole trial we get the total number of spikes but loose all temporal resolution.
To know how the spike count changes over time we can subdivide the trial into smaller time bins.
The smaller the time bins the better the temporal resolution. But this comes at the expense of a decreasing rate resolution. For very small time bins the rate can only be either 1 or 0.
Window FunctionCounting spikes in pre-assigned time bins lets the firing rate approximation not only depend on the width of the time bins but also on their placement. By sliding a single time bin over the whole trial duration we can avoid the arbitrariness in placement.
Counting spikes within a window around a specific time point avoids arbitrariness in placing of time bins.
The resulting firing rate appears to have a better temporal resolution. But at time points close to each other, firing rates are correlated.
The same spikes are counted for different time points, when those time points have overlapping windows.
Linear FilterInstead of using a rectangular window function that weighs all spikes in the same way, other window functions can be used. A gaussian window function will weigh spikes that are further away from the time point less than near ones. This can provide a smooth window function. Instead of summing the values up in discrete time steps, the integral can be computed. Such firing rate functions are also called linear filters and their window functions are called kernels.