mt_bandwith parameter with spectrum_fit mode for notch_filter

Hello,

I am wondering how to deal with the mt_bandwith parameter while performing a notch_filter. More precisely I have data with a non-fixed power line noise because the recording was done in rural village in Rwanda without grounding. It’s look like a 50Hz power line noise, but when applying a classic notch_filter on it, the noise increase because the frequency line is sometimes around 50 ( 49, 52, 99 ect…)

I know that in Matlab the zaplineplus tool work very well (GitHub - MariusKlug/zapline-plus: Improvements of the ZapLine function to remove line noise from EEG/MEG data. Adds automatic detection of the number of components to remove, and chunks the data into segments to account for nonstationarities.) for this kind of situation but the spectrum_fit look like be theoretically able to do similar filtering. Indeed, when I use the spectrum_fit it reduce my power line noise but not enough. When I increase the mt_bandwith to 50 for instance (it take more time but) it reduce almost entirely my power line noise.

However, I am not sure about what this parameter is doing and if it affect my data in a bad way. Does anybody can explain me what does it do to increase mt_bandwith ?

Kind regards,

Hello @lushoon and welcome to the forum!

Just a very naïve question – in your analysis, will you even be interested in frequencies above, say, 40 Hz? Because if not, you could just apply a low-pass filter and be happy :slight_smile:

Thank you for the forum and the mne by the way ! (For the annecdote my supervisor teach me how to do with matlab but thanks to you I was able to use python now).

Regarding my analysis I am looking at ERP in the time domain and I am not sure about their frequency band. Also, I am really curious about the mt_bandwith parameter because it seem to clean all of the noise around making my ERP more salient but again I am not sure about what does it do :slight_smile:

Maybe @larsoner has some advice here :slight_smile:

1 Like

I am not sure offhand, I always have to look. I’d recommend reading a bit about multitaper analysis. A starting point is the Notes from the notch_filter docs:

Multi-taper removal is inspired by code from the Chronux toolbox, see www.chronux.org and the book “Observed Brain Dynamics” by Partha Mitra & Hemant Bokil, Oxford University Press, New York, 2008. Please cite this in publications if method ‘spectrum_fit’ is used.

Thank you for your answer. Unfortunately the link (www.chronux.org) is not available anymore, now it is http://chronux.org/ (without the www.). In any cases I will search some information about Multi-taper removal first. It is good to have a name on what you want to look for :slight_smile:

I tryed to understand but I think I don’t have the theoretical background. So, if anybody know how to explain how multitaper removal work and what is the effect of changing the bandwith to a muggle it would be perfect !

1 Like