[FieldTrip] not seeing expected effects of filtering

Robin robince at gmail.com
Fri Apr 26 12:19:53 CEST 2013


I am having a problem with simple low-pass filtering where I am not seeing
the results I would expect. I am using SVN r8075.

I have a block_data structure which is the result of ft_appenddata with
several runs.

>> block_data

block_data =

           hdr: [1x1 struct]
         label: {234x1 cell}
       fsample: 508.6300
         trial: {1x1265 cell}
          time: {1x1265 cell}
     trialinfo: [1265x1 double]
            cfg: [1x1 struct]
    sampleinfo: [1265x2 double]

>> size(block_data.trial{1})

ans =

   234   560

I then run the following script to lpfilter with two different cut offs and
plot the results which are attached. The output of the filter seems to be
the same whatever I set lpfreq to (but it is definitely doing something).
Am I do something wrong?



% Filtering test
% filter
cfg = [];
cfg.lpfilter = 'yes';
cfg.lpfreq = '5';
cfg.lpfilttype = 'but';
cfg.lpfiltord = 3;
flt_data_5 = ft_preprocessing(cfg, block_data);

cfg = [];
cfg.lpfilter = 'yes';
cfg.lpfreq = '70';
cfg.lpfilttype = 'but';
cfg.lpfiltord = 3;
flt_data_70 = ft_preprocessing(cfg, block_data);

 trl = 100;
chan = 200;
plot(block_data.time{trl}, block_data.trial{trl}(chan,:));
title('Raw Data'); axis tight;
plot(flt_data_5.time{trl}, flt_data_5.trial{trl}(chan,:));
title('5Hz low pass'); axis tight;
plot(flt_data_70.time{trl}, flt_data_70.trial{trl}(chan,:));
title('70Hz low pass'); axis tight;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130426/93cb1e81/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: filter_problem.png
Type: image/png
Size: 10186 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130426/93cb1e81/attachment-0001.png>

More information about the fieldtrip mailing list