Skip to content

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.

DOI PyPI Python Tests Docs


Getting Started

  • Installation


    git clone
    cd neuro_py
    pip install -e .
    

    To sync the nelpy dependency 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.

    View Module

  • Ensemble


    Detect neural assemblies, measure reactivation, compute explained variance, decode position, and analyze replay events.

    View Module

  • LFP


    Spectral analysis, current source density (CSD), theta cycle detection, and LFP preprocessing pipelines.

    View Module

  • Process


    Peri-event time histograms, cross-correlations, interval manipulation, batch analysis, and signal utilities.

    View Module

  • Spikes


    Spike train tools for computing firing rates, burst detection, and other single-unit analysis utilities.

    View Module

  • Tuning


    Spatial tuning maps, place field detection, and receptive field analysis for spatial coding studies.

    View Module


More Modules

  • Detectors


    Automated detection of dentate spikes, UP/DOWN states, and other electrophysiological events.

    View Module

  • Stats


    Circular statistics, regression models, system identification, and statistical testing utilities.

    View Module

  • Plotting


    Publication-ready figure helpers, event raster plots, and plotting decorators for consistent styling.

    View Module

  • I/O


    Load and save electrophysiology data — spikes, LFP, epochs, ripples, sleep states, and CellExplorer formats.

    View Module

  • Raw


    Raw data preprocessing, spike sorting progress tracking, and Phy log parsing utilities.

    View Module

  • Session


    Locate behavioral epochs, identify pre/task/post structure, and manage recording session metadata.

    View Module


Tutorials

Learn by example with our hands-on notebooks:

  • Attractor Landscape


    Visualize neural attractor dynamics and energy landscapes.

    View Tutorial

  • Batch Analysis


    Run analyses across multiple sessions with parallel batch tools.

    View Tutorial

  • Bias Correlation


    Compute pairwise bias correlations across behavioral epochs.

    View Tutorial

  • Decoding


    Decode position and variables from neural population activity.

    View Tutorial

  • Explained Variance


    Measure how much sleep activity is explained by prior experience.

    View Tutorial

  • Lfp Loader Tutorial


    Explore the Lfp Loader Tutorial tutorial notebook.

    View Tutorial

  • Neural Geodynamics


    Explore geometric dynamics of neural population activity.

    View Tutorial

  • Peri-Event Analysis


    Align neural activity to behavioral events with PETHs.

    View Tutorial

  • Reactivation


    Detect and quantify neural assembly reactivation during sleep.

    View Tutorial

  • Spatial Maps


    Build place fields and spatial tuning curves from freely moving data.

    View Tutorial


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.

    View Repository

  • Contributing


    Pull requests welcome. For major changes, please open an issue first to discuss what you would like to change.

    Open an Issue

  • Testing


    Run the test suite to verify everything works:

    pytest
    

  • Contributors

    Special thanks to our contributors!

    Contributors

  • Project Activity

    Downloads PyPI Downloads Issues Last Commit


Made with ❤ by Ryan Harvey