update: artifact detection

Robert Oostenveld r.oostenveld at FCDONDERS.RU.NL
Sun Feb 5 13:16:31 CET 2006

Dear Luis,

No, we have not described it in much detail in our publications, we
only mention that it is a semi-automatic procedure.

The approach is the following: we bandpass filter the data in the
frequency band where the artifact is most pronounced, then we hilbert
transform (i.e. compute the signal amplitude envelope, which is
comparable to rectifying and smoothing). This is done per channel.
For each signal obtained like this, we z-transform it, i.e. subtract
the mean and divide by the standard deviation (over time). Then we
sum all z-values and divide by the square root of the number of
channels that goes into the sum. This results in a single pseudo-
signal that is sensitive to the artifact that we want to detect. We
then threshold this pseudo siugnal. After thresholding, we use visual
feedback of the original data to check that the desired artifacts are
really detected using the filtering and thhesholding options. In the
feedback, the original unfiltered data of that channel is shown which
contributed the most to the z-value (i.e. the channel that is the
most artifact-like).

We are reasonably happy with the performance of this approach on MEG
and on EOG data, it allows us to do it reasonably objective and it
saves a lot of time browsing through the 151 channels of our MEG.
Recently we recorded a small MEG dataset with a lot of artifacts on
purpose. I am working on writing a tutorial on the artifact detection
using that dataset, which will then also be made available on the ftp


On 3-feb-2006, at 8:44, Dr. Jose Luis Patino Vilchis wrote:

> Dear Robert,
> Is it there a paper explaining how the muscle artifact rejection is
> done?
> best regards
> Luis Patino

More information about the fieldtrip mailing list