All Projects → bids-standard → pybv

bids-standard / pybv

Licence: BSD-3-Clause license
A lightweight I/O utility for the BrainVision data format, written in Python.

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to pybv

brain-monitor
A terminal app written in Node.js to monitor brain signals in real-time
Stars: ✭ 119 (+561.11%)
Mutual labels:  eeg, brain
connectomemapper3
Connectome Mapper 3 is a BIDS App that implements full anatomical, diffusion, resting/state functional MRI, and recently EEG processing pipelines, from raw T1 / DWI / BOLD , and preprocessed EEG data to multi-resolution brain parcellation with corresponding connection matrices.
Stars: ✭ 45 (+150%)
Mutual labels:  eeg, brain
threeBrain
3D Visualization of Brain MRI
Stars: ✭ 29 (+61.11%)
Mutual labels:  brain, ieeg
Fieldtrip
The MATLAB toolbox for MEG, EEG and iEEG analysis
Stars: ✭ 481 (+2572.22%)
Mutual labels:  eeg, brain
neurosky-android-sdk
Android SDK for the NeuroSky MindWave Mobile Brainwave Sensing Headset
Stars: ✭ 39 (+116.67%)
Mutual labels:  eeg, brain
hnn
The Human Neocortical Neurosolver (HNN) is a software tool that gives researchers/clinicians the ability to develop/test hypotheses on circuit mechanisms underlying EEG/MEG data.
Stars: ✭ 62 (+244.44%)
Mutual labels:  eeg, brain
Deep Bci
An open software package to develop BCI based brain and cognitive computing technology for recognizing user's intention using deep learning
Stars: ✭ 168 (+833.33%)
Mutual labels:  eeg, brain
mne-bids
MNE-BIDS is a Python package that allows you to read and write BIDS-compatible datasets with the help of MNE-Python.
Stars: ✭ 88 (+388.89%)
Mutual labels:  eeg, ieeg
bids-matlab
MATLAB / Octave tools for BIDS datasets
Stars: ✭ 37 (+105.56%)
Mutual labels:  eeg, ieeg
Eeglab
EEGLAB is an open source signal processing environment for electrophysiological signals running on Matlab and developed at the SCCN/UCSD
Stars: ✭ 233 (+1194.44%)
Mutual labels:  eeg, brain
Muse Js
Muse 2016 EEG Headset JavaScript Library (using Web Bluetooth)
Stars: ✭ 193 (+972.22%)
Mutual labels:  eeg
Eeg 101
Interactive neuroscience tutorial app using Muse and React Native to teach EEG and BCI basics.
Stars: ✭ 199 (+1005.56%)
Mutual labels:  eeg
eeg-explorer
Visual EEG readings from the Muse EEG Headset
Stars: ✭ 35 (+94.44%)
Mutual labels:  eeg
frc-score-detection
A program to detect FRC match scores from their livestream.
Stars: ✭ 15 (-16.67%)
Mutual labels:  vision
Eegrunt
A Collection Python EEG (+ ECG) Analysis Utilities for OpenBCI and Muse
Stars: ✭ 171 (+850%)
Mutual labels:  eeg
Learnable-Image-Resizing
TF 2 implementation Learning to Resize Images for Computer Vision Tasks (https://arxiv.org/abs/2103.09950v1).
Stars: ✭ 48 (+166.67%)
Mutual labels:  vision
Brainflow
BrainFlow is a library intended to obtain, parse and analyze EEG, EMG, ECG and other kinds of data from biosensors
Stars: ✭ 170 (+844.44%)
Mutual labels:  eeg
Fooof
Parameterizing neural power spectra into periodic & aperiodic components.
Stars: ✭ 162 (+800%)
Mutual labels:  eeg
autonomous-delivery-robot
Repository for Autonomous Delivery Robot project of IvLabs, VNIT
Stars: ✭ 65 (+261.11%)
Mutual labels:  vision
Grocery-Product-Detection
This repository builds a product detection model to recognize products from grocery shelf images.
Stars: ✭ 73 (+305.56%)
Mutual labels:  vision
GitHub Actions Python build GitHub Actions Python tests Codecov PyPi version Conda version Documentation Status Zenodo archive

pybv

pybv is a lightweight I/O utility for the BrainVision data format.

The BrainVision data format is a recommended data format for use in the Brain Imaging Data Structure.

The documentation can be found under the following links:

About the BrainVision data format

BrainVision is the name of a file format commonly used for storing electrophysiology data. Originally, it was put forward by the company Brain Products, however the simplicity of the format has allowed for a diversity of tools reading from and writing to the format.

The format consists of three separate files:

  1. A text header file (.vhdr) containing meta data
  2. A text marker file (.vmrk) containing information about events in the data
  3. A binary data file (.eeg) containing the voltage values of the EEG

Both text files are based on the Microsoft Windows INI format consisting of:

  • sections marked as [square brackets]
  • comments marked as ; comment
  • key-value pairs marked as key=value

The binary .eeg data file is written in little-endian format without a Byte Order Mark (BOM), in accordance with the specification by Brain Products. This ensures that the data file is uniformly written irrespective of the native system architecture.

A documentation for the BrainVision file format is provided by Brain Products. You can view the specification as hosted by Brain Products.

Installation

pybv runs on Python version 3.8 or higher.

pybv's only dependency is numpy. However, we currently recommend that you install MNE-Python for reading BrainVision data. See their installation instructions.

After you have a working installation of MNE-Python (or only numpy if you do not want to read data and only write it), you can install pybv through the following:

  • pip install --upgrade pybv

or if you use conda:

  • conda install --channel conda-forge pybv

Contributing

The development of pybv is taking place on GitHub.

For more information, please see CONTRIBUTING.md

Usage

Writing BrainVision files

The primary functionality provided by pybv is the write_brainvision function. This writes a numpy array of data and provided metadata into a collection of BrainVision files on disk.

from pybv import write_brainvision

# for further parameters see our API documentation
write_brainvision(data=data, sfreq=sfreq, ch_names=ch_names,
                  fname_base=fname, folder_out=tmpdir,
                  events=events)

Reading BrainVision files

Currently, pybv recommends using MNE-Python for reading BrainVision files.

Here is an example of the MNE-Python code required to read BrainVision data:

import mne

# Import the BrainVision data into an MNE Raw object
raw = mne.io.read_raw_brainvision('tmp/test.vhdr', preload=True)

# Reconstruct the original events from our Raw object
events, event_ids = mne.events_from_annotations(raw)

Alternatives

The BrainVision data format is very popular and accordingly there are many software packages to read this format, or write to it. The following table is intended as a quick overview of packages similar to pybv. Please let us know if you know of additional packages that should be listed here.

Name of software Language Notes
BioSig Project miscellaneous Reading and writing capabilities depend on bindings used, see their overview
Brainstorm MATLAB Read and write, search for brainamp in their io functions
BrainVision Analyzer n/a, GUI for Windows Read and write, by Brain Products, requires commercial license
brainvisionloader.jl Julia Read
EEGLAB MATLAB / Octave Read and write via BVA-IO
FieldTrip MATLAB Read and write, search for brainvision in their fileio functions
MNE-Python Python Read (writing via pybv)

Acknowledgements

This package was originally adapted from the Philistine package by palday. It copies much of the BrainVision exporting code, but removes the dependence on MNE. Several features have been added, such as support for individual units for each channel.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].