A quick intro to TESA
Last updated
Last updated
TESA is a collection of functions that run within the open source EEG analysis software EEGLAB on the Matlab platform. By running within EEGLAB, users can access all of the additional benefits of EEG analysis offered by EEGLAB. If you are unfamiliar with EEGLAB and Matlab, please read A quick intro to EEGLAB and A quick intro to Matlab.
TESA functions serve six main purposes, some of which are specific to TMS-EEG analysis:
Finding and marking TMS pulses in EEG data
Removing and interpolating the TMS pulse artifact
Removing TMS-evoked muscle artifacts and other artifacts in EEG data
Filtering the data
Analysing TMS-evoked potentials
Plotting TMS-evoked potentials
As with all EEGLAB functions, TESA functions are run in two main ways: through the EEGLAB user interface or through the Matlab command line/ scripts.
The simplest way to call and run TESA functions is through the EEGLAB user interface. TESA functions are accessed through the tools menu. To run a TESA function, click on the desired analysis step from the TESA menu. A pop up window will appear asking for the inputs required to run the function. Once the inputs are entered, press OK and the function will run. If the analysis step alters the data, a new dataset will be created, which can be renamed and saved. Old datasets are stored in the datasets menu accessible from the EEGLAB toolbar.
A powerful application of Matlab is the ability to write and run scripts which directly call TESA and EEGLAB functions. Running EEG analysis from scripts has several advantages, such as creating a record of analysis pipelines, automating analysis which does not require researcher input, and minimising researcher error.
Syntax for TESA functions can be directly generated using the eegh
command in the Matlab command window. After running a function from the EEGLAB user interface, type eegh in to the Matlab command line and press enter. A list of all functions that were run on the current data set is then generated in the command window, which can be copied and pasted in to the Matlab editor to create a script. Further information on using eegh and writing scripts can be found on the EEGLAB website: http://sccn.ucsd.edu/wiki/Chapter_02:_Writing_EEGLAB_Scripts