Enhanced deflation method (EDM)
Last updated
Last updated
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 tesa_compselect 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.
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.
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.
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.
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.
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
[ ]
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'
Output
Description
EEG
EEGLAB EEG structure