Skip to content

diba-lab/NeuroPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f6ae1c7 · Mar 28, 2025
Jan 13, 2025
Jan 30, 2025
Feb 10, 2025
Jan 20, 2021
Mar 28, 2025
Jan 30, 2025
Jan 30, 2025
Nov 19, 2020
Feb 10, 2025
Jan 15, 2025
Oct 24, 2020
Jan 30, 2025
Jan 30, 2025
Jan 30, 2025
Jan 30, 2025
Jan 30, 2025
Jan 30, 2025

Repository files navigation

NeuroPy

Package for analyzing ephys data using python.

Overview

This package is primarily developed for hippocampal recordings, but can also be used for general ephys data.

Minimum requirements

  • python 3.9
  • Numpy 1.20.2
  • Scipy 1.6.2

Installation

  • Install mamba. See https://mamba.readthedocs.io/en/latest/mamba-installation.html.
  • Fork this repository and navigate to the "NeuroPy" directory in bash.
  • Run the following command from your base environment:
    mamba env create -f environment.yml(stable but older) or env create -f environment_beta.yml (most up-to-date).
  • Add your repository to your python path in your favorite python interative environment and start using the code!

Steps to follow before you start using modules:

  • Make sure your data folder has .xml and .eeg files.
  • Open the .eeg file in neuroscope and categorize bad recording channels as skipped and non-lfp channels as discard in neuroscope

Quick example

"""
Raster plot with corresponding raw LFP, ripple band and example ripple events
"""
from neuropy.core import Neurons
from neuropy import plotting
spiketrains = np.array([np.sort(np.random.rand(_)) for _ in range(100,200)],dtype=object) 
neurons = Neurons(spiketrains,t_stop=1000)

plotting.plot_raster(neurons,color = 'jet')

Example Image

Citing this package

If you use NeuroPy in your research, please consider citing it.

@misc{neuropy2021,
    author       = {Bapun Giri, Nat Kinsky},
    title        = {{NeuroPy: Electrophysiology analysis using Python}},
    year         = 2020--2021,
    version      = {0.0.1},
    url          = {https://github.com/diba-lab/NeuroPy}
    }