[FieldTrip] Low-pass filter before resampling?

Wunderle, Thomas thomas.wunderle at esi-frankfurt.de
Thu Dec 12 10:46:49 CET 2013


Hi all,
I was also thinking about resampling data recently.
The reason is that I saw (as Eelke mentioned) that the Matlab "resample" function applies a Kaiser window function to lowpass filter the data before (down/resampling).
Now, I was not sure if this can create a problem for directed connectivity analysis (like Granger connectivity), because you apply a non-causal kernel which "contaminates" a
given moment in time with the future.
I'm not an expert enough to see through if this is a problem for methods like Granger which rely on predicting a signal given the data in the past.
If so, one should be careful in using non-causal filters e.g. for resampling. 
At the moment I'm using the Matlab function "resample" with the option "0" ( like: y = resample(data,D,N,0)  ), which does then nearest neighbor interpolation.
What's your opinions about that topic?

Best,
Thomas  


-----
Dr. Thomas Wunderle
Ernst Strüngmann Institute (ESI) for Neuroscience
in Cooperation with Max Planck Society 
Deutschordenstrasse 46
60528 Frankfurt am Main, Germany
www.esi-frankfurt.de
thomas.wunderle at esi-frankfurt.de
Tel:   +49 69 96769 519
Fax:   +49 69 96769 555

Sitz der Gesellschaft: Frankfurt am Main
Registergericht: Amtsgericht Frankfurt - HRB 84266
Geschäftsführer: Prof. Dr. Pascal Fries


-----Ursprüngliche Nachricht-----
Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Eelke Spaak
Gesendet: Donnerstag, 12. Dezember 2013 09:48
An: Email discussion list for the FieldTrip project
Betreff: Re: [FieldTrip] Low-pass filter before resampling?

Oops, I was looking in the wrong part of the code for ft_resampledata (usetime = 1, while I should have been looking at usefsample = 1).
There, it is clear that Matlab's resample() is being used, which tells me in the documentation "resample applies an anti-aliasing (lowpass) FIR filter to x during the resampling process. It designs the filter using firls with a Kaiser window." So, it is definitely not needed.

Sorry for filling up your inboxes :)
Eelke

On 12 December 2013 09:45, Eelke Spaak <eelke.spaak at donders.ru.nl> wrote:
> Hi all,
>
> A quick question: in your experience, is it necessary (or advisable) 
> to explicitly apply a low-pass filter (using e.g. ft_preprocessing) 
> before calling ft_resampledata? I previously assumed ft_resampledata 
> (or the low-level implementation, pchip) was taking care of this, but 
> looking in the code I cannot find evidence for or against my 
> assumption.
>
> Thanks,
> Eelke
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip




More information about the fieldtrip mailing list