Peristimulus time histogram
In neurophysiology, peristimulus time histogram and poststimulus time histogram, both abbreviated PSTH or PST histogram, are histograms of the times at which neurons fire. It is also sometimes called pre event time histogram or PETH. These histograms are used to visualize the rate and timing of neuronal spike discharges in relation to an external stimulus or event. The peristimulus time histogram is sometimes called perievent time histogram, and post-stimulus and peri-stimulus are often hyphenated.
The prefix peri, for through, is typically used in the case of periodic stimuli, in which case the PSTH show neuron firing times wrapped to one cycle of the stimulus. The prefix post is used when the PSTH shows the timing of neuron firings in response to a stimulus event or onset.
To make a PSTH, a spike train recorded from a single neuron is aligned with the onset, or a fixed phase point, of an identical stimulus repeatedly presented to an animal. The aligned sequences are superimposed in time, and then used to construct a histogram.
- Align spike sequences with the onset of a stimulus that is repeated n times. For periodic stimuli, wrap the response sequence back to time zero after each time period T, and count n as the total number of periods of data.
- Divide the stimulus period or observation period T into N bins of size .
- Count the number of spikes ki from all n sequences that fall in the bin i.
- Draw a bar-graph histogram with the bar-height of bin i given by in units of estimated spikes per second at time .
The optimal bin size (assuming an underlying Poisson point process) Δ is a minimizer of the formula, (2k-v)/Δ2, where k and v are mean and variance of ki. 
- Franklin Bretschneider and Jan R. De Weille (2006). Introduction to Electrophysiological Methods and Instrumentation. Academic Press. ISBN 0-12-370588-6. Retrieved 2016-05-29.
- Palm, G.; Aertsen, A. M.; Gerstein, G. L. (1988). "On the significance of correlations among neuronal spike trains". Biological Cybernetics. 59 (1): 1–11. doi:10.1007/BF00336885. PMID 3401513.
- Shimazaki, H.; Shinomoto, S. (2007). "A method for selecting the bin size of a time histogram". Neural Computation. 19 (6): 1503–152. doi:10.1162/neco.2007.19.6.1503. PMID 17444758.