[Mne_analysis] ica.apply for MEG and EEG

Denis-Alexander Engemann denis.engemann at gmail.com
Wed Dec 14 14:05:31 EST 2016
Search archives:

Hi Ana,

ICA should be smart enough to figure out which channels it applies to.
The important thing is that you fit it twice, cone for MEG and once for EEG.
The workflow then is to apply them sequentially to your raw object.
I am not sure if we have an example that shows this.
We'll check that and add it if it doesn't exist.
Thanks for bringing this up!

Denis

On Wed, Dec 14, 2016 at 7:45 PM A. Klimovich-Smith <ak798 at cam.ac.uk> wrote:

> Dear mne python users,
>
> I am trying to take out eog artifacts using mne python artifact
> correction with ICA. I do ICA on raw data that has both EEG and MEG
> data. I first pick MEG ch., do ICA on them (ica.fit where 'picks' has
> meg only) and find components to reject. Then I want to apply ICA
> solution to the MEG part of data and move onto EEG.
>
> I am doing it like so:
>
> raw_meg_iced=ica.apply(raw, exclude=some_components) #some_components =
> artifact components
>
> picks_eeg=mne.pick_types(raw_meg_iced.info, meg=False, eeg=True,
> eog=False, stim=False, exclude='bads')
>
> ica.fit(raw_meg_iced, picks=picks_eeg) # and so on ...
>
> I was wondering if I am doing the right thing by doing ica.apply on the
> whole raw object? Presumably, since I identify components from meg data
> first, I want to apply ica to meg data only? But ica.apply doesn't have
> 'picks' function. The two functions that perform signal reconstruction
> (_apply_raw and _pick_sources) seem to reconstruct the data from the pca
> components derived from what was ica-ed - i.e the meg data in the first
> instance. Yet the resulting raw_meg_icaed object still has original EEG
> data and I can pick and ICA it subsequently. I can't figure out how it
> knows to keep it in. Clearly I am missing something here.
>
> Thanks a lot for your help,
> Ana
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> The information in this e-mail is intended only for the person to whom it
> is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161214/8d517b8c/attachment.html 


More information about the Mne_analysis mailing list