Installation & Setup - kevmtan/EEG-ICA-pipeline GitHub Wiki
This guide and its code are tailored for .bdf recordings from CMU Psych's BioSemi. It has been tested on CNBC's Psych-O cluster, using Matlab 2013a (should work up to Matlab 2014a). To use 2013a on Psych-O, enter mode load matlab-8.1
each time you open a session. EEGLAB will not work on Matlab 2014b+!
- Install latest EEGLAB in your user MATLAB directory
- Run EEGLAB and install the required plugins (GUI method highly recommended)
- Click
File > Manage EEGLAB extensions > Data import extensions
then install:- Biosig toolbox
- Click
File > Manage EEGLAB extensions > Data processing extensions
then install:- Fieldtrip-lite (Oostenveld et al., 2011)
- MARA (Multiple Artifact Rejection Algorithm; Winkler et al., 2011)
- PrepPipeline (Bigdely-Shamlo et al., 2015)
- firfilt (Finite Impulse Response Filter; Widmann et al., 2015)
- fitTwoDipoles (Piazza et al., 2016)
- AMICA* (Adaptive Mixture ICA; Palmer et al., 2011)
- FASTER* (Nolan et al., 2011)
- * If they do not appear in the GUI, manually install AMICA & FASTER to your EEGLAB plugin directory
- Click
Add the EEG base directory and PrepPipeline base+subdirectories to your Matlab path. "Save as" this path to your home MATLAB folder (or somewhere accessible). The default Matlab path is protected in Psych-O, so you'll have to manually load it each time you start Matlab: cd('yourpathfolder'); path(pathdef);
NOTE: The supplied code will need editing to match your directory structure, filenames, and preferred parameters. Newer versions of the above may also require changes in the code. For example, AMICA functions change names for each version, so that would need to be updated.
The image above shows the settings that should be used for preprocessing and single-subject analysis. However, the functions in the supplied code will apply custom EEGLAB settings. It's best to check your settings each time you start EEGLAB: File > Memory and other options
- DISABLE "use single precision", as double precision computation is essential because round off in single precision quickly destroys any natural commutativity of the linear operations (Bigdely-Shamlo et al., 2015).
- ENABLE "scale ICA activity by root mean square (RMS)." This takes the RMS of each channel's contribution to an IC. Effectivity, this shows an IC's activation as its relative contribution to the total EEG data, making ICs comparable to each other (Zavala-Fernandez et al., 2007)
- DISABLE "keep at most one dataset in memory" for pre-processing and single-subject analysis. ENABLE this setting for multi-subject analysis via EEGLAB's study structure.