Skip to content

A lightweight I/O utility for the BrainVision data format, written in Python.

License

Notifications You must be signed in to change notification settings

heyifei1984/pybv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI codecov Downloads Documentation Status

pybv

A lightweight I/O utility for the BrainVision data format, written in Python.

See the pybv documentation for more information.

ALPHA SOFTWARE. This package is currently in its early stages of iteration. It may change both its internals or its user-facing API in the near future. Any feedback and ideas on how to improve either of these is more than welcome!

For more information on how to help, see CONTRIBUTING.md.

Installation

  • install dependencies: pip install numpy
  • install pybv: pip install -U pybv

Usage

from pybv import write_brainvision

# data: an ndarray of shape (n_channels, n_times)
# sfreq: the sampling frequency
# ch_names: a list of strings for channel names
# fname: the base file name for all created BrainVision files
# tmpdir: a path to where the output files will be placed
# events: an ndarray of shape (n_events, 2). Each row is an event,
#         the first column is the index of the event,
#         the second column is the event ID.
# resolution: the desired resolution (in volts) of the stored data.
write_brainvision(data, sfreq, ch_names, fname, tmpdir, events,
                  resolution=1e-6)

Acknowledgements

This package was originally adapted from palday's Philistine package. It copies much of the BrainVision exporting code, removes the dependence on MNE, and focuses the code around BrainVision I/O.

About

A lightweight I/O utility for the BrainVision data format, written in Python.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%