[FieldTrip] What exactly does filterpadding do?

Brehm, J. (Julia) j.brehm at uu.nl
Mon May 2 16:31:43 CEST 2016


Dear Diego,

yes, thank you, I've seen that already. Unfortunately this does not really help me.

Apparently filtering is not even applied in my case (as the warning says). It seems that the NaNs are introduced in ft_fetch_data, shouldn't these be replaced by zeros where it's not filled by actual data when applying filterpadding? I assume it does that at some other point I couldn't find!?

Furthermore, in the interactive mode one can see that the z-values mimic the data in the first and last trial of the dataset. This leads to the detection of artifacts which are none and missing real artifacts (due to very large effects in those two trials). I have attached a screenshot to illustrate what I mean.

As far as I understand filterpadding uses zero-padding, meaning I can use it on segmented (not continuous) data, correct? So why does this have such a large effect on my whole data instead of simply getting rid of edge effects?

Sorry if I am missing something obvious.

Best,
Julia


________________________________
From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Diego Lozano-Soldevilla [dlozanosoldevilla at gmail.com]
Sent: Monday, May 02, 2016 3:24 PM
To: FieldTrip discussion list
Subject: Re: [FieldTrip] What exactly does filterpadding do?

Dear Julia,

>From the FAQ section:

http://www.fieldtriptoolbox.org/faq/how_does_the_filter_padding_in_preprocessing_work<redir.aspx?REF=0gkAGAqPbCJ2dB292COe_fT8oQ4uUuB0lAE5ZjlGPIMMbbmbkXLTCAFodHRwOi8vd3d3LmZpZWxkdHJpcHRvb2xib3gub3JnL2ZhcS9ob3dfZG9lc190aGVfZmlsdGVyX3BhZGRpbmdfaW5fcHJlcHJvY2Vzc2luZ193b3Jr>
http://www.fieldtriptoolbox.org/faq/how_can_i_interpret_the_different_types_of_padding_that_i_find_when_dealing_with_artifacts<redir.aspx?REF=JxY36va1p9AZr0dc60zsrQZfgm_me-O_jx77ehMz3x4MbbmbkXLTCAFodHRwOi8vd3d3LmZpZWxkdHJpcHRvb2xib3gub3JnL2ZhcS9ob3dfY2FuX2lfaW50ZXJwcmV0X3RoZV9kaWZmZXJlbnRfdHlwZXNfb2ZfcGFkZGluZ190aGF0X2lfZmluZF93aGVuX2RlYWxpbmdfd2l0aF9hcnRpZmFjdHM.>

I hope that helps,

Diego



On 2 May 2016 at 15:08, Brehm, J. (Julia) <j.brehm at uu.nl<redir.aspx?REF=bbm3PKzTSZZ7WAp2IZa3r2IscZbmOgYQdLrtX5WQsp0MbbmbkXLTCAFtYWlsdG86ai5icmVobUB1dS5ubA..>> wrote:
Dear list,

I am having problems applying filterpadding when using ft_artifact_zvalue.

Could someone please explain what exactly the effect of filterpadding is, and in which cases I can apply it and in which not?

I intended to use it to avoid edge effects in the artifact detection. However, I get the following warning (only when applying fltpadding, my data does not actually contain NaNs):

Warning: data contains NaNs, no filtering or preprocessing applied
> In ft_warning (line 181)
  In preproc (line 282)
  In ft_artifact_zvalue (line 292)

These are my settings:
cfg            = [];
cfg.trl        = temptrl; % all trials

cfg.artfctdef.zvalue.channel     = channel{ch};  % single channel
cfg.artfctdef.zvalue.cutoff      = 3;
cfg.artfctdef.zvalue.fltpadding  = 0.1;

cfg.artfctdef.zvalue.bpfilter   = 'yes';
cfg.artfctdef.zvalue.bpfilttype = 'but';
cfg.artfctdef.zvalue.bpfreq     = [1 3];
cfg.artfctdef.zvalue.bpfiltord  = 2;
cfg.artfctdef.zvalue.hilbert    = 'yes';

Thanks!

Best,
Julia

_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<redir.aspx?REF=G8XJ7tCtpbYE8RHR4kVgxIqdcT0l_J9AFDcMhGt9sDcMbbmbkXLTCAFtYWlsdG86ZmllbGR0cmlwQGRvbmRlcnMucnUubmw.>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip<redir.aspx?REF=BpGfhXBN8ygpF5iDmBXoUMkjlLaKCCmwRMHwC-J7PnsMbbmbkXLTCAFodHRwOi8vbWFpbG1hbi5zY2llbmNlLnJ1Lm5sL21haWxtYW4vbGlzdGluZm8vZmllbGR0cmlw>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160502/b63a7ec4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fltpadding_demo.jpg
Type: image/jpeg
Size: 52120 bytes
Desc: fltpadding_demo.jpg
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160502/b63a7ec4/attachment-0001.jpg>


More information about the fieldtrip mailing list