[Mne_analysis] Best way to apply eye blink projections with the common average

Boggess, Matthew Jozsef MBOGGESS at mgh.harvard.edu
Wed Aug 31 10:29:31 EDT 2016
Search archives:

Ah ok great. Thanks for pointing this out!
________________________________
From: mne_analysis-bounces at nmr.mgh.harvard.edu [mne_analysis-bounces at nmr.mgh.harvard.edu] on behalf of Marijn van Vliet [w.m.vanvliet at gmail.com]
Sent: Monday, August 29, 2016 3:46 AM
To: Discussion and support forum for the users of MNE Software
Subject: Re: [Mne_analysis] Best way to apply eye blink projections with the common average


Dear Matt,

in the MNE suite, EEG data *always* needs to have a reference set. If no reference is explicitly set, MNE will keep trying to add one (an average reference). This is currently not documented in the manual (I've created a ticket for this https://github.com/mne-tools/mne-python/issues/3538).

In your case, the default average reference is not desired, so you need to explicitly set a reference using the mne.io.set_eeg_reference() function. Doing this will cause MNE to stop adding the average reference all over the place. To explicitly tell MNE that the data has already been referenced, you would call mne.io.set_eeg_reference(raw, []). This will also remove any existing (inactive) average ref projections.

See the API documentation for more details:
http://martinos.org/mne/stable/generated/mne.io.set_eeg_reference.html

regards,
Marijn.


On 08/27/2016 11:34 PM, Boggess, Matthew Jozsef wrote:
Hi Mainak,

I had been explicitly removing the average projection as you suggested, but it perplexingly still seemed to be getting applied. After digging into the code, I think I found out why though. The compute_proj_eog function seems to always add and apply an average reference projection when making the eye blink epochs because the epochs add_eeg_ref parameter is left at its default of True and is not externally exposed (line 187 of ssp.py). Consequently, the compute_proj_eog avg_ref parameter does not actually have any control over whether the average reference gets applied. Is this correct? If so, then perhaps this is a bug that needs to be fixed? Especially if one wants to utilized EOG/ECG SSPs, but doesn't want to average re-reference as Alex pointed out, but also if it is better to first compute the projections and then re-reference. I personally was interested in which order would be best as I am both re-referencing and applying EOG projections.

Thanks for getting back to me!
Matt
________________________________
From: mne_analysis-bounces at nmr.mgh.harvard.edu<mailto:mne_analysis-bounces at nmr.mgh.harvard.edu> [mne_analysis-bounces at nmr.mgh.harvard.edu<mailto:mne_analysis-bounces at nmr.mgh.harvard.edu>] on behalf of Mainak Jas [mainakjas at gmail.com<mailto:mainakjas at gmail.com>]
Sent: Saturday, August 27, 2016 5:03 AM
To: Discussion and support forum for the users of MNE Software
Subject: Re: [Mne_analysis] Best way to apply eye blink projections with the common average

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<mailto: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<mailto: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.





_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu<mailto: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/20160831/4cc899d4/attachment-0001.html 


More information about the Mne_analysis mailing list