[Mne_analysis] 50Hz artefact for time frequency analysis {Disarmed} {Disarmed}

David Leitman davidileitman at gmail.com
Fri Oct 6 10:53:48 EDT 2017
Search archives:

Hi Kris, I do not think so but I will check.  I fear however,  that this noise may becoming from the Elekta HPI coils :)


David I. Leitman PhD
 
Visiting Scientist,
PSYR2 - Psychiatric disorders: from Resistance to Response
Centre de Recherche en Neurosciences de Lyon (CRNL) INSERM-CNRS
 
E. david.leitman at ext.inserm.fr
Web.   davidileitman.com



> On Oct 6, 2017, at 2:57 PM, De Meyer, Kris <kris.de_meyer at kcl.ac.uk> wrote:
> 
> Hi David,
> 
> Did you happen to record a powerline signal with a separate electrode? 
> 
> In that case you can very cleanly regress the powerline noise out of the other electrodes in the time domain without it affecting the signal in any other way. That'd be better then applying filters or attenuating fourier coefficients.
> 
> Best,
> 
> Kris
> 
> 
> 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 David Leitman <davidileitman at gmail.com <mailto:davidileitman at gmail.com>>
> Sent: 06 October 2017 11:43:11
> To: Discussion and support forum for the users of MNE Software
> Subject: [Mne_analysis] 50Hz artefact for time frequency analysis {Disarmed}
>  
> Hi all, 
> 
> I am trying to deal with line noise that may have come from HPI or and outside line ( 60HZ) I saw this thread from Wed Oct 8 08:03:00 EDT 2014: cited below (MailScanner has detected a possible fraud attempt from "emea01.safelinks.protection.outlook.com" claiming to be https://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/2014-October/002627.html <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fpipermail%2Fmne_analysis%2F2014-October%2F002627.html&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7Cce10e51dc4aa4e734edb08d50cb7257a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=koG7xAj9I%2FE9VFkX8FFvJzSaikXQjX6A3WQLwlH84YA%3D&reserved=0>):
> 
> I have used both the notch filter and cHPI_filter approach  provided by MNE but as you can see in the figures attached it does result in some distortions. I  would like to try the approach Donald Kreiger suggests below and  deal with the noise by (1) performing a Fourier transform, (2) attenuating the coefficients of the two frequencies, and (3) reconstructing the modified signal with an inverse Fourier transform.  I have attached the results 
> 
> My question is as follows: 1)is there a good reason not to try this approach 2) Is there a way to implement it natively and  easily within men python?
> 
> Many thanks in advance for your kind attention
> 
> 
> //david 
> 
> P.s.
> attachments of PSD plots  of meg channels raw, filtered with notch filter and with cHPI filter function 
> code to generate filters: 
> for cHPI_filter:
> raw_cHPI=mne.chpi.filter_chpi(raw,include_line=True)
> for notch_filter:
> notches = np.arange(60, 181, 60),
> raw_notch=raw.notch_filter(notches)<L13190PSD_filter_notch_filter_60_180_60_meg_channels_raw_tsss_file.png><L13190PSD_filter_chpi_meg_channels_raw_tsss_file.png><L13190PSD_meg channels_raw_tsss_file.png>
> 
> 
> 
> [Mne_analysis] 50Hz artefact for time frequency analysis
> 
> Krieger, Donald N. kriegerd at upmc.edu  <mailto:mne_analysis%40nmr.mgh.harvard.edu?Subject=Re:%20%5BMne_analysis%5D%2050Hz%20artefact%20for%20time%20frequency%20analysis&In-Reply-To=%3C7FC4F062F840C344B5028EE833EEEADD131E2928%40MSXMBXNSPRD12.acct.upmchs.net%3E>
> Wed Oct 8 08:03:00 EDT 2014
> Previous message: [Mne_analysis] 50Hz artefact for time frequency analysis <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fpipermail%2Fmne_analysis%2F2014-October%2F002626.html&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7Cce10e51dc4aa4e734edb08d50cb7257a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=YCmkEFvJFitNUhGU%2FD4K9hrVV1S7qVZPpJJDP40U32o%3D&reserved=0>
> Next message: [Mne_analysis] 50Hz artefact for time frequency analysis <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fpipermail%2Fmne_analysis%2F2014-October%2F002628.html&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7Cce10e51dc4aa4e734edb08d50cb7257a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=Jr%2BtVr2npNXwuuYEM6BBsNAEmP4X4u1ktplyWKEoE1A%3D&reserved=0>
> Messages sorted by: [ date ] <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fpipermail%2Fmne_analysis%2F2014-October%2Fdate.html%232627&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7Cce10e51dc4aa4e734edb08d50cb7257a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=A7dl%2Fi%2FEC%2FUkkFlsrOAwZW%2BXwpvxpYyuIozqaXgNmb4%3D&reserved=0> [ thread ] <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fpipermail%2Fmne_analysis%2F2014-October%2Fthread.html%232627&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7Cce10e51dc4aa4e734edb08d50cb7257a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=Ve2XcmiVokQHcvyUZahCnHkU1C4yeTYfhn7x%2B3OKKjs%3D&reserved=0> [ subject ] <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fpipermail%2Fmne_analysis%2F2014-October%2Fsubject.html%232627&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7Cce10e51dc4aa4e734edb08d50cb7257a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=YsEUl2bEna43Scb5sEnOWCcmvMuLlu01q36YWF7fFfc%3D&reserved=0> [ author ] <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fpipermail%2Fmne_analysis%2F2014-October%2Fauthor.html%232627&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7Cce10e51dc4aa4e734edb08d50cb7257a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=x9HFGWZei1armPNHUeEXSapWO%2FNENbblS8098lzJ0GU%3D&reserved=0>	Search archives:  
> Hi Elisabeth,
> 
> As someone else pointed out, your 50 Hz is almost certainly from the mains power.
> That is almost surely the source of the 150 Hz also.
> Noise from this source have the properties that (1) the frequency is very stable and (2) the amplitude is almost always also very stable.
> Because of these properties, this type of noise it typically best removed by measuring its amplitude and phase over a fairly long period, say a second or more, and then subtracting it off.  This approach is typically very precise at remove the line noise while leaving any 50 and 150 Hz activity which is not constant in the signal.
> One way it can be done is by (1) performing a Fourier transform, (2) attenuating the coefficients of the two frequencies, and (3) reconstructing the modified signal with an inverse Fourier transform.
> This is likely a better approach than convolution with a notch filter since it explicitly uses the "constant amplitude" property of this noise.
> If the tools are readily available in mne-python, it might be worthwhile to try before chasing the low frequency noise you mentioned.
> 
> One other thing to consider is whether it is actually necessary to remove the noise at all.
> If the method you plan to use to explore the gamma band activity has high spectral resolution, the line noise may just show up as sharp peaks which you can ignore.
> On the other hand, if your method has low spectral resolution, it definitely is worthwhile and likely it will make sense to use some high resolution spectral method to assess whether the spectrum is adequately smooth across the two line noise peaks.
> 
> Finally it might be worthwhile to check a few data samples from other runs to see if line noise is consistently showing up on those same channels.  If so,  it's likely that the noise pickup is due to loss of proper "balance" by the amplifiers or to degradation in the connections which run to those amplifiers.
> 
> Regards,
> 
> Don
> 
> From: mne_analysis-bounces at nmr.mgh.harvard.edu <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7Cce10e51dc4aa4e734edb08d50cb7257a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=9ITrN5lfabA2bZslNrHJBLEyo9xexlMsO92Lfwov3vM%3D&reserved=0> [mailto:mne_analysis-bounces at nmr.mgh.harvard.edu <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7Cce10e51dc4aa4e734edb08d50cb7257a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=9ITrN5lfabA2bZslNrHJBLEyo9xexlMsO92Lfwov3vM%3D&reserved=0>] On Behalf Of Elisabeth Fonteneau
> Sent: Wednesday, October 08, 2014 7:31 AM
> To: mne_analysis at nmr.mgh.harvard.edu <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7Cce10e51dc4aa4e734edb08d50cb7257a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=9ITrN5lfabA2bZslNrHJBLEyo9xexlMsO92Lfwov3vM%3D&reserved=0>
> Subject: [Mne_analysis] 50Hz artefact for time frequency analysis
> 
> Hi all,
> Thanks for your reply,
> Indeed the artefacts are coming from the cHPI (I did not say that it is not picking up the electrical mainline)
> But here is a snapshot (see files in the link below) of one participant/part with the artefact
> You have view of few electrodes and this is raw data
> The green line correspond to the start of the cHPI
> You could see that before some electrodes were bad and remain unchanged
> However some EEG were good before and with cHPI they have picked up some high frequency
> Also In general you could see that all EEG picked up some level of artefacts
> I gave you also a plot for this subject/part of frequency decomposition
> The EEG have 50z, 150z & around 330Hz
> See files in art2/art4
> MailScanner has detected a possible fraud attempt from "emea01.safelinks.protection.outlook.com" claiming to be https://www.dropbox.com/sh/hm7pdbhoc98yxf2/AABlCIdmLs4sWHw3W0sHesYGa?dl=0 <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dropbox.com%2Fsh%2Fhm7pdbhoc98yxf2%2FAABlCIdmLs4sWHw3W0sHesYGa%3Fdl%3D0&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7Cce10e51dc4aa4e734edb08d50cb7257a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=4rGYB%2F2KgQwrUOVbEjurrUJ%2F2dF9J21hkjLhMTWrYrY%3D&reserved=0>
> 
> Elekta is aware about this problem as it was recurrent in our recent recordings and they are investigating
> 
> For the analysis,
> I started to use a notch filter and it seems that it is removing the artefacts as I would like (filtering the 3 sensors together)
> However by comparing the unfilter vs notch filter data
> I noticed that the filter data have another low frequency component added (around 10Z) , effect present in the Mag
> See figure art5 in the same dropbox..
> 
> I am using MNE_python for this notch filter with the command
> raw.notch_filter(np.arange(50, 251, 50), method='fft', n_jobs=4)
> 
> any tips for this low frequency band addition?
> 
> 
> 
> Thanks for your answers
> Elisabeth
> 
> 
> 
> __________________________________________________________
> 
> Dr Elisabeth Fonteneau
> Neurolex Group
> Department of Psychology
> University of Cambridge
> Downing Street, Cambridge CB2 3EB, UK
> Phone: +44 1223 333 548
> Email: ef309 at cam.ac.uk <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7Cce10e51dc4aa4e734edb08d50cb7257a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=9ITrN5lfabA2bZslNrHJBLEyo9xexlMsO92Lfwov3vM%3D&reserved=0><mailto:ef309 at cam.ac.uk <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7Cce10e51dc4aa4e734edb08d50cb7257a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=9ITrN5lfabA2bZslNrHJBLEyo9xexlMsO92Lfwov3vM%3D&reserved=0>>
> Web: MailScanner has detected a possible fraud attempt from "emea01.safelinks.protection.outlook.com" claiming to be www.neurolex.psychol.cam.ac.uk/directory/ <https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.neurolex.psychol.cam.ac.uk%2Fdirectory%2F&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7Cce10e51dc4aa4e734edb08d50cb7257a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=wt59CRRXg9UI6f1IyGS8k1hnjuX3h21wvzNN4bJ3KcU%3D&reserved=0>ef309 at cam.ac.uk <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7Cce10e51dc4aa4e734edb08d50cb7257a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=9ITrN5lfabA2bZslNrHJBLEyo9xexlMsO92Lfwov3vM%3D&reserved=0><MailScanner has detected a possible fraud attempt from "emea01.safelinks.protection.outlook.com" claiming to be http://www.neurolex.psychol.cam.ac.uk/directory/ef309@cam.ac.uk <https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.neurolex.psychol.cam.ac.uk%2Fdirectory%2Fef309%40cam.ac.uk&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7Cce10e51dc4aa4e734edb08d50cb7257a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=I0blRspIN3CFtmMWd08HWgIuajUU0u9ntTRp54Ihwf0%3D&reserved=0>>
> 
> 
> 
> 
> David I. Leitman PhD
>  
> Visiting Scientist,
> PSYR2 - Psychiatric disorders: from Resistance to Response
> Centre de Recherche en Neurosciences de Lyon (CRNL) INSERM-CNRS
>  
> E. david.leitman at ext.inserm.fr <mailto:david.leitman at ext.inserm.fr>
> Web.   MailScanner has detected a possible fraud attempt from "emea01.safelinks.protection.outlook.com" claiming to be davidileitman.com <https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdavidileitman.com&data=01%7C01%7Ckris.de_meyer%40kcl.ac.uk%7Cce10e51dc4aa4e734edb08d50cb7257a%7C8370cf1416f34c16b83c724071654356%7C0&sdata=moibKlY9eeYwbg%2BiTBCICoy%2FSEB5C5pVwTCu1pLlAlU%3D&reserved=0>
> 
> 
> 
> _______________________________________________
> 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 <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 <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/20171006/9ad32029/attachment-0001.html 


More information about the Mne_analysis mailing list