{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n\n# Importing data from EEG devices\n\nMNE includes various functions and utilities for reading EEG data and electrode\nlocations.\n\n\n## BrainVision (.vhdr, .vmrk, .eeg)\n\nThe BrainVision file format consists of three separate files:\n\n1. A text header file (``.vhdr``) containing meta data.\n2. A text marker file (``.vmrk``) containing information about events in the\n data.\n3. A binary data file (``.eeg``) containing the voltage values of the EEG.\n\nBoth text files are based on the [INI format](https://en.wikipedia.org/wiki/INI_file)\nconsisting of\n\n* sections marked as ``[square brackets]``,\n* comments marked as ``; comment``,\n* and key-value pairs marked as ``key=value``.\n\nBrain Products provides documentation for their core BrainVision file format.\nThe format specification is hosted on the\n[Brain Products website](https://www.brainproducts.com/support-resources/brainvision-core-data-format-1-0/).\n\nBrainVision EEG files can be read using :func:`mne.io.read_raw_brainvision`,\npassing the ``.vhdr`` header file as the argument.\n\n
Renaming BrainVision files can be problematic due to their\n multi-file structure. See this\n [example](https://mne.tools/mne-bids/stable/auto_examples/rename_brainvision_files.html#sphx-glr-auto-examples-rename-brainvision-files-py)\n for instructions.
For *writing* BrainVision files, take a look at the :mod:`mne.export`\n module, which used the [pybv](https://pypi.org/project/pybv/) Python\n package.
Data samples in a BDF file are represented in a 3-byte\n (24-bit) format. Since 3-byte raw data buffers are not presently\n supported in the FIF format, these data will be changed to 4-byte\n integers in the conversion.
Reading channel locations from the file header may be dangerous, as the\n x_coord and y_coord in the ELECTLOC section of the header do not necessarily\n translate to absolute locations. Furthermore, EEG electrode locations that\n do not fit to a sphere will distort the layout when computing the z-values.\n If you are not sure about the channel locations in the header, using a\n montage is encouraged.
ANT Neuro also uses a file format with the ``.cnt`` extension, but it is different\n from the Neuroscan CNT format. The ANT Neuro format is supported by the function\n :func:`mne.io.read_raw_ant`.
Neuroscan also uses a file format with the ``.cnt`` extension, but it is different\n from the eego CNT format. The Neuroscan CNT format is supported by the function\n :func:`mne.io.read_raw_cnt`.