MEG-preprocessing

Dear Francois,

I am sorry to bother you.

My MEG is Elekta Neuromag fif file, and it have 306 channels. I have performed the band-pass and notch filtering to preprocess the MEG data in Brainstorm.

However, I observed that the heartbeat artifact was also very serious, but I did not collect the ECG signal when collecting the data. It seems necessary to perform ICA to remove ECG artifacts.

When running ICA, I am not sure how many components should be set. When I set it to 300, the ICA algorithm cannot converge. Do you have any suggestions for setting the number of the components ?

From the tutorial you released, I learned that MNE-Python is very suitable for MEG preprocessing. However, I don't know how to import the data I have performed MRI/MEG registration and filtering into MNE-Python, and then how to export it back to Brainstrom for source estimation after preprocessing.

I'm sorry to have written such a long message. I'd appreciate any suggestions from you.
Thanks for your kind attention and look forward your prompt reply.
Your,
Han Xiaoke

If the artifact is clearly observable on at least one MEG channel, you could try to run the heartbeat detection on this channel, or mark cardiac events manually, and then run SSP:
https://neuroimage.usc.edu/brainstorm/Tutorials/ArtifactsDetect
https://neuroimage.usc.edu/brainstorm/Tutorials/ArtifactsSsp

When running ICA, I am not sure how many components should be set. When I set it to 300, the ICA algorithm cannot converge. Do you have any suggestions for setting the number of the components ?

Unfortunately, I don't have any advice to give regarding the number of components to use.
Have you tried leaving this parameter to zero? (this passes all the recordings to the ICA instead of performing a SVD-based dimension reduction first)
If the recordings was processed with MaxFilter first, the recordings probably have a rank ~64, instead of 306 (lots of dimensions of the data are removed), so you could maybe try with much lower numbers of components?

From the tutorial you released, I learned that MNE-Python is very suitable for MEG preprocessing.

Calling the MNE-Python ICA from Brainstorm is part of our planned developments, but I can't tell you when this is going to be implemented.
If you are a good Matlab and Python coder, you could try writing a new process similar to process_mne_maxwell.m / process_mne_maxwell_py.m

https://neuroimage.usc.edu/brainstorm/Tutorials/TutUserProcess

Dear Francois,
Thank you very much for your help :coffee:.
Best Regards.
Han Xiaoke