Extracellular Electrophysiology

Session 1

OSSS Ephys Course 2026

The instructor team


Enny van Beest


Alessio Buccino


Chris Halcrow


Olivier Winter


Wolf De Wulf


Joe Ziminski

Backgrounds

What is your research / academic background?

menti.com/?code=67083044

Research interests

What is your current research interest?

menti.com/?code=67083044

Today’s session

  1. Course Introduction
  2. Introduction to extracellular electrophysiology
  3. Coding a full pipeline with SpikeInterface

Course objectives

  • Gain hands-on experience implementing an extracellular electrophysiology pipeline
  • Introduce the underlying theory of the processing steps
  • Have fun! meet people, collaborate, and discuss your own data

Timeline

Session When
Session 1: Introduction Monday, 10:00-13:00
Session 2: Data quality and preprocessing Tuesday, 10:00-13:00
Session 3: Sorting and UnitMatch Tuesday, 14:00-17:00
Session 4: Postprocessing and Curation Wednesday, 10:00-13:00
Session 5: Analysis (Pynapple and Probe-anatomy alignment) Wednesday, 14:00-17:00

Course book

  • We will work through the course book available at:
    neuroinformatics.dev/course_ephys_osss

  • Feel free to open this link now (these slides are Chapter 2).

  • We will work through Chapter 3 today.

Your own data

  • We welcome you trying out the methods discussed on your own data
  • Please feel free to ask questions related to your own data at any point
  • If you are already familiar with the concepts covered in exercises, feel free to apply the methods discussed on your own data

Own data?

Do you have your own data?

menti.com/?code=67083044

Coding sections

  • We will go through core sections together, with time for exercises and free coding
  • Writing code by hand improves understanding
    • (avoid using LLMs)
  • This is particularly true for debugging - if stuck, ask your neighbor or a TA!

 

So each of these breakthroughs, they are the culmination of, and couldn’t exist without, the many months of stumbling around in the dark that precede them.

Andrew Wiles, solved Fermat’s Last Theorem

Focusing on important questions puts us in the awkward position of being ignorant. One of the beautiful things about science is that it allows us to bumble along, getting it wrong time after time, and feel perfectly fine as long as we learn something each time.

Martin Schwartz, professor of cell biology

If I spend an entire day and all I do is understand this one feature of this one object that I didn’t understand before, then that’s a great day.

PhD student

Being comfortable
in confusion

My advisor once told me that doing science is 98% being confused and 2% figuring it out.

PhD student

When you allow yourself to be confused you become far more introspective; you gain the clarity you desire by questioning and reconciling a variety of ideas and alternatives that may feel overwhelming.

Peter Winick, CEO of Thought Leadership

Introduction to extracellular electrophysiology

Method overview

Implant recording, target area, and example extracellular traces across days Implant recording, target area, and extracellular traces with spikes highlighted across days

1. Implant recording electrode
2. Record during behavior of interest
3. Identify action potentials in the recorded trace
4. Assign action potentials to neurons with spike sorting
5. Understand how neural activity encodes behavior

Classic findings

Orientation selectivity (Hubel and Wiesel, 1962)

Orientation tuning curve and preferred orientation schematic

Hippocampal space encoding

In the clinic

Evolution of recording devices

Timeline of recording devices

Extracellular electrophysiological data

Extracellular electrophysiology line traces across channels

Extracellular electrophysiological data

Extracellular electrophysiology spatial map view

The action potential

Extracellular action potential voltage field around a neuron from Gold et al. 2006

From Gold et al. (2006)

The recording setup

Electrode to amplifier to analog to digital conversion to computer recording setup

Preprocessing

Preprocessing step

 

Sorting

Spike sorting step

UnitMatching

UnitMatching step

Postprocessing

Postprocessing step

Analysis

Analysis step

SpikeInterface

A common API for open-source electrophysiological tools

SpikeInterface common API for open-source electrophysiological tools

Building a pipeline in Python

Course setup

  • The setup instructions are on the ‘Python setup’ page of the course handbook:

neuroinformatics.dev/course_ephys_osss/setup

  • We will go through it together now
  • ✅ uv environment linked to IDE

Downloading data for the course

Download everything you need for the course from:

  • The course Zenodo repository — all core datasets.
    • ✅ sub-001_ses-001_g0_t0.imec0.ap.bin
    • ✅ sub-001_ses-001_g0_t0.imec0.ap.meta
  • The AL032 dataset from Dropbox — UnitMatch chapter.
  • (optional) The larger EB055 dataset from the same Dropbox — UnitMatch extended exercises.

Python imports

from pathlib import Path
import matplotlib.pyplot as plt
import spikeinterface.full as si
from probeinterface.plotting import plot_probe
from spikeinterface_gui import run_mainwindow

print("Finished importing")

Feedback

Day 1 feedback board

Appendix

Data checks

SpikeGLXRecordingExtractor: 384 channels - 30.0kHz - 1 segments - 75,000 samples - 2.50s
                            int16 dtype - 54.93 MiB
  • Samples: 2.50 s × 30,000 Hz = 75,000 samples per channel
  • Bytes: 75,000 samples × 2 bytes × 384 channels = 57,600,000 bytes
  • = 57.6 MB (megabytes, ÷1000³) = 54.93 MiB (mebibytes, ÷1024³)

Each sample is stored as a 16-bit integer (int16) — that is 2 bytes:

Sixteen squares, one per bit, grouped into two bytes, showing a 16-bit integer in binary

Pros and cons

Targeted deep electrophysiology recording and traces

Electrophysiology

  • ✅ High temporal resolution
  • ✅ Targeted to deep and multiple regions
  • ❌ Cannot easily identify individual neurons

Two-photon imaging field of view with labeled neurons

Imaging

  • ✅ Easy identification of individual neurons (genetically targetable)
  • ❌ Low temporal resolution
  • ❌ Limited depth and field of view