Spike Data#
braintools.spike holds spike data and the tools that produce and combine it. The SpikeTrains container stores the spike times of a population in a padded, fixed-shape layout that works under jax.jit and jax.vmap. The encoders turn numbers or stimuli into spike rasters, and the bitwise operations combine spike tensors and stay differentiable for surrogate-gradient spikes.
What you’ll find here#
Spike trains: the dense and event forms of a
SpikeTrainsand the conversions between them (from_dense,from_events,from_list,to_dense,to_events,to_list), binning, windows and neuron selections, units withdtandt_start, the capacityKand how overflow is reported underjitandvmap, the encoders, the bitwise operations, plotting a raster, ISI histogram and PSTH withbraintools.visualize, and spike statistics (CV, Fano factor, event-aligned PSTH) frombraintools.analysis.spike.
The spike-encoding tutorial covers all ten encoders in detail. For the full list of classes and functions, see the API reference.