ICA output issue

Hi Francois,

I have been using ICA to detect eye artifacts in my EEG data (after band-pass filter between 0.5Hz and 30Hz, down-sampling to 256 Hz and re-referencing to subject average). Normally it works well. On one file at the end of the process it stops with the below message in the Matlab window. When I close and re-open Brainstorm the IC images are there but none seem to remove the ocular artifacts in the data. Could you advise why this might be?

Error in panel_ssp_selection>UpdateCat (line 673)
Error in panel_ssp_selection (line 26)
Error in panel_record>CallProcessOnRaw (line 2687)
Error in panel_record>@(h,ev)CallProcessOnRaw('process_ica') (line 197)

You posted a part of the stack trace (indicating where the error occurs in the code), but the actual error message is missing, therefore it's difficult to track what the error could be.
Maybe some special case of the ICA function from EEGLAB that is not handled correctly (eg. NaN in some of the outputs?)
Have you tried deleting the decomposition and re-running the ICA? Is this behavior reproducible every time your tried?

Hi Francois,

I didn't get an error message. The time gauge (indicating when the process is 100% complete) which runs during ICA stayed static, and the stack trace indicates an error. It only happens on some files, but re-occurs on those files. I tried re-running it (with 40 instead of 20 components) and it seems to capture ocular artifacts better. The same error code was there at the end in the stack trace.

I guess there is at least one line missing in the text you copied in your first post.

The time gauge (indicating when the process is 100% complete) which runs during ICA stayed static

It crashed and just didn't close the waitbar, you can probably just close it.

It only happens on some files, but re-occurs on those files.

Can you share a short example file?
Upload the original file somewhere and post the download link, together with the exact list of operations you do in Brainstorm to reproduce the error. If I can't reproduce it, I won't be able to fit it.

When I close and re-open Brainstorm the IC images are there but none seem to remove the ocular artifacts in the data.

Note that the error you describe is probably only a minor interface bug. If you get your IC in the end, fixing this bug won't help you with your data analysis.
I won't be able to help you finding better ways of capturing your eye blinks with an ICA decomposition.

Hi Francois,

The issue hasn't come up again and I can't track the file. If it happens again I will copy the previous coding and send it. If the issue doesn't alter the ICA output it's ot a concern.

I have another minor query regarding the ICA output. Is it automatically ranked by the highest correlation like the SSP output?

Best
David

The IC are supposed to all capture a similar amount of signal. Unlike the SSP/PCA approach, which gives you sorted components, with the first few ones capturing most of the signal energy.

You have an option of the ICA process to sort the IC based on a correlation score computed with a reference channels:
https://neuroimage.usc.edu/brainstorm/Tutorials/Epilepsy#Artifact_cleaning_with_ICA

Sort components based on correlation with : Sort ICA components based on their correlation with a selection of 'reference' channels (default: ECG & EOG). The sorting is based on the maximum correlation of a given ICA time-series with any of the reference channels.