Laurence Hunt lhunt at FMRIB.OX.AC.UK
Tue Jun 15 10:20:13 CEST 2010

Hi folks,

I'm trying to filter some MEG data sampled at 200Hz using ft_preproc_highpassfilter. It seems to be behaving slightly strangely. I'm calling it with
Fs = 200;
Fhp = 5;
N = 6;

and a stretch of single-channel data with ~50000 samples. However, the returned data doesn't seem to be filtered at 5Hz. 

When I go into the code and use fvtool to look at the frequency response of the filter, it doesn't have the shape I was expecting:

I wondered whether this was because of the GNU public license version of butter that was being called by fieldtrip (in preproc/private), so I took this out of my matlab path and let it find the Mathworks' butter.m, from the signal processing toolbox. This seemed to give a more sensible looking filter design in fvtool:

The Mathworks' butter.m also seemed to filter the data a bit more like I was expecting. Is this a problem with the GPL version, or am I calling the function wrong?


Laurence Hunt, DPhil Student
 Centre for Functional MRI of the Brain (FMRIB), 
University of Oxford
lhunt at fmrib.ox.ac.uk
Phone: (+44)1865-(2)22738

The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20100615/c3968722/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GPLbutter.png
Type: image/png
Size: 8830 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20100615/c3968722/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MLbutter.png
Type: image/png
Size: 7196 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20100615/c3968722/attachment-0003.png>

More information about the fieldtrip mailing list