dft filtering for 50Hz

Robert Oostenveld r.oostenveld at FCDONDERS.RU.NL
Thu Feb 2 16:55:36 CET 2006


Hi Vladimir,

On 2-feb-2006, at 15:56, Vladimir Litvak wrote:
> I think I already asked you this once but I couldn't find your
> answer in my
> archives. In the Science paper and in the recent J. Neurosci. Paper
> of Bauer
> et al. you mention the method for removing line noise with DFT. Is it
> implemented in FT? C

yes. in preprocessing with cfg.dftfilter=yes, optionally cfg.dftfreq
(default is [50 100 150]), and what we do is cfg.padding=10 to pad
the data up to 10 seconds before subtracting the 50Hz sine wave. The
padding ensures that we only filter out a narrow 1/10 Hz wide
frequency bin. After sufficient mutitapering in the frequency domain,
you won't notice the narrow 50Hz notch any more. If you don't
filterpad, and e.g. have 0.5 s trials, you will put a wider 1/0.5=2Hz
notch in your power spectrum.

> an this just be done 'blindly' as the first step in
> preprocessing or are there any special considerations? I have some
> data with
> TMS artifacts (deltas) which come about once in 10 sec (but not
> regularly).

That is problematic. A delta peak contains all frequencies, hence it
will add significantly to the 50Hz estimate. In case of a jump
estimating the 50Hz component, and subsequently subtracting this
estimate, the filter is very likely to *increase* the amount of 50Hz
in the remainder of the trial. You can consider it as filter ringing:
the DFT filter is an infinite-impuls response (IIR) filter.

We occasionally have "jumping" squids in the MEG, which resembles a
step function. We detect them with artifact_jump, and remove all data
10 seconds before, untill 10 seconds after the jump.

> The part I'm interested in is not contaminated by these deltas but
> do you
> think that such a delta appearing in the 10 sec segment that you
> use to
> compute DFT can somehow lead to a wrong result?

Yep, see above. If there are not many TMS deltas, you should remove
the trials nearby.

This is all implemented in FT with artifact_jump and rejectartifact.
If you are going to use this, please fetch a recent version of
FieldTrip from the ftp server, since I recently cleaned up that part
of the code considerably.

Robert



More information about the fieldtrip mailing list