Spike Analysis
This four-week online course covers the visualization and analysis of spike trains with Python, including their variability and correlations, as well as spike sorting and dimensionality reduction.
The analysis of neural spiking sits at the core of computational neuroscience. But how are spikes represented in data? What tools are available to analyze and visualize them, and how can we make sense of large amounts of spiking data?
In this hands-on course, participants will explore electrophysiological data, both real and simulated, to investigate the firing patterns of single neurons and neural populations. Participants will learn to extract spikes from raw extracellular recordings using spike sorting and visualize spiking activity with raster plots, PSTHs, and receptive field maps. They will analyze spike-train variability and correlations, use statistical modeling approaches such as Poisson-based generative models, examine spike synchrony and patterns, and identify low-dimensional subspaces in population activity.
Practical work uses Python’s core scientific stack, including NumPy, SciPy, Pandas, Matplotlib, Seaborn, and Scikit-learn, together with neuroscience-specific tools including Neo, Elephant, and SpikeInterface.
Course Outline
The course meets weekly. Each course day consists of a 3.5-hour live online session and a homework assignment for a total workload of 30 hours.
Session 1: Spike Metrics and Visualizations
Process spike times using NumPy arrays and Pandas DataFrames and characterize neural firing using firing rates, inter-spike intervals, raster plots, and other visualizations. Compute peristimulus time histograms and receptive field maps to investigate how neurons respond to stimuli in Neuropixels recordings.
Session 2: Assessing Spike Train Variability
Use Poisson-process simulations to develop generative models of neural firing and compare them with real cortical activity. Quantify within- and between-trial variability using the coefficient of variation, local variation, and Fano factor with Elephant, and visualize variability in macaque motor-cortex recordings.
Session 3: Simulating and Organizing Electrophysiological Data
Simulate spiking neurons with NEST Desktop and organize the resulting electrophysiological data with Neo. Learn how Neo represents recordings and convert NEST simulation output into Neo data structures for further analysis.
Session 4: Correlation and Synchrony of Spike Trains
Analyze relationships between neurons using correlation coefficients, the spike-time tiling coefficient, and cross-correlations. Use surrogate data to test whether observed correlations exceed null-model expectations and apply unitary event analysis and SPADE to detect recurring patterns of synchronous activity.
Session 5: Electrophysiology at Scale
Work with modern large-scale extracellular recordings in the EBRAINS Collaboratory cloud platform using SpikeInterface and spike-sorting pipelines. Assess detected units with quality metrics including presence ratio, ISI violations, signal-to-noise ratio, and d-prime, then apply PCA with Scikit-learn to characterize low-dimensional structure in population activity.
Session 6: State-Space Analysis of Neural Populations
Represent neural population activity using binary codes and examine population energies with the pairwise maximum-entropy (Ising) model. Fit the model with an EM algorithm to assess how well pairwise interactions account for population variability, analyze how correlations change over time, and quantify their uncertainty.
Learning and participation
Topics
- Spike Metrics and Visualizations: computing ISIs, firing rates, and PSTHs with NumPy, Pandas, Matplotlib, and Seaborn.
- Spike Time Variability: estimating variability using CV, LV, and the Fano factor in Elephant.
- Working With Population Data: spike-train correlations, synchronicity, and dimensionality reduction with Elephant and Scikit-Learn.
- Spike Sorting: spike detection, clustering and sorting pipelines with SpikeInterface in the EBRAINS Collaboratory.
Intended participants
- Researchers and students from all universities are welcome.
- Participants of all educational backgrounds are welcome.
- Comfort with Python data analysis and basic familiarity with electrophysiology concepts are helpful.
Useful resources for preparation
Certification
Participants who attend at least 75% of the course and complete the assignments will receive a certificate by email at the end of the course.