Skip to main content

Analysis of electrophysiological data recorded with the Axona or OpenEphys recording systems

Project description

Synopsis

Tools for the analysis of electrophysiological data collected with the Axona or openephys recording systems.

Installation

ephysiopy requires python3.6 or greater. The easiest way to install is using pip:

python3 -m pip install ephysiopy

Or similar.

This will install all the pre-requisites, which are as follows:

  • numpy
  • scipy
  • matplotlib
  • scikits-learn
  • astropy (for NaN-friendly convolution)
  • skimage
  • mahotas
  • h5py

I haven't yet tried this in a conda like environment but a quick google shows it should be pretty easy.

Code Example

Main entry class for Axona related analysis is "Trial" contained in ephysiopy.dacq2py.dacq2py_util i.e.

from ephysiopy.dacq2py.dacq2py_util import Trial
T = Trial("/path/to/dataset/mytrial")

The "usual" Axona dataset includes the following files:

  • mytrial.set
  • mytrial.1
  • mytrial.2
  • mytrial.3
  • mytrial.4
  • mytrial.pos
  • mytrial.eeg

Note that you shouldn't specify a suffix when constructing the filename in the code example above.

You can now start analysing your data! i.e.

T.plotEEGPower()
T.plotMap(tetrode=1, cluster=4)

For openephys-type analysis there are two main entry classes depending on whether you are doing Neuropixels or more traditional tetrode ephys-based analysis. Both classes inherit from the same parent class (OpenEphysBase) and so share a high degree of functional overlap.

For Neuropixels:

from ephysiopy.openephys2py.OEKiloPhy import OpenEphysNPX
npx = OpenEphysNPX("/path/to/top_level")

The "/path/to/top_level" bit here means that if your directory hierarchy looks like this:

├── settings.xml
├── 2020-03-20_12-40-15
|    └── experiment1
|        └── recording1
|            ├── structure.oebin
|            ├── sync_messages.txt
|            ├── continuous
|            |   └── Neuropix-PXI-107.0
|            |       └── continuous.dat
|            └── events

Then OpenEphysNPX should be instantiated as follows:

npx = OpenEphysNPX("2020-03-20_12-40-15")

When you load the data the directory structure is iterated through to find files such as sync_messages.txt and settings.xml and so on. The data is loaded by calling the load method:

npx.load()

The same principles apply to the OpenEphysNWB class - as the name suggests this is for use with data recorded in the .nwb format

Motivation

Analysis using Axona's Tint cluster cutting program or phy/ phy2 (openephys) is great but limited. This extends that functionality.

Optional packages include:

Download the files and extract to a folder and make sure it's on your Python path NB this is limited to data recorded using Axona as it has now been superceded by tools such as KiloSort/ KiloSort2 etc.

Contributors

Robin Hayman.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

ephysiopy-1.5.54.tar.gz (131.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ephysiopy-1.5.54-py3-none-any.whl (172.9 kB view details)

Uploaded Python 3

File details

Details for the file ephysiopy-1.5.54.tar.gz.

File metadata

  • Download URL: ephysiopy-1.5.54.tar.gz
  • Upload date:
  • Size: 131.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/2.7.15+

File hashes

Hashes for ephysiopy-1.5.54.tar.gz
Algorithm Hash digest
SHA256 e8c6b671170e3a1c33b9c503a777dc6d7f2a16f21ea658ce01eb062940384d71
MD5 3d4b1a62590cb8320bca7a409bfe244f
BLAKE2b-256 9847e6c5d58ac693644e6501cf77271d3cfabb6cd18d3422749be2d732cf7806

See more details on using hashes here.

File details

Details for the file ephysiopy-1.5.54-py3-none-any.whl.

File metadata

  • Download URL: ephysiopy-1.5.54-py3-none-any.whl
  • Upload date:
  • Size: 172.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/2.7.15+

File hashes

Hashes for ephysiopy-1.5.54-py3-none-any.whl
Algorithm Hash digest
SHA256 cf6bc0aa3865c740f8e916b4ee5365f7717d6cbd660223ec3c5f2e4a27b7681e
MD5 a650ecc76df19bcd80f4da80f1a5a949
BLAKE2b-256 62b3e5733d578cb82afa96f0073abf40fc0cfebf44d304778f2a57a609f7521b

See more details on using hashes here.

Supported by

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