WB_EEG_Mark

Information and resources about the WeBrain tools
Post Reply
WeBrainTool
Posts: 14
Joined: Mon Apr 19, 2021 10:56 am

WB_EEG_Mark

Post by WeBrainTool » Mon May 24, 2021 9:30 pm

WB_EEG_Mark is a tool to automatically mark bad block/good quality EEG data based on thresholding z-scores/global field power. It is recommended before calculating EEG indices (e.g. power, networks) or ERPs. Steps of marking EEG data consist of:
[1] Filtering all EEG data (Passband filtering and Notch filter)
[2] Z-transforming the EEG data/calculating global field power. Per channel/electrode every time point is z-normalized (mean subtracted and divided by standard deviation). Or the z-scored standard deviation (global field power, GFP) of the signal at all selected electrodes is calculated.
[3] Averaging z-values/using global field power over channels/electrodes allows evidence for an artifact to accumulate and averaging it over channels.
[4] Threshold the accumulated z-score/global field power for each epoch/window. Bad blocks are labeled by ‘9999’ (EEG.event.type is ‘9999’, percentage (absolute value) above threshold > 1% for each small epoch). Good quality data are labeled by ‘2001’ (EEG.event.type is ‘2001’, percentage (absolute value) above threshold < 5% for each small epoch). If bad blocks with label ‘9999’ already existed, the bad block data will be NOT marked as good quality data.

Image
Fig. 1: Pipeline of automatically marking bad block/good quality EEG data.

Parameters
passband: Passband of filtering. Default is ‘[1,60]’. If passband is empty (‘[]’), bandpass filtering will be skipped.
NotchBand: Band of notch filter. Default is ‘[45,55]’. In China, power frequency is 50Hz, while it is 60 Hz in USA. If max(passband)<min(NotchBand) or NotchBand is empty, notch filtering will be skipped.
flag1: flag1 = 0: mark bad blocks (Default); flag1 = 1: mark good quality data.
flag2: flag2 = 0: global field power (Default); flag2 = 1: z-tranforming.
Thre: Threshold of z-score/global field power. Default of global field power (z-scored standard deviation) is 3. For various EEG data, the threshold may be changed by user flexibly.
WinLenth: Length of the window (small epoch). Unit is second. Default is 1 sec.
seleChanns: String with indices of the selected channels (e.g. ‘[1:4,7:30]’), or ‘all’. Default is ‘all’.
srate: Sampling rate of EEG data. It can be automatically detected from EEG data, if it is ‘[]’. But for ASCII/Float .txt File and MATLAB .mat File, users should fill the sampling rate by hand. Default is ‘[]’.

Outputs
For each subject, a zip file which contains the marked EEG data (saved as EEG .set file which contains the mark events) will be generated. Bad blocks are labeled by ‘9999’ (EEG.event.type is ‘9999’). Good quality data were labeled by ‘2001’ (EEG.event.type is ‘2001’).
EEG.MarkPercent: Percentage of marked event (duration).
EEG.dataZ: Z-score or z-scored global field power of data.

Links

Automatic artifact rejection in FieldTrip
http://www.fieldtriptoolbox.org/tutoria ... _rejection

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest