neuro-py¶
Analysis of neuroelectrophysiology data in Python. Built on top of nelpy for core data objects, neuro_py provides functions for freely moving electrophysiology analysis — including behavior tracking, neural ensemble detection, peri-event analyses, spectral methods, and robust batch analysis tools.
Getting Started¶
-
Installation
git clone cd neuro_py pip install -e .To sync the
nelpydependency to latest version, use following instead,pip install -e . --force-reinstall --no-cache-dir -
Quick Start
import neuro_py as npy
Core Modules¶
-
Behavior
Track and linearize animal positions, classify well traversals, and compute kinematics from freely moving recordings.
-
Ensemble
Detect neural assemblies, measure reactivation, compute explained variance, decode position, and analyze replay events.
-
LFP
Spectral analysis, current source density (CSD), theta cycle detection, and LFP preprocessing pipelines.
-
Process
Peri-event time histograms, cross-correlations, interval manipulation, batch analysis, and signal utilities.
-
Spikes
Spike train tools for computing firing rates, burst detection, and other single-unit analysis utilities.
-
Tuning
Spatial tuning maps, place field detection, and receptive field analysis for spatial coding studies.
More Modules¶
-
Detectors
Automated detection of dentate spikes, UP/DOWN states, and other electrophysiological events.
-
Stats
Circular statistics, regression models, system identification, and statistical testing utilities.
-
Plotting
Publication-ready figure helpers, event raster plots, and plotting decorators for consistent styling.
-
I/O
Load and save electrophysiology data — spikes, LFP, epochs, ripples, sleep states, and CellExplorer formats.
-
Raw
Raw data preprocessing, spike sorting progress tracking, and Phy log parsing utilities.
-
Session
Locate behavioral epochs, identify pre/task/post structure, and manage recording session metadata.
Tutorials¶
Learn by example with our hands-on notebooks:
-
Attractor Landscape
Visualize neural attractor dynamics and energy landscapes.
-
Batch Analysis
Run analyses across multiple sessions with parallel batch tools.
-
Bias Correlation
Compute pairwise bias correlations across behavioral epochs.
-
Decoding
Decode position and variables from neural population activity.
-
Explained Variance
Measure how much sleep activity is explained by prior experience.
-
Lfp Loader Tutorial
Explore the Lfp Loader Tutorial tutorial notebook.
-
Neural Geodynamics
Explore geometric dynamics of neural population activity.
-
Peri-Event Analysis
Align neural activity to behavioral events with PETHs.
-
Reactivation
Detect and quantify neural assembly reactivation during sleep.
-
Spatial Maps
Build place fields and spatial tuning curves from freely moving data.
Built With¶
Python 3.10+
numpy
scipy
matplotlib
scikit-learn
pandas
numba
tqdm
seaborn
nelpy
PyWavelets
lightning
h5py
Community¶
-
GitHub
Star or watch the repository to stay updated with the latest changes.
-
Contributing
Pull requests welcome. For major changes, please open an issue first to discuss what you would like to change.
-
Testing
Run the test suite to verify everything works:
pytest
Made with by Ryan Harvey