Extract TEPs

This function averages over trials to generate a TMS-evoked potential (TEP). Either a region-of-interest analysis (ROI), which averages over selected electrodes, or a global field amplitude analysis (GMFA; standard deviation across electrodes at each time point) can be performed. Outputs are saved in the EEG structure EEG.ROI or EEG.GMFA respectively.

For TEPs following paired pulses, an additional file can be specified to subtract from the conditioning pulse and thereby minimising the impact of on-going activity in the test pulse time period. For example, in a paired pulse condition with interstimulus interval of 100 ms, a single pulse file can be time shifted 100 ms and subtracted from the paired pulse file before the ROI or GMFA is calculated.

Finding peaks and returning amplitudes and latencies is performed with tesa_peakanalysis and tesa_peakoutput.

Further reading on importance of correcting paired pulses with TMS-EEG (in particular, see supplementary materials):

EEGLAB user interface

1. Select the type of analysis.

2. If region of interest (ROI) is chosen, select the electrodes included in the analysis. Electrodes can either be entered manually or selected from a list of existing electrodes by pressing the 'Select electrodes' button. Hold Ctrl to select multiple electrodes.

3. Enter an identifier for the ROI or GMFA analysis. For example, if motor is entered here, data will be stored in EEG.ROI.motor or EEG.GMFA.motor. If nothing is entered here, the data will be stored as EEG.ROI.R1 or EEG.GMFA.R1 (where R increases numerically for each unique analysis performed).

4. Turn on or off paired pulse correction. If paired pulse correction is on, a value must be given in 5. When OK is pressed, the user will be able to select the file for subtraction. Note that the number of electrodes and sampling rate must be equal between files.

5. Enter the interstimulus interval (in ms). Data from the second file will be shifted in time by this value prior to subtraction.

Scripts

Base function

EEG = tesa_tepextract( EEG, type ); Default use.

EEG = tesa_tepextract( EEG, type, 'key1',value1... ); Custom input.

Pop function

EEG = pop_tesa_tepextract( EEG ); Pop up window.

EEG = pop_tesa_tepextract( EEG, type ); Default.

EEG = pop_tesa_tepextract( EEG, type, 'key1',value1... ); Custom input.

Required inputs

Optional inputs (key/value pairs)

Outputs

Examples

EEG = pop_tesa_tepextract( EEG, 'ROI', 'elecs', {'FC1','FC3','C1','C3'} ); Standard ROI analysis.

EEG = pop_tesa_tepextract( EEG, 'ROI', 'elecs', {'C1','C3'}, 'tepName','motor' ); ROI analysis with specific name.

EEG = pop_tesa_tepextract( EEG, 'ROI', 'elecs', 'C3', 'pairCorrect', 'on', 'ISI', 100, 'fileName', 'C:\tmseeg\LICI.set' ); Paired pulse analysis for ROI

EEG = pop_tesa_tepextract( EEG, 'GMFA'); Standard GMFA analysis

EEG = pop_tesa_tepextract( EEG, 'GMFA', 'pairCorrect', 'on', 'ISI', 100, 'fileName', 'C:\tmseeg\LICI.set' ); Paired pulse analysis for GMFA

Last updated