<div dir="ltr">Hi Ana,<div><br></div><div>ICA should be smart enough to figure out which channels it applies to.</div><div>The important thing is that you fit it twice, cone for MEG and once for EEG.</div><div>The workflow then is to apply them sequentially to your raw object.</div><div>I am not sure if we have an example that shows this.</div><div>We&#39;ll check that and add it if it doesn&#39;t exist.</div><div>Thanks for bringing this up!</div><div><br></div><div>Denis</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Dec 14, 2016 at 7:45 PM A. Klimovich-Smith &lt;<a href="mailto:ak798@cam.ac.uk">ak798@cam.ac.uk</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear mne python users,<br class="gmail_msg">
<br class="gmail_msg">
I am trying to take out eog artifacts using mne python artifact<br class="gmail_msg">
correction with ICA. I do ICA on raw data that has both EEG and MEG<br class="gmail_msg">
data. I first pick MEG ch., do ICA on them (ica.fit where &#39;picks&#39; has<br class="gmail_msg">
meg only) and find components to reject. Then I want to apply ICA<br class="gmail_msg">
solution to the MEG part of data and move onto EEG.<br class="gmail_msg">
<br class="gmail_msg">
I am doing it like so:<br class="gmail_msg">
<br class="gmail_msg">
raw_meg_iced=ica.apply(raw, exclude=some_components) #some_components =<br class="gmail_msg">
artifact components<br class="gmail_msg">
<br class="gmail_msg">
picks_eeg=mne.pick_types(<a href="http://raw_meg_iced.info" rel="noreferrer" class="gmail_msg" target="_blank">raw_meg_iced.info</a>, meg=False, eeg=True,<br class="gmail_msg">
eog=False, stim=False, exclude=&#39;bads&#39;)<br class="gmail_msg">
<br class="gmail_msg">
ica.fit(raw_meg_iced, picks=picks_eeg) # and so on ...<br class="gmail_msg">
<br class="gmail_msg">
I was wondering if I am doing the right thing by doing ica.apply on the<br class="gmail_msg">
whole raw object? Presumably, since I identify components from meg data<br class="gmail_msg">
first, I want to apply ica to meg data only? But ica.apply doesn&#39;t have<br class="gmail_msg">
&#39;picks&#39; function. The two functions that perform signal reconstruction<br class="gmail_msg">
(_apply_raw and _pick_sources) seem to reconstruct the data from the pca<br class="gmail_msg">
components derived from what was ica-ed - i.e the meg data in the first<br class="gmail_msg">
instance. Yet the resulting raw_meg_icaed object still has original EEG<br class="gmail_msg">
data and I can pick and ICA it subsequently. I can&#39;t figure out how it<br class="gmail_msg">
knows to keep it in. Clearly I am missing something here.<br class="gmail_msg">
<br class="gmail_msg">
Thanks a lot for your help,<br class="gmail_msg">
Ana<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
Mne_analysis mailing list<br class="gmail_msg">
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" class="gmail_msg" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br class="gmail_msg">
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" class="gmail_msg" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
The information in this e-mail is intended only for the person to whom it is<br class="gmail_msg">
addressed. If you believe this e-mail was sent to you in error and the e-mail<br class="gmail_msg">
contains patient information, please contact the Partners Compliance HelpLine at<br class="gmail_msg">
<a href="http://www.partners.org/complianceline" rel="noreferrer" class="gmail_msg" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br class="gmail_msg">
but does not contain patient information, please contact the sender and properly<br class="gmail_msg">
dispose of the e-mail.<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>