[Mne_analysis] Mne_analysis Digest, Vol 103, Issue 33

Jona Sassenhagen jona.sassenhagen at gmail.com
Sat Aug 27 05:45:23 EDT 2016
Search archives:

First, to get components maps, use mne.preprocessing.ica._get_ica_map

Second, it seems you're not running current master, can you check if things improve on current master?

> On 27 Aug 2016, at 11:04, mne_analysis-request at nmr.mgh.harvard.edu wrote:
> 
> Send Mne_analysis mailing list submissions to
> 	mne_analysis at nmr.mgh.harvard.edu
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> or, via email, send a message with subject or body 'help' to
> 	mne_analysis-request at nmr.mgh.harvard.edu
> 
> You can reach the person managing the list at
> 	mne_analysis-owner at nmr.mgh.harvard.edu
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Mne_analysis digest..."
> 
> 
> Today's Topics:
> 
>   1. corrmap / plot_topomap / layout question
>      (Nugent, Allison C. (NIH/NIMH) [E])
>   2. Best way to apply eye blink projections with the	common
>      average (Boggess, Matthew Jozsef)
>   3. Re: Best way to apply eye blink projections with the common
>      average (Mainak Jas)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Sat, 27 Aug 2016 03:06:53 +0000
> From: "Nugent, Allison C. (NIH/NIMH) [E]" <nugenta at mail.nih.gov>
> Subject: [Mne_analysis] corrmap / plot_topomap / layout question
> To: "'Mne_analysis at nmr.mgh.harvard.edu'"
> 	<Mne_analysis at nmr.mgh.harvard.edu>
> Message-ID: <C8161699639FAA44AA4D5FFF39CED88531C9432E at msgb07.nih.gov>
> Content-Type: text/plain; charset="us-ascii"
> 
> Hello,
> 
>   I have a very large dataset where unfortunately we did not have an EOG or ECG channel.  Thus, I am interested in using template matching using corrmap.  I have a small dataset with lots of robust artifacts I'd like to use to derive the templates.  So, I performed an ICA on those, and identified some candidate IC's for templates.  Since I'd really rather not load ALL the IC's from my small dataset just to get a handful of template IC's, I'm using the option of giving an array as the template.  It took me a while to figure out how to get the IC's out of the analysis as an array, but I think I accomplished it with this:
> 
> from sklearn.utils.extmath import fast_dot
> sub1_ecg1=fast_dot(ica1.mixing_matrix_[:,0].T,ica1.pca_components_[:ica1.n_components_])
> sub1_eog1=fast_dot(ica1.mixing_matrix_[:,8].T,ica1.pca_components_[:ica1.n_components_])
> 
> where ica1 was the 50-IC ica performed on the subject 1 dataset, and IC000 is obviously the ECG component and IC008 is obviously the EOG component, I can verify this with:
> 
> ica1.plot_sources(dataset1, picks=[0,8])
> ica1.plot_components(picks=[0,8])
> 
> Then, I run:
> 
> (fig_temp,fig_detect)=corrmap([ica2, ica3,ica4,ica5],template=sub1_ecg1,show=True,ch_type='mag',threshold=0.9)
> 
> For the time being, I'm just using the other ICs in my small dataset, and comparing them with the ECG and EOG template.
> 
> Now, when I ran this with the ECG template, I first got a graph entitled "Supplied template Subj 0 IC 0", then when I close that I get a second graph of more plots, also entitled "Supplied template" with matching components for subjects 0,1,and 3 (which I believe correspond to indices in the list of ica's I supplied to corrmap.
> 
> The image I see for the supplied template does not look the same as what I get when I use ica1.plot_components(picks=[0,8]) - the ica.plot_components looks much smoother, but I can't see where there's any interpolation.  I'd like to plot the array template I obtained with fast_dot, but I'm having trouble with the layout - It's the 275 sensor CTF layout, but each dataset is missing a few channels.  They aren't labeled as bad, they just aren't in the dataset.  It seems like it should be a simple problem, but I'm having a difficult time figuring out an easy way to identify which channels are missing.
> 
> There were a lot of questions embedded in there, here's a summary:
> 
> 
> 1)      Have I correctly extracted the IC maps using fast_dot?
> 
> 2)      Why do the components plotted with ica.plot_components look different than the template component figure from corrmap?
> 
> 3)      Why is corrmap giving me only figures labeled 'supplied template', unlike what's shown in the tutorials?
> 
> 4)      Is there a simple way to edit the pos derived from the 275 channel layout to reflect the sensor list in each dataset, to feed to mni.viz.plot_topomap?
> 
> Thanks!!
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160827/6f56d2ab/attachment-0001.html 
> 
> ------------------------------
> 
> Message: 2
> Date: Wed, 24 Aug 2016 14:01:51 +0000
> From: "Boggess, Matthew Jozsef" <MBOGGESS at mgh.harvard.edu>
> Subject: [Mne_analysis] Best way to apply eye blink projections with
> 	the	common average
> To: "mne_analysis at nmr.mgh.harvard.edu"
> 	<mne_analysis at nmr.mgh.harvard.edu>
> Message-ID:
> 	<C917040A928C8A4C9C9BEBF578946CBC36C910 at PHSX10MB9.partners.org>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hello everyone,
> 
> By default, MNE seems to add an average reference projection to the raw data. I then noticed that when computing an eye blink EOG projection (using compute_proj_eog) the average reference projection gets applied prior to the computation of the projection. However, my intuition would be that you would not want to apply the average reference projection first because it will attenuate the eye blink artifacts and consequently make the periods where you estimate the eye blink noise subspace relatively less dominated by the eye blinks. Is there a recommended ordering to computing and applying these projections?
> 
> Thanks in advance!
> Matt
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160824/db3d21fd/attachment-0001.html 
> 
> ------------------------------
> 
> Message: 3
> Date: Sat, 27 Aug 2016 14:33:50 +0530
> From: Mainak Jas <mainakjas at gmail.com>
> Subject: Re: [Mne_analysis] Best way to apply eye blink projections
> 	with the common average
> To: Discussion and support forum for the users of MNE Software
> 	<mne_analysis at nmr.mgh.harvard.edu>
> Message-ID:
> 	<CANzrpG2t1NABDKyPMnV7JHckGCvvepTrsDuNiwGjeTauENJgnw at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Hi Matt,
> 
> You are indeed correct. Average reference will not only attenuate the eye
> blink but may also spread it to other sensors. Therefore, it is probably
> better to apply it after eye blinks have been removed. The average
> reference is probably added by default while plotting the raw data. Do you
> have the problem even when you remove the proj using raw.del_proj() and
> turn off add_eeg_ref or avg_ref everywhere?
> 
> Mainak
> 
> On Wed, Aug 24, 2016 at 7:31 PM, Boggess, Matthew Jozsef <
> MBOGGESS at mgh.harvard.edu> wrote:
> 
>> Hello everyone,
>> 
>> By default, MNE seems to add an average reference projection to the raw
>> data. I then noticed that when computing an eye blink EOG projection (using
>> compute_proj_eog) the average reference projection gets applied prior to
>> the computation of the projection. However, my intuition would be that you
>> would not want to apply the average reference projection first because it
>> will attenuate the eye blink artifacts and consequently make the periods
>> where you estimate the eye blink noise subspace relatively less dominated
>> by the eye blinks. Is there a recommended ordering to computing and
>> applying these projections?
>> 
>> Thanks in advance!
>> Matt
>> 
>> _______________________________________________
>> 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/20160827/9e365348/attachment.html 
> 
> ------------------------------
> 
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> 
> End of Mne_analysis Digest, Vol 103, Issue 33
> *********************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160827/bd01b4f9/attachment-0001.html 


More information about the Mne_analysis mailing list