[FieldTrip] High-pass filter - 0.1

Caspar, Emilie e.caspar at ucl.ac.uk
Mon Aug 25 15:11:59 CEST 2014


Thank you for your answer.

I have found a solution with an order of 3

Thank you for the help :)

Emilie




Le 24 août 2014 à 13:47, Roey Schurr <roeysc at gmail.com<mailto:roeysc at gmail.com>> a écrit :

Dear Emilie,

Try reading this thread and see if it helps:
http://mailman.science.ru.nl/pipermail/fieldtrip/2012-June/005360.html

The bottom line is, if you want a low highpass filer, you need to change the order of the filter you're using.
In the example in the thread above, using a filter of order 5 helped Philipp applying a 0.1 Hz highpass filter. So you could try using something like:
cfg.hpfiltord = 5;

Hope this helps!
Roey


On Sun, Aug 24, 2014 at 1:49 PM, Caspar, Emilie <e.caspar at ucl.ac.uk<mailto:e.caspar at ucl.ac.uk>> wrote:
Thank you for your answer. The complete error message I have is this one, but I'm not able to decrypt it.

Error using filter_with_correction (line 44)
Calculated filter coefficients have poles on or outside the unit circle and will not be stable. Try a higher cutoff
frequency or a different type/order of filter.

Error in filter_with_correction (line 44)
  error('Calculated filter coefficients have poles on or outside the unit circle and will not be stable. Try a
  higher cutoff frequency or a different type/order of filter.');

Error in ft_preproc_bandpassfilter (line 148)
  filt = filter_with_correction(B,A,dat,dir);

Error in preproc (line 299)
if strcmp(cfg.bpfilter, 'yes'),     dat = ft_preproc_bandpassfilter(dat, fsample, cfg.bpfreq, cfg.bpfiltord,
cfg.bpfilttype, cfg.bpfiltdir, cfg.bpinstabilityfix); end

Error in ft_preprocessing (line 559)
      [cutdat{i}, label, time{i}, cfg] = preproc(dat, hdr.label(rawindx), tim, cfg, begpadding, endpadding);

Error in preprocessing_Libet (line 70)
    allData_prepross      = ft_preprocessing(cfg);

It only occurs when I ask for a bpfilterrange from .1 to 30, or any values lower than .9.

Thanks!

Emilie



Le 11 août 2014 à 12:43, Eelke Spaak <eelke.spaak at donders.ru.nl<mailto:eelke.spaak at donders.ru.nl>> a écrit :

Dear Emilie,

The error message you include only specifies *where* in the code the
error happened, not *what* the actual error was. Could you include the
actual error as well? Perhaps someone can then help you fix it. (In
general there is no fixed lower limit on filter low-/highpass
frequency, although a practical limit could depend on your data.)

Best,
Eelke

On 9 August 2014 09:31, Caspar, Emilie <e.caspar at ucl.ac.uk<mailto:e.caspar at ucl.ac.uk>> wrote:
Dear Fieldtrip members,

I would like to apply to my data a bandpass filter from 0.016 (or at least
0.1) to 30 Hz

bpfilterRange = [.1 30];

However, it seems that Fieltrip doesn't accept small high-pass filter
values. I have the following mistake :


Error in preproc (line 299)
if strcmp(cfg.bpfilter, 'yes'),     dat = ft_preproc_bandpassfilter(dat,
fsample, cfg.bpfreq, cfg.bpfiltord,
cfg.bpfilttype, cfg.bpfiltdir, cfg.bpinstabilityfix); end

Error in ft_preprocessing (line 559)
     [cutdat{i}, label, time{i}, cfg] = preproc(dat, hdr.label(rawindx),
tim, cfg, begpadding, endpadding);

Error in preprocessing_Libet (line 70)
   allData_prepross      = ft_preprocessing(cfg);

I also tried with 0.2, 0.5, and the minimum acceptable I found was 0.9,
which is quite high.

I wonder if the problem comes from my data (but I had no problems on others
programs) or if there is a way to apply 0.1 high-pass filter on Fieldtrip?

Thank in advance,

Emilie









_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip



_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140825/0b8c6b84/attachment.html>


More information about the fieldtrip mailing list