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.