Skip to main content

Neuroelectrophysiology object model and data analysis in Python.

Project description

Neuroelectrophysiology object model, data exploration, and analysis in Python.

Overview

Nelpy (Neuroelectrophysiology) is an open source package for analysis of neuroelectrophysiology data. Nelpy defines a number of data objects to make it easier to work with electrophysiology (ephys) data, and although it was originally designed for use with extracellular recorded data, it can be used much more broadly. Nelpy is intended to make interactive data analysis and exploration of these ephys data easy, by providing several convenience functions and common visualizations that operate directly on the nelpy objects.

More specifically, the functionality of this package includes:

  • several container objects (SpikeTrain, BinnedSpikeTrain, AnalogSignal, EpochArray, …) with nice human-readable __repr__ methods

  • powerful ways to interact with the data in the container objects

  • hidden Markov model analysis of neural activity

  • basic data exploration and visualization operating directly on the core nelpy objects

  • and much more

Support

This work was supported by the National Science Foundation (CBET-1351692 and IOS-1550994) and the Human Frontiers Science Program (RGY0088). Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

Quick example

Let’s give it a try. Create a SpikeTrainArray:

import nelpy as nel  # main nelpy imports
import nelpy.plotting as npl  # optional plotting imports
spike_times = np.array([1, 2, 4, 5, 10])
st = nel.SpikeTrainArray(spike_times)

Do something:

st.n_spikes
5

Scope of this work

The nelpy object model is expected to be quite similar to the python-vdmlab object model, which in turn has significant overlap with neuralensemble.org’s neo model. However, the nelpy object model extends the former by making binned data first class citizens, and by changing the API for indexing and extracting subsets of data, as well as making “functional support” an integral part of the model. It (nelpy) is currently simpler and less comprehensive than neo, and specifically lacks in terms of physical units and complex object hierarchies and nonlinear relationships. However, nelpy again makes binned data a core object, and nelpy further aims to add additional analysis code including filtering, smoothing, position analysis, subsampling, interpolation, spike rate estimation, spike generation / synthesis, ripple detection, Bayesian decoding, and so on. In short, nelpy is more than just an object model, but the nelpy core is designed to be a flexible, readable, yet powerful object model for neuroelectrophysiology.

Installation

The easiest way to install nelpy is to use pip. From the terminal, run:

pip install nelpy

Alternatively, you can install the latest version of nelpy by running the following commands:

git clone https://github.com/eackermann/nelpy.git
cd nelpy
python setup.py [install, develop]

where the develop argument should be used if you want to modify the code.

A weak prerequisite for installing nelpy is a modified version of hmmlearn. This requirement is weak, in the sense that installation will complete successfully without it, and most of nelpy can also be used without any problems. However, as soon as any of the hidden Markov model (HMM) functions are used, you will get an error if the correct version of hmmlearn is not installed. To make things easier, there is a handy 64-bit Windows wheel in the hmmlearn directory of this repository. Installation on Linux/Unix should be almost trivial.

Where

download

https://pypi.python.org/pypi/nelpy

docs

coming soon!

code

https://github.com/eackermann/nelpy

License

Nelpy is distributed under the MIT license. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nelpy-0.0.99.tar.gz (145.3 kB view details)

Uploaded Source

File details

Details for the file nelpy-0.0.99.tar.gz.

File metadata

  • Download URL: nelpy-0.0.99.tar.gz
  • Upload date:
  • Size: 145.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for nelpy-0.0.99.tar.gz
Algorithm Hash digest
SHA256 ea6ff28f77c4fe975d16a1c2b06e11508665e1f6c103f3f4d8360f994e5b4207
MD5 4b01de9c9ddab351b7f7c302c814f793
BLAKE2b-256 42758092a50e33fbb66c791847875142ce614dacf37152c11a7ffc18b68ba31e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page