Detecting bad segments or bad channels

I have a problem in cleaning raw data before ICA.

  • There are some segments that confused me about removing bad channels or mark them as bad segments.

  • In other case, followed by reading other discussions about bad segments, I couldn't get this point whether if mark bad segments before ICA, it would be extracted from ICA, or not ?

attachments are some examples

Thanks in advance
Mona

Bad segments are not ignored in the ICA analysis: even if you mark some blocks of data as bad, they would be included in the ICA decomposition if you run it on a time-window including them, to prevent adding discontinuities in the signal (which might be worse than the actual bad segment).
It is not necessarily a problem. In a good scenario, ICA might even be capable of capturing some of these artifacts as an IC component.
If you have a lot of bad segments, a simple solution would be to run the ICA only on the part of the file that contains mostly good data (change the "Time window" option in the ICA process).

If you really want to exclude some bad segments, you can proceed in one of the following ways:

  • Import all your recordings by blocks of 1s (use the option "Split" in the import options). The segments of 1s including part of a bad segment would be tagged as bad, so if you select all the imported trials in Process1 and run the process "Standardize > Concatenate time ", it would produce a new file with all the blocks minus the bad ones.
  • Define the segments of good data you want to process with a new event category, and enter the name of of the selected event in the ICA process options.

Note that in both cases, you would introduce discontinuities in the signal, which is not something you might not want before ICA analysis.
If you have more details to ask about ICA, I'd recommend you try to contact the EEGLAB community or try to refer to EEGLAB documentation.

Hi Francois,
Thanks for responding and helping me. I understood that there are 2 solution:

  1. With out marking bad segments, running ICA in order to capture some artifacts as an independent components;
  2. Concatenating good segments ( or marking good segments) and run ICA on these parts.

So then, could you please explain me your reply in other discussion?( because I thought it was against what I understood)

With regards
Mona

This is valid only when dealing with multiple data segments (ie. when you use the option "Event name" in the ICA process). Otherwise, it uses the continuous recordings for all the selected time window, as this was the recommendation from the authors of the runICA method we are using in this process (directly coming from EEGLAB).

1 Like