In this chapter, we will redo all the process again, which is exactly the same as it is in the previous tutorial but using batch processing.

Step 0. Data Import

Download the tutorial dataset (12M). Unzip the rawdata1.zip file, there are three files, which are sub093.eeg, sub093.vhdr, and sub093.vmrk.

Open Matlab, and input “letswave7” in the command windows of Matlab to open Letswave7. Set the path of letswave to the folder of the dataset, like “/Users/huanggan/sync/SynologyDrive/rawdata1” on my computer for example.

Select File->Import->Import EEG/MEG datafiles in the menu of the manager module, then the dialog of import data will pop up. Press the button add files to add the file sub093.eeg. Press the button import files to import the dataset. During the importing, it will display “processing”. Once the importing finished, the corresponding dataset will turn red and display “done”.

Step 1. Removing channel IO

Select the dataset “sub093”” in the data list of the manager module, and click Edit->Arrange signals->Rearrange or delete epochs, channels, indexes in the menu. In the batch module, press the button Add all to add all the channels into left listbox. Then select channel IO and press button Remove to delete channel IO.
Removing channel IO

Step 2. Frequency filtering

Click the tab selection in the left and select Process->Frequency analysis and filters->Butterworth filters in the menu of the batch module and set the low cutoff frequency(Hz) as 0.05Hz.


Removing channel IO Removing channel IO

Step 3. Bad electrodes interpolation

Click the tab Butterworth filter and select Edit->Electrodes->Interpolate channel using neighbouring electrodes in the batch module. Select channel P1 in the Channel to Interpolate list box, then click the button Find closest electrodes.
Removing channel IO

Step 4. Compute ICA Matrix

Click the tab chan interp and select Process->Spatial filters(ICA/PCA)->Computer ICA matrix in the batch module. Select number of components as decide by user and set the Components Numbers as 40.
Removing channel IO

Step 5. Identify Artifact Component

Click the tab ICA and select Process->Spatial filters(ICA/PCA)->Apply ICA/PCA spatial filter in the the batch module. Two tabs, load and apply filter appear on the left. Click the tab load and click add and add dataset “ica chan_interp butt sel_chan sub093”. Click the tab apply filter, no options need to be set there.
Removing channel IO

Step 6. Segmentation/Epoching

Click the tab apply filter and select Process->Epoch segmentation->Segment relative to events (one file per event code) in the batch module. Again two tabs, load and segmentation se… appear on the left. Click the tab load and click add and add dataset “sp_filter ica chan_interp butt sel_chan sub093”. Then click the tab segmentation se…, select Event codes S 9 and S 10, and set the epoch starting and epoch end time as -1 and 2.
Removing channel IO Removing channel IO

Step 7. Rereference

Click the tab segmentation se… and select Process->Rereference signals->Rereference in the batch module. Again two tabs, load and rereference appear on the left. Click the tab load and click add and add dataset “ep_S 9 sp_filter ica chan_interp butt sel_chan sub093” and “ep_S 10 sp_filter ica chan_interp butt sel_chan sub093”. Then click the tab rereference, select the TP9 and TP10 as the new reference in the left list box and select all channels in the right list box for apply reference to.
Removing channel IO Removing channel IO

Step 8. Baseline Correction

Click the tab rereference and select Process->Baseline operation->Baseline correction in the batch module. Here only one tab, baseline correction appears on the left. Keep the default setting for the baseline correction.
Removing channel IO

Step 9. Averaging

Click the tab baseline correction and select Process->Average->Compute average, std, median across epochs in the batch module. Here only one tab, average_epoch appears on the left. Keep the default setting for the baseline correction.
Removing channel IO

To this end, we have finished the work for assigning batch processing. Running the batch processing will be introduced in the next chapter.