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 Distribution

ephysio-1.0.9.tar.gz (38.5 kB view details)

Uploaded Source

File details

Details for the file ephysio-1.0.9.tar.gz.

File metadata

  • Download URL: ephysio-1.0.9.tar.gz
  • Upload date:
  • Size: 38.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for ephysio-1.0.9.tar.gz
Algorithm Hash digest
SHA256 72752470b0e68b6ebb96c3fd88b4ccb5f01fb88ab5540bee4fdce7ec34978957
MD5 a82458f0e91aa0e2b4a95ea97c23a1d1
BLAKE2b-256 98a65cf5cb2afde62798569f3a3c8d71572b14065c2c00d46a848af489d5feba

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