Something you need to experience then you get the core!

with Filedtrip for EEG signal preprocessing

  •  Please keep in mind that you’d better to reference the signal after ICA or you will lose some brain acitivity by averageing them.
  • Meanwhile, for the sake of data senstive of brain activity, Please keep as many channels as you can, instead  you could check visually to remove the bad trials to keep more channels.
  • Last after ICA  if you find that seems like airblinking with high power, Please remove this in case you want to see some results at a low frequency.
  • Keep as many channels and trials as possile for frequency analysis and source localization  


as the walk though tutorial you may check at the first page they are :


  1. Visually inspect the dataset and mark those segments that contain obvious movements, (system) spikes or muscle artifacts, leaving in all but the most extreme eye artifacts.
  2. Reject the trials that contain artifacts.
  3. Decompose the data using ICA. Note that ICA can give very unreliable results when the data contains a lot of (correlated) noise. The cleaner the data is already, the better the ICA results.
  4. Find components clearly corresponding to eye blinks and saccades.
  5. Recompose data without those components.
  6. Go through data again visually and manually selects segments that still show any remaining artifacts, being from eye blinks, movements, etc.

we could follow the guideline however you will never get the point if just follow for they did not provide any practical way to do this .

Here for three weeks Patience , we find the way to do a very good aritifact rejection :


1. visual check with automatic artifact rejection


        % EOG
        cfg            = [];
        cfg.continuous = 'yes';
        % channel selection, cutoff and padding     = 'all';
        cfg.artfctdef.zvalue.cutoff      = 4;
        cfg.artfctdef.zvalue.trlpadding  = 0;
        cfg.artfctdef.zvalue.artpadding  = 0.1;
        cfg.artfctdef.zvalue.fltpadding  = 0;
        % algorithmic parameters
        cfg.artfctdef.zvalue.bpfilter   = 'yes';
        cfg.artfctdef.zvalue.bpfilttype = 'but';
        cfg.artfctdef.zvalue.bpfreq     = [1 15];
        cfg.artfctdef.zvalue.bpfiltord  = 4;
        cfg.artfctdef.zvalue.hilbert    = 'yes';
        % feedback
        cfg.artfctdef.zvalue.interactive = 'yes';
        [cfg, artifact_EOG] = ft_artifact_zvalue(cfg,dataori);



        cfg                    = [];
        cfg.continuous = 'yes';
        % channel selection, cutoff and padding    = 'all';
        cfg.artfctdef.zvalue.cutoff     = 30;
        cfg.artfctdef.zvalue.trlpadding = 0;
        cfg.artfctdef.zvalue.artpadding = 0;
        cfg.artfctdef.zvalue.fltpadding = 0;
        % algorithmic parameters
        cfg.artfctdef.zvalue.cumulative    = 'yes';
        cfg.artfctdef.zvalue.medianfilter  = 'yes';
        cfg.artfctdef.zvalue.medianfiltord = 9;
        cfg.artfctdef.zvalue.absdiff       = 'yes';
        % make the process interactive
        cfg.artfctdef.zvalue.interactive = 'yes';
        [cfg, artifact_jump] = ft_artifact_zvalue(cfg,dataori);



cfg            = [];
        cfg.continuous = 'yes';
        % channel selection, cutoff and padding = 'all';
        cfg.artfctdef.zvalue.cutoff      = 4;
        cfg.artfctdef.zvalue.trlpadding  = 0;
        cfg.artfctdef.zvalue.fltpadding  = 0;
        cfg.artfctdef.zvalue.artpadding  = 0.1;
        % algorithmic parameters
        cfg.artfctdef.zvalue.bpfilter    = 'yes';
        cfg.artfctdef.zvalue.bpfreq      = [110 140];
        cfg.artfctdef.zvalue.bpfiltord   = 9;
        cfg.artfctdef.zvalue.bpfilttype  = 'but';
        cfg.artfctdef.zvalue.hilbert     = 'yes';
        cfg.artfctdef.zvalue.boxcar      = 0.2;
        % make the process interactive
        cfg.artfctdef.zvalue.interactive = 'yes';
        [cfg, artifact_muscle] = ft_artifact_zvalue(cfg,dataori);
 cfg.artfctdef.reject = 'complete'; % this rejects complete trials, use 'partial' if you want to do partial artifact rejection
 cfg.artfctdef.eog.artifact = artifact_EOG; %
 cfg.artfctdef.jump.artifact = artifact_jump;
 cfg.artfctdef.muscle.artifact = artifact_muscle;
 data_no_artifacts = ft_rejectartifact(cfg,dataori);

Though above you will notice some noise data at time course , which let you visually check the tend of artifact, with a effective threshold, cut off most of the noise. 

2. after this , you should use ICA to remove the ECG, to be reminded that all these signal still include the component from last step.

3. back project the component after remove these component 

4. if you losy some channle which is very improtant then you should repair them 

5. do commen average after geting rid of bad channles or you hve preprocessing all the steps