[FieldTrip] error in filter_with_correction
Wong-Barnum, Mona
mona at sdsc.edu
Sat Feb 25 02:29:37 CET 2017
Hello fellow FieldTrip'er:
Can someone help me understand and hopefully fix the following runtime error message I am seeing (I searched a bit on the website documentation but didn’t find anything):
Error using filter_with_correction (line 51)
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 51)
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 286)
filt = filter_with_correction(B,A,dat,dir,usefftfilt);
Error in preproc (line 324)
if strcmp(cfg.bpfilter, 'yes'), dat = ft_preproc_bandpassfilter(dat,
fsample, cfg.bpfreq, cfg.bpfiltord, cfg.bpfilttype, cfg.bpfiltdir,
cfg.bpinstabilityfix, cfg.bpfiltdf, cfg.bpfiltwintype, cfg.bpfiltdev,
cfg.plotfiltresp, cfg.usefftfilt); end
Error in ft_preprocessing (line 592)
[cutdat{i}, label, time{i}, cfg] = preproc(dat, hdr.label(rawindx), tim,
cfg, begpadding, endpadding);
Error in test (line 25)
data = ft_preprocessing ( cfg );
Error in run (line 96)
evalin('caller', [script ';']);
Here is my script:
addpath /path/to/my/fieldtrip
ft_defaults
% 1. MEG
disp ( 'Reading 1.fif...' )
cfg = [];
cfg.dataset = '1.fif';
data = ft_preprocessing ( cfg );
disp ( 'Getting MEG channel 1...' )
meg_channel = ft_channelselection ( 'MEG0111', data.label );
cfg = [];
cfg.channel = meg_channel;
meg = ft_selectdata ( cfg, data );
disp ( 'Saving meg...' )
save meg.mat meg -v7.3;
clearvars cfg meg;
% 2. Low delta MEG
disp ( 'Low delta MEG...' )
cfg = [];
cfg.bpfilter = 'yes';
cfg.bpfreq = [0.1 2];
cfg.dataset = '1.fif';
data = ft_preprocessing ( cfg );
cfg = [];
cfg.channel = meg_channel;
cfg.frequency = [0.1 2];
meg = ft_selectdata ( cfg, data );
disp ( 'Saving low delta meg...' )
save low_delta_meg.mat meg -v7.3;
clearvars cfg meg;
Line #25 is the last “data = ft_preprocessing ( cfg );” line.
If I do cfg.bpfreq = [2 4] then there is no error but I really like to get this low [0.1 2] range…any tips?
Mona
*********************************************
Mona Wong
Web & Mobile Application Developer
San Diego Supercomputer Center
Believing we are in control is an
illusion that brings suffering.
*********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170225/6647dcd1/attachment-0001.html>
More information about the fieldtrip
mailing list