11: EEGLAB and ERPLAB Scripting
- Page ID
- 87987
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)
- Efficiently move back and forth between scripts and the GUI to have the best of both worlds.
- Use the EEG and ERP histories to see the commands that correspond to the EEGLAB and ERPLAB procedures that you run from the GUI.
- Create simple scripts by copying commands from the EEG and ERP histories into a text file.
- Use variables to define paths in a way that avoids problems and makes it easy to move your scripts and data to new locations.
- Use loops so that you can efficiently repeat a set of processing steps on the data from multiple participants.
- Read from and write to spreadsheets and text files to increase the power and flexibility of your scripts.
- Create an entire processing pipeline that begins with the raw EEG and ends with amplitude and latency scores that are ready for statistical analysis.
- Implement good programming practices that will minimize errors and increase the readability of your code.