Back to the main page.

Bug 2448 - ft_preproc_highpassfilter/lowpassfilter: Default filter order for 'but' filters

Status CLOSED FIXED
Reported 2014-01-22 11:00:00 +0100
Modified 2019-08-10 12:28:26 +0200
Product: FieldTrip
Component: preproc
Version: unspecified
Hardware: Macintosh
Operating System: Mac OS
Importance: P5 normal
Assigned to: Diego Lozano Soldevilla
URL:
Tags:
Depends on:
Blocks:
See also:

Jonathan Daume - 2014-01-22 11:00:23 +0100

The help of ft_preproc_highpassfilter as well as of -lowpassfilter says that default order for the 'but'-filter is set to 4. However, when no value is assigned, the code sets the order to 6. Shouldn't it be set to 4? Or the default value in the help should be updated. CODE from line 88 % compute filter coefficients (line 88) switch type case 'but' if isempty(N) % N=filter order N = 6; end [B, A] = butter(N, max(Flp)/Fn);


Robert Oostenveld - 2014-01-22 12:22:09 +0100

well seen, thanks. I suggest to not change the actual default, as people's scripts might rely on it. Rather we should fix the documentation to be consistent with the code.


Diego Lozano Soldevilla - 2014-01-23 11:30:52 +0100

(In reply to Robert Oostenveld from comment #1) ft_preproc_bandpass uses 6 default filter order but ft_preproc_bandstop uses 4 as default. Should I change it to 6 (as for highpass and low pass) or leave it as it is?


Diego Lozano Soldevilla - 2014-01-23 11:32:35 +0100

(In reply to Diego Lozano Soldevilla from comment #2) ups sorry, forget my last comment: bandpass and bandstop uses 4


Diego Lozano Soldevilla - 2014-01-23 11:40:13 +0100

(In reply to Diego Lozano Soldevilla from comment #3) Sending ft_preproc_highpassfilter.m Sending ft_preproc_lowpassfilter.m Transmitting file data .. Committed revision 9124.


Robert Oostenveld - 2019-08-10 12:28:26 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue describing the issue on https://github.com/fieldtrip/fieldtrip/issues.