# notch filter for removing power chord signal

**URL:** <https://mne.discourse.group/t/notch-filter-for-removing-power-chord-signal/488>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [September 12, 2012, 10:07am UTC](https://mne.discourse.group/t/notch-filter-for-removing-power-chord-signal/488 "2012-09-12T10:07:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 12, 2012, 10:07am UTC](https://mne.discourse.group/t/notch-filter-for-removing-power-chord-signal/488/1 "2012-09-12T10:07:36Z")

</div>

Dear list,

I wonder whether there is a MNE-way of removing power-chor artifacts  
from wide-band MEG data (1-200 Hz).  
As there does not seem to be a notch filter available, empty room SSPs  
might be the way to do it.

What do you think?

Denis

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 12, 2012, 3:14pm UTC](https://mne.discourse.group/t/notch-filter-for-removing-power-chord-signal/488/2 "2012-09-12T15:14:55Z")

</div>

hi Denis,

> I wonder whether there is a MNE-way of removing power-chor artifacts  
> from wide-band MEG data (1-200 Hz).

you mean the AC current and the harmonics of 50 or 60Hz?

> As there does not seem to be a notch filter available, empty room SSPs  
> might be the way to do it.

yes don't use SSP for this.

You need a notch like filter but I am not aware of any with mne or mne-python.

Alex

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 12, 2012, 3:33pm UTC](https://mne.discourse.group/t/notch-filter-for-removing-power-chord-signal/488/3 "2012-09-12T15:33:39Z")

</div>

2012/9/12 Alexandre Gramfort \<gramfort at nmr.mgh.harvard.edu\>:

> hi Denis,
> 
> > I wonder whether there is a MNE-way of removing power-chor artifacts  
> > from wide-band MEG data (1-200 Hz).
> 
> you mean the AC current and the harmonics of 50 or 60Hz?

yes.

> > As there does not seem to be a notch filter available, empty room SSPs  
> > might be the way to do it.
> 
> yes don't use SSP for this.

ok, thanks though

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 13, 2012, 2:27am UTC](https://mne.discourse.group/t/notch-filter-for-removing-power-chord-signal/488/4 "2012-09-13T02:27:42Z")

</div>

Hi Denis,

As Alex said SSP cant be used to remove line frequency, as its comes from  
electronics.

If you go mne-Matlab way, you can use eegfilt to have notch filter or try  
harmonics filter which works better for line frequency. For reading and  
writing raw fif file look at mne\_ex\_read\_write\_raw.m.

sheraz

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 13, 2012, 3:29am UTC](https://mne.discourse.group/t/notch-filter-for-removing-power-chord-signal/488/5 "2012-09-13T03:29:38Z")

</div>

Hi Denis,  
&nbsp;&nbsp;&nbsp;The multitaper based rmlinesc() routine in Chronux to remove line noise  
works well:  
[http://www.chronux.org/downloads/chronux/chronux/documentation/chronux\_2\_00/spectral\_analysis/continuous/rmlinesc.html](http://www.chronux.org/downloads/chronux/chronux/documentation/chronux_2_00/spectral_analysis/continuous/rmlinesc.html)

The following is a reference that describes the technique:  
[http://www.ncbi.nlm.nih.gov/pmc/articles/PMC1300074/](http://www.ncbi.nlm.nih.gov/pmc/articles/PMC1300074/)

Also, most of the time I don't remove it so when I do time-frequency  
decompositions I know that I have the scales correctly done when I see the  
line components at the correct frequency..

Regards,  
Hari

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 13, 2012, 12:38pm UTC](https://mne.discourse.group/t/notch-filter-for-removing-power-chord-signal/488/6 "2012-09-13T12:38:31Z")

</div>

Dear Sheraz and Hari -- thanks for the good pointers!

(I hope you did not receive this already, my mail application was  
going wild this morning...)

2012/9/13 Hari Bharadwaj \<hari at nmr.mgh.harvard.edu\>:

> Hi Denis,  
> &nbsp;&nbsp;&nbsp;The multitaper based rmlinesc() routine in Chronux to remove line noise  
> works well:  
> [http://www.chronux.org/downloads/chronux/chronux/documentation/chronux\_2\_00/spectral\_analysis/continuous/rmlinesc.html](http://www.chronux.org/downloads/chronux/chronux/documentation/chronux_2_00/spectral_analysis/continuous/rmlinesc.html)
> 
> The following is a reference that describes the technique:  
> [Analysis of dynamic brain imaging data. - PMC](http://www.ncbi.nlm.nih.gov/pmc/articles/PMC1300074/)
> 
> Also, most of the time I don't remove it so when I do time-frequency  
> decompositions I know that I have the scales correctly done when I see the  
> line components at the correct frequency..

Actually very neat. I haven't thought of that..

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 13, 2012, 10:31pm UTC](https://mne.discourse.group/t/notch-filter-for-removing-power-chord-signal/488/7 "2012-09-13T22:31:13Z")

</div>

Hello,

If I may put my two cents in... Most of the 50/60-Hz interference is  
really the ambient magnetic field. This is the case at least with the  
Elekta Neuromag systems and I believe with most other systems, too.  
Thus, a properly-derived SSP operator should reduce the 50/60-Hz level  
considerably but as such a projection has no notion of time, the same  
spatial filtering is done unnecessarily at all frequencies. If you want  
to keep the spatial patterns as intact as possible, then a notch is a  
better option as Alex pointed out.

Cheers,  
Lauri
