I am trying to run ICAs on EEG data imported from .mat matrices. These files import fine and can be displayed just like my .eeg BrainVision EEG files. It is also possible to run ICAs on the EEG data imported from .mat matrices without trouble. However, when we try to select a component for removal, the waveforms of the raw data go completely flat.
Here is an example before selecting a component representing blink artifacts
And after selecting the component representing blink artifacts
We only encounter this behavior with files imported from .mat matrices. Do you have any ideas? Should we try to convert to another file type before importing into Brainstorm?
Thank you always for your help.
The format should not be a problem.
Could you share one of the culprit files, and the details of your pipeline?
It's good to see that Francois has some help these days!
I have identified the potential source of the problem. The .mat files were simply two dimensional time-series data arrays. Time was recorded on the first row, followed by 32 rows representing the EEG electrodes, and some additional rows representing other recorded data (e.g. accelerometer, manual triggers, etc).
Strangely, .mat files which had 43 rows of data did not pose a problem for performing ICA in Brainstorm. However, .mat files from a different study which had 56 rows of data produced the problem outlined in the beginning of this thread. Curious as to whether it was simply the dimensions of the file that were causing a problem, I removed all the rows in the .mat file except for the EEG channels and resaved it. Then I read the file into Brainstorm and performed the ICA. There was no problem at all.
It is worth noting that some of the data rows I removed were those with manual keyboard markers in them. These data rows were comprised of blank values or 1, depending on if the marker key was pressed.
Therefore, I suspect one of two things. Either 1) even though I had labeled those channels as "Misc", and was applying the ICA on channels labeled as "EEG", somehow, Brainstorm was not able to apply the SSP projector due to the fact that the data array in the Misc channels had missing values (seems most likely). Or, 2) Brainstorm simply is not able to apply ICA based projectors on files with too many channels (seems unlikely).
What do you think? I am attaching a .mat file with 56 data rows for you to try for yourself. (EEG is in rows 2-33).