[FieldTrip] Problems with "filter_with_correction"

Stephen Whitmarsh stephen.whitmarsh at gmail.com
Fri Jul 6 21:43:04 CEST 2018


Hi Maxime,

I wouldn't know why this would occur if everything else is the same, except
that perhaps your current MATLAB in combination with your OS uses slightly
different implementations of filter functions from e.g. another
toolbox/other MATLAB versions.

In any case, as the function suggests, these problems typically occur for
me when the low-pass frequency that is requested is too low for what the
data and filter allows. The artefact detection functions probably uses a
low/bandpass filter so try increasing the low cutoff, changing the filter
order, or the filter type. You might also try using longer trial-lengths.

cheers,
Stephen





On 3 July 2018 at 09:57, maxime ferez <maxime.ferez at gmail.com> wrote:

> Dear all,
>
> I have a question about Fieldtrip artifact-rejection. I find myself having
> a problem that I do not know how to solve. I am currently working on a pc a
> little old (~ 5 years) and my analyzes worked properly, or at least I had
> no bug. When I changed my pc the problem has arrived. I have an error
> message "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" that appears in the "filter_with_correction" function
> .The problem seems to occur during the "roots" function of Matlab. I
> verified and the vector that is introduced is exactly the same in both
> cases, but after the function “roots” runs the result differs slightly
> and induces the error message above. Has anyone ever had this problem or
> know where the problem might come from? On both pcs I have exactly the same
> versions of Matlab (R2017a) and fieldtrip (fieldtrip-20171004 and
> fieldtrip-20180626). Scripts and data are also identical in all cases. I
> have tried several configurations but failed to find the solution:
>
>     - Ubuntu 16.04 machine about 5 years -> OK
>
>     - Ubuntu 16.04 machine about 2 years -> Not OK
>
> The two machines above are identical in all softwares (deployed with
> script in PXE)
>
>     - Fedora 27 machine about 2 years -> Not OK
>
>     - Ubuntu 16.04 about 2 years -> Not OK
>
>     - Fedora 17 about 8 years old -> OK
>
>     - Centos7 machine less than a year -> Not OK
>
> To conclude, the script only works on old hardware but this does not seem
> logical as an explanation.
>
> Best regards,
>
>
>
> Maxime Ferez
>
>
> --
> Maxime Ferez, ingénieur d'étude
> Centre de Recherche en Neuroscience de Lyon (CRNL)
> Inserm
> équipe Dycog
> Bron, France
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20180706/6a834233/attachment-0001.html>


More information about the fieldtrip mailing list