Spike train generation

Functions to generate/extract spike trains from analog signals, or to generate random spike trains.

Extract spike times from time series

spike_extraction(signal[, threshold, sign, …]) Return the peak times for all events that cross threshold and the waveforms.
threshold_detection(signal[, threshold, sign]) Returns the times when the analog signal crosses a threshold.
peak_detection(signal[, threshold, sign, …]) Return the peak times for all events that cross threshold.

Random spike train processes

homogeneous_poisson_process(rate[, t_start, …]) Returns a spike train whose spikes are a realization of a Poisson process with the given rate, starting at time t_start and stopping time t_stop.
inhomogeneous_poisson_process(rate[, …]) Returns a spike train whose spikes are a realization of an inhomogeneous Poisson process with the given rate profile.
homogeneous_gamma_process(a, b[, t_start, …]) Returns a spike train whose spikes are a realization of a gamma process with the given parameters, starting at time t_start and stopping time t_stop (average rate will be b/a).
inhomogeneous_gamma_process(rate, shape_factor) Returns a spike train whose spikes are a realization of an inhomogeneous Gamma process with the given rate profile and the given shape factor [gen2].

Coincident spike times generation

single_interaction_process(rate, …[, …]) Generates a multidimensional Poisson SIP (single interaction process) plus independent Poisson processes [gen3].
compound_poisson_process(rate, …[, shift, …]) Generate a Compound Poisson Process (CPP; see [gen1]) with a given amplitude_distribution A and stationary marginal rates rate.

Some functions are based on the NeuroTools stgen module, which was mostly written by Eilif Muller, or from the NeuroTools signals.analogs module.

References

[gen1]Benjamin Staude, Stefan Rotter, and Sonja Grün. Cubic: cumulant based inference of higher-order correlations in massively parallel spike trains. Journal of computational neuroscience, 29(1-2):327–350, 2010.
[gen2]Martin P Nawrot, Clemens Boucsein, Victor Rodriguez Molina, Alexa Riehle, Ad Aertsen, and Stefan Rotter. Measurement of variability dynamics in cortical spike trains. Journal of neuroscience methods, 169(2):374–390, 2008.
[gen3]Alexandre Kuhn, Ad Aertsen, and Stefan Rotter. Higher-order statistics of input ensembles and the response of simple model neurons. Neural computation, 15(1):67–101, 2003.