[Mne_analysis] corrmap / plot_topomap / layout question

Nugent, Allison C. (NIH/NIMH) [E] nugenta at mail.nih.gov
Fri Aug 26 23:06:53 EDT 2016
Search archives:

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.html 


More information about the Mne_analysis mailing list