Skip to main content

Tools for reading ephys data

Project description

ephysio

Python code for reading ephys files

openEphysIO

This module provides convenient access to continuous and event data saved by OpenEphys. For instance:

from ephysio import openEphysIO
import matplotlib.pyplot as plt

ldr = openEphysIO.Loader("/path/to/data")

# first probe
strm = ldr.spikestreams()[0] 

# time x channel map of the data
dat = ldr.data(strm) 

# sampling rate in Hz
fs_Hz = ldr.samplingrate(strm) 
STIMMARKERCHANNEL = 2

# time stamps of events in channel 2 on the NIDAQ, translated to neuropixel time
evts = ldr.nidaqevents()[STIMMARKERCHANNEL] 
CHANNEL = 100
STIMNO = 10

# Start time of event #10
s0 = evts[STIMNO, 0] 

# prepare to receive 100 ms of data
ds = np.arange(int(.1*fs_Hz)) 

# 100 ms of data following the stimulus 
response = dat[s0:s0+ds, CHANNEL] 

# plot data with time in ms on x-axis
plt.plot(ds*1000/fs_Hz, response) 

Much more documentation is included in the module itself. Most users will want to use the Loader class rather than the various other functions.

Credits

Developed and tested by DAW and Frank Lanfranchi.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

ephysio-1.0.13-py3-none-any.whl (45.4 kB view details)

Uploaded Python 3

File details

Details for the file ephysio-1.0.13-py3-none-any.whl.

File metadata

  • Download URL: ephysio-1.0.13-py3-none-any.whl
  • Upload date:
  • Size: 45.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ephysio-1.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 2ad86d02a7cc4abe9aaf7fa9feff8fbddcc1ade6467eefdda6f280abf54808c0
MD5 2d70475893679c74cf1fe2ab55632b41
BLAKE2b-256 c132471d877bc322eeca2018f0e1d68f08f104d11431fdb286a4f17fbc26d444

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