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 (https://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/2014-October/002627.html):
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)
[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://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/2014-October/002626.html>
Next message: [Mne_analysis] 50Hz artefact for time frequency analysis <https://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/2014-October/002628.html>
Messages sorted by: [ date ] <https://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/2014-October/date.html#2627> [ thread ] <https://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/2014-October/thread.html#2627> [ subject ] <https://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/2014-October/subject.html#2627> [ author ] <https://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/2014-October/author.html#2627> 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