Code

Multiscale Electrophysiology File Format Specification

The Multiscale Electrophysiology File (MEF) Format version 3.0 is an open–source file format for storing electrophysiology and other time–series data. The PDF file below gives a comprehensive description of the file format.

Source code libraries

Functions that handle MEF header operations, data compression and decompression, encryption, calculation of the CRC checksum, and byte order adjustments. Included in this distribution is sample code for decimating, filtering, converting EDF format data to MEF 3.0, and sample code to read MEF 3.0 files.

Example program source code

Three example programs below illustrate the use of the mef library functions:

Decimate MEF3. This script takes a MEF3 channel and decimates (downsamples) to a lower sampling rate. It uses the FFTW library and a pre-defined filter file.

EDF to MEF3 converter. This script takes an EDF file as input and converts it to a MEF3 channel. Level 1 and level 2 passwords can be specified for the MEF 3 output channel.

Filter MEF3. This script filters a MEF3 channel based on high and low frequency cutoffs. It uses the FFTW library and a pre-defined filter file.

MEF3 to Raw. This script converts a MEF3 channel to an output file (Matlab-readable) of 4-byte signed integer samples.

Test Read MEF3 Session. This script calls the read_mef_session() routine of the library, which outputs basic information about the MEF3 session as well as the contained channels.

Test MEF3 Records. This script creates a simple records file with dummy records, and then reads the file and displays the records.

Example data

This distribution contains four EEG time-series data channels in MEF 3.0 format. The files are anonymized and encrypted with technical (level 1) and subject (level 2) encryption. The level 1 password is password1 and the level 2 password is password2. The dataset is a 2 hour segment of 256 Hz samples.