mef_reader_fieldtrip is a Fieldtrip external toolbox that reads data compressed in Multiscale Electrophysiology Format (or Mayo EEG File, MEF). Current version is capable of reading MEF Version 2.1 and MEF version 3.0 files. The code of mef_reader_fieldtrip is hosted on Github of Multimodal Neuroimaging Lab at the repository mef_reader_fieldtrip. The backbone of the toolbox is a C-MEX package which is also employed in MEF_import to read MEF datasets into EEGLAB.
- Download and install FieldTrip. Assume that the root directory of FieldTrip is
fieldtrip. (Please note that at present, mef_reader_fieldtrip has not been merged officially into Fieldtrip. You may download a fork of Fieldtrip here, where the toolbox has been installed). - Download mef_reader_fieldtrip package and unzip it if necessary.
- If the version of Fieldtrip is not capable of recognizing MEF data type, look for the directory
fieldtripin mef_reader_fieldtrip package and then copy it to the root directory of FieldTripfieldtrip. - Otherwise, check the
externaldirectory of Fieldtrip. If the foldermayo_mefexists, go to next step. If not, only copy the foldermayo_mefunder the directoryexternalof mef_reader_fieldtrip package to theexternaldirectory of FieldTrip. - In MATLAB, go to the directory
fieldtripand type commandsft_defaultsandft_hastoolbox('mayo_mef',1);to install the toolbox. - If necessary, make mex files by typing command
make_mayo_mexin MATLAB command window.
A small sample dataset (~17 M) of MEF 2.1/3.0 is provided from this link on box.com, or from Open Science Framework (OSF) via this link.
Look for the folder sample_mefand download it to your local computer.
To test the toolbox using the sample data, open test_mayo_mef.m under directory fieldtrip/test and modify the variables according to the locations of the dataset.
Two additional examples of reading MEF dataset, ft_example_read_mef2p1.m and ft_example_read_mef3p0.m are included in folder sample_mef as well.
% =========================================================================
% Note of sample dataset
% =========================================================================
% Go to https://github.com/MultimodalNeuroimagingLab/mef_reader_fieldtrip
% and follow the instructions to download the sample dataset. Set the path
% to the sample dataset below.
%% set path to sample dataset
% please set the path to sample dataset
mef21_data = '/path/to/sample_mef/mef_2p1';
mef30_data = '/path/to/sample_mef/mef_3p0.mefd';
Set the locations of the dataset in the last two lines of above code block and then execute command test_mayo_mef in MATLAB.
Multiscale Electrophysiology Format (MEF) is a novel electrophysiology file format designed for large-scale storage of electrophysiological recordings. MEF can achieve significant data size reduction when compared to existing techniques with stat-of-the-art lossless data compression. It satisfies the Health Insurance Portability and Accountability Act (HIPAA) to encrypt any patient protected health information transmitted over a public network.
The details of MEF file can be found at here from Mayo Systems Electrophysiology Lab and here on International Epilepsy Portal.
The c-mex code to read MEF 2.1 data and c code to read MEF 3.0 data are mainly developed from the work done by Ben Brinkmann, Matt Stead, Dan Crepeau, and Gregory Worrell from Mayo Systems Electrophysiology Lab, Mayo Clinic, Rochester MN.
mef_reader_fieldtrip is distributed with the GPL v3 Open Source License.