TESA user manual
  • Introduction
  • Installation, getting started, and reporting bugs
    • A quick intro to TESA
    • A quick intro to Matlab
    • A quick intro to EEGLAB
    • Reporting bugs
  • Overview of TMS-EEG analysis
  • Find and mark TMS pulses
    • Find TMS pulses
    • Find TMS pulses (alternative)
    • Fix TMS pulse latencies
  • Remove and interpolate TMS pulse artifacts
    • Remove TMS pulse artifact
    • Interpolate removed data
  • Remove TMS-evoked muscle activity and other artifacts
    • FastICA
    • Component classification (TESA)
    • Plot and remove components
    • Enhanced deflation method (EDM)
    • PCA compression
    • PCA suppression
    • Detrend
    • SSP–SIR
    • SOUND
  • Filter data
    • Butterworth filter
    • Median filter
  • Analyse TMS-evoked potentials
    • Extract TEPs
    • Find and analyse TEP peaks
    • Output peak analysis
    • Output peak analysis (group)
  • Plot TMS-evoked potentials
    • Plot data
    • Plot data (group)
  • Example analysis pipelines
  • TESA functions under development
Powered by GitBook
On this page
  • EEGLAB user interface
  • Scripts
  • Base function
  • Pop function
  • Required inputs
  • Optional inputs (key/value pairs)
  • Outputs
  • Examples

Was this helpful?

  1. Remove TMS-evoked muscle activity and other artifacts

Enhanced deflation method (EDM)

PreviousPlot and remove componentsNextPCA compression

Last updated 5 years ago

Was this helpful?

This function finds artifactual components automatically by using the enhanced deflation method (EDM) algorithm as advocated in the following paper:

The function uses the same algorithmn as to automatically detect components representing the TMS-evoked muscle artifact. Artifacts can be categorised as either TMS-evoked muscle activity or neural-other. Settings for this detection can be manually altered by the user.

EEGLAB user interface

1. Enter the number of components to consider. Leave blank for all. Note that the rank of the data will be reduced to this number.

2. Enter the number of components to plot. Leave blank for all.

3. Turn on or off automatic selection of components representing TMS-evoked muscle activity.

4. Set the threshold for detection of TMS-evoked muscle activity.

5. Set the target time window for detecting TMS-evoked muscle activity.

6. Turn on or off threshold feedback for TMS-evoked muscle activity. If on, values for each component will appear in the command window.

Scripts

Base function

EEG = tesa_edm( EEG ); Default use

EEG = tesa_edm( EEG, chanlocs, Nic, sf ); Custom inputs

EEG = tesa_edm( EEG, chanlocs, Nic, sf, 'key1', value1...); Settings for detecting comnponent representing TMS-evoked muscle activity.

Pop function

EEG = pop_tesa_edm( EEG ); Pop up window

EEG = pop_tesa_edm( EEG, chanlocs, Nic, sf ); Custom inputs

EEG = pop_tesa_edm( EEG, chanlocs, Nic, sf, 'key1', value1...); Settings for detecting comnponent representing TMS-evoked muscle activity.

Required inputs

Input

Description

Example

Default

EEG

EEGLAB EEG structure

EEG

-

chanlocs

Channel locations in structure identical to that used by EEGLAB (leave blank if chanlocs in EEG structure)

EEG. chanlocs

[ ]

Nic

Integer setting the number of independent components to look for. Note the rank of the data will be reduced to this number.

25

rank(EEG)-5 (to make sure the algorithm converges).

Sf

Sampling frequency in Hz. (Leave blank if Sf is in EEG structure)

1000

[ ]

Optional inputs (key/value pairs)

Key

Input value

Description

Example

Default

'comps'

integer

Integer describes the number of components to perform selection on (e.g. first 10 components). Leave empty for all components.

15

[ ]

'tmsMuscle'

'on' or 'off'

A string which turns on TMS-evoked muscle activity detection.

'off'

'on'

'tmsMuscleThresh'

integer

Integer determining the threshold for detecting components representing TMS-evoked muscle activity.

10

8

'tmsMuscleWin'

[start,end]

Vector describing the target window for TMS-evoked muscle activity (in ms).

[5,50]

[11,30]

'tmsMuscleFeedback'

'on' or 'off'

String turning on feedback of TMS-evoked muscle threshold value for each component in the command window. (Useful for determining a suitable threshold).

'on'

'off'

Outputs

Output

Description

EEG

EEGLAB EEG structure

Examples

EEG = pop_tesa_edm( EEG, [], 30, 1000); Only look for 30 components, sampling rate is 1000 Hz.

EEG = pop_tesa_edm( EEG, [], [], [], 'comps', 10, 'tmsMuscleThresh',10,'tmsMuscleWin',[11,50],'tmsMuscleFeedback','on'); Only plot the top 10 components, change the threshold for artefact detection to 10, change the window for comparions to 11-50 ms and return threshold values for each component in the command window.

Korhonen, Hernandez-Pavon, et al (2011) Removal of large muscle artifacts from transcranial magnetic stimulation-evoked EEG by independent component analysis. Med Biol Eng Compt, 49:397-407.
tesa_compselect