AAR plug-in for EEGLAB

Remove artifacts for EEG time-series

View the Project on GitHub germangh/eeglab_plugin_aar

AAR plug-in for EEGLAB

This repository stores the code of the AAR plug-in for EEGLAB that was released on 31-10-2008. I am not developing this code anymore but if you report any major bug I will try to fix it whenever I have time. For suggestions, comments and bug reports, please contact German Gomez-Herrero.


The AAR plug-in is a collection of MATLAB scripts that implement several state-of-art (in 2008 anyways...) methods for automatic correction of ocular and muscular artifacts in the EEG. The capabilities of the toolbox are briefly described in a fairly outdated tutorial document, which you can get in .pdf, or in html format.

The toolbox is implemented as an EEGLAB plug-in, but can also be used without EEGLAB if you don't need or want to use EEGLAB's GUI. The current version implements several fully automatic methods to correct ocular (EOG) artifacts, and one automatic method to correct muscle (EMG) artifacts.

Installation instructions

  1. Install EEGLAB for MATLAB, if you haven't done so already. Ensure that EEGLAB is in your MATLAB's search path.

  2. Copy and paste the following code in the MATLAB command window and press Enter:

    eeglabRoot = fileparts(which('eeglab'));
    url = 'https://github.com/germangh/eeglab_plugin_aar/archive/master.zip';
    unzip(url, [eeglabRoot filesep 'plugins']);
    eeglab redraw;
  3. Optionally, you may want to install additional BSS algorithms. Both JADE and FastICA will be automatically detected by the AAR plug-in as long as they are in the MATLAB's search path:

Additional resources

The BSS-based EOG correction procedure is based on the following scientific publication:

The automatic EMG correction method is based on the following reference:

You can also get some of the datasets that were used to evaluate the performance of some of the methods included in the AAR toolbox.

If I find major bugs or have important announcements, I will post them to this Google group. Please join the group if you are using the AAR plug-in. Only I can post to the forum so you can be sure of receiving emails very rarely, if you ever receive any.

Known issues

Version history

See version history.

Credit to third parties

See credits.


The AAR plug-in is released under the Creative Commons Attribution-NonCommercial-ShareAlike licence. Note that third-party dependencies shipped together with the AAR plug-in may have their own licenses. If you use this software in any of your publications you must cite the following article: