[FieldTrip] Fwd: Filtering

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Mon Sep 12 08:51:48 CEST 2011


Hi Tadeusz,

I forward the reply to your question to this forum, because other people may benefit from the discussion. Also, for future questions, it would be good if you directed any question to this list. Everybody can participate in the discussion, increasing the odds for its resolution. Also, in general, when posting a question it would be good to provide as many details as possible (with respect to matlab version, fieldtrip version etc, but also with for example relevant screen dumps).

As to your question, please have a look at the pasted matlab-code and attached figure below. In short, I tried to reproduce your problem, but I fail to do so (because the blue and red lines look different enough). Be sure that you use an up-to-date version of FieldTrip. I remember that there have been some problems with filtering in the past, but these have been resolved quite some time ago (at least > 0.5 year or even longer).

Best wishes,

Jan-Mathijs


>> data = [];
>> data.trial{1} = randn(1,10000);
>> data.time{1}  = (0:9999)/1000;
>> data.fsample  = 1000;
>> data.label    = {'1'};
>> cfg = [];
>> cfg.bpfilter = 'yes';
>> cfg.bpfreq   = [0.01 0.2];
>> cfg.bpfilttype = 'fir';
>> datafilt = ft_preprocessing(cfg, data);
Warning: the data does not contain a trial definition 
> In utilities/private/warning_once at 81
  In utilities/private/fixsampleinfo at 51
  In ft_datatype_raw at 95
  In ft_checkdata at 170
  In ft_preprocessing at 284
Warning: reconstructing sampleinfo by assuming that the trials are consecutive
segments of a continuous recording 
> In utilities/private/warning_once at 81
  In utilities/private/fixsampleinfo at 64
  In ft_datatype_raw at 95
  In ft_checkdata at 170
  In ft_preprocessing at 284
preprocessing
preprocessing trial 1 from 1
the call to "ft_preprocessing" took 1 seconds and an estimated 8 MB
>> figure;plot(data.trial{1});hold on;plot(datafilt.trial{1},'r');


 

Begin forwarded message:

> From: "T.W. Kononowicz" <t.w.kononowicz at gmail.com>
> Date: September 9, 2011 3:01:07 PM GMT+02:00
> To: <jan.schoffelen at donders.ru.nl>
> Subject: Filtering
> 
> Dear Prof. Schoffelen,
> 
> I am trying to filter continuous data using the following code. However, this procedure doesn't affect the data at all. It looks similarly for low and high pass filtering options. I am really puzzled what could go wrong here. Any suggestions?   
> 
> cfg = [];
> cfg.dataset     = '01_21_mRef.vhdr';
> chans = {'FCz' 'Cz' 'Fz'};
> cfg.channel = chans;
> cfg.bpfilter = 'yes';
> cfg.bpfilttype = 'fir';
> cfg.bpfreq = [0.01 0.2];
> data = ft_preprocessing(cfg);
> 
> Thank you in advance,
> 
> Tadeusz Kononowicz
> University of Groningen, Experimental Psychology
> 
> 

Jan-Mathijs Schoffelen, MD PhD 
Donders Institute for Brain, Cognition and Behaviour, 
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
Telephone: +31-24-3614793

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110912/90d49f92/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: untitled.png
Type: image/png
Size: 6767 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110912/90d49f92/attachment-0001.png>


More information about the fieldtrip mailing list