getting started...


EMEGS (ElectroMagnetic EncaphaloGraphy Software) was programmed to analyse data collected with high resolution EEG and MEG. It is written in the MATLAB programming language and cannot run without the MATLAB environment (6 or higher). Moreover, for full functionality, it requires the 'Signal Processing Toolbox' and the 'Statistics Toolbox'. Initially it was programmed in order to analyse data collected with an 128 sensor Electrical Geodesics EEG device, and a Bti 148 MEG system, therefore, these data formats are best supported. Support for the Neuroscan, BDF and CTF data format has recently been added. The programs are optimized for high density sensor arrays and may not be adequate for use with a low number of sensors: artefact detection, sensor interpolation and average reference calculation (for EEG data) rely on sufficient head coverage and will not work properly for single sensor setups.

This software is not a crash-safe! It was developed to allow for various types of data analysis, rather than to be crash-safe and selfexplicit. The documentation is short and incomplete. So be warned: there will be problems! You should be familiar with Matlab, or at the very least know somebody who is, to make good use of it. Moreover, there is no warranty whatsoever about the correctness of any results you obtain with EMEGS. We have successfully been using it for many years now, but there may be errors.

EMEGS is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation (see about page).


When first using EMEGS programs, set the Matlab search path to include all subfolders of the Emegs folder. After this, all EMEGS functions are available, and you can start with the data analysis. Type emegs to start a launchpad for all major submodules. You can activate more or less options for each module by selecting the 'expert' or 'easy' mode on the launchpad.

Each submodule can also be called by typing its name in the command window and pressing return. The most important functions and their names are now summarized:


Use PrePro.m to filter and segment continuous data and calculate
artifact detection parameters (see 'a commented walkthrough...' ).

Use EditAEM.m in order to perform SCADS (statistical control of artifacts in dense array systems).

Use EmegsAVG.m in order to average the data.

Use emegs2d.m to display averaged data.
Source localization, 3d-visualization and statistical analysis are integrated in this module.

Use WaveApp.m in order to calculate wavelet analysis.

Use GenSynthData.m in order to generate synthetic data.

Use Eeg2Spm.m in order to create volume data in the spm analyse format for each trial of your EEG or MEG data.

After extraction, the EMEGS-folder has the following subfolder structure. For full functionality, all folder have to exist and to be included in the matlab path. The coefficient folders are initially empty (except the 'emegs3dInvCoeff'-folder), and will be filled when coefficients are calculated and written to file for your specific sensor configuration.