pynapple-org/pynapple
PYthon Neural Analysis Package :pineapple:
What it solves
Researchers studying the brain often work with two kinds of data: time series (like spike times or behavioral events) and time intervals (like trial periods or brain states). pynapple gives them a single, lightweight Python toolkit to load, manipulate, and analyze these data types without switching between different libraries or writing lots of custom code.
How it works
pynapple provides core data structures such as IntervalSet, TsdFrame, and TsGroup, which now support metadata for labeling intervals, columns, or units. It includes functions for common neuroscience analyses, like computing tuning curves (now generalized to n-dimensions) and cross-correlograms. It also adds signal processing tools—bandpass filtering, power spectral density, and Morlet wavelet decomposition—so you can filter or analyze signals directly. The library can load data from NWB files and now returns xarray DataArrays for tuning curves when requested.
Who it's for
pynapple is aimed at neuroscientists and data analysts who work with neurophysiological recordings. It's especially useful for those who need a clean, Pythonic way to handle time-series data and intervals, and who want to apply standard analyses (tuning curves, cross-correlograms, filtering) without wrestling with low-level details.
Highlights
- Lightweight and free (MIT license)
- Supports n-dimensional tuning curves, returning xarray DataArrays
- Adds metadata to key objects (IntervalSet, TsdFrame, TsGroup)
- Includes signal processing: bandpass filter, power spectral density, Morlet wavelet
- Loads data directly from NWB files
- Offers an optional Claude Code skill to help write idiomatic pynapple code
Related
- Project
- Project
- Project
- Project