Back to the main page.

Bug 1229 - ft_preprocessing: output.cfg doesn't contain filter-order when defaulting

Status ASSIGNED
Reported 2011-12-12 19:18:00 +0100
Modified 2012-01-11 18:00:39 +0100
Product: FieldTrip
Component: preproc
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

Roemer van der Meij - 2011-12-12 19:18:20 +0100

As title. This specific example is from using a butt-bandpass, could be a more general bug.


Johanna - 2011-12-15 09:21:50 +0100

Did it used to, and now it doesn't?


Boris Reuderink - 2012-01-03 11:36:59 +0100

Roemer, could you elaborate a bit? Is this a new feature request? Or did it change it's behaviour? Can you provide a script that demonstrates this issue? That would be a huge time saver.


Roemer van der Meij - 2012-01-03 14:19:01 +0100

If you run: data = []; data.hdr.Fs = 1000; data.hdr.label = {'fakechan1','fakechan2','fakechan3'}; data.fsample = 1000; data.label = {'fakechan1','fakechan2','fakechan3'}; data.trial = {rand(3,3000),rand(3,3000),rand(3,3000)}; data.time = {0:1/1000:1.499,0:1/1000:1.499,0:1/1000:1.499}; data.sampleinfo = [1 1500;1501 3000;3001 4500]; data.cfg = []; cfg = []; cfg.hpfreq = 50; cfg.hpfilter = 'yes'; cfg.hpfilttype = 'but'; data = ft_preprocessing(cfg,data); Then the outputted data.cfg.hpfiltord is empty. It should be 4, as that is the default that is used. The same goes for filttype = 'fir', filttype = 'firls', and for lp's, bp's and bs's. @Johanna: As for as I can remember it was always outputted. Even if it didn't though, it should.


Johanna - 2012-01-03 18:10:41 +0100

As I made a change not too long ago regarding where filter defaults were set, I'll take a look.


Robert Oostenveld - 2012-01-11 14:00:29 +0100

should we consider extending the api like this? function [filt,Fs,Fbp,N,type,dir] = ft_preproc_bandstopfilter(dat,Fs,Fbp,N,type,dir)


Robert Oostenveld - 2012-01-11 14:01:48 +0100

(In reply to comment #5) todo: discuss with JM and Guillaume


Johanna - 2012-01-11 15:03:41 +0100

reminder: the 4 filter types are called both from preproc.m and ft_realtime_signalproxy.m, within FT. Robert, I just noticed today that in ft_realtime_signalproxy.m the default orders are being set to 4/6 in this code, but that should be changed to [] to match how it is done in preproc.m, correct? I have just committed this change (svn rev 5127).


Robert Oostenveld - 2012-01-11 18:00:39 +0100

(In reply to comment #7) agreed