[FieldTrip] filtering during artifact detection

Florian Gerard-Mercier florian at brain.riken.jp
Wed Oct 26 14:36:03 CEST 2016


Dear all,

Note that I encountered the same problem (absence of intended filtering) when using high-level ft_preprocessing function (I talked about it in a a precedent email).
I solved the problem by doing the filtering separately, as a first step, and using the low-level ft_preprocbandstopfilter function.
Anyway I needed access to the data in an unstructured format (i.e. just a matrix, easy to manipulate), so in the end this low-level function fitted my needs better.

All the best,

Florian

> On 26 Oct, 2016, at 9:27 PM, Maximilien Chaumon <maximilien.chaumon at gmail.com> wrote:
> 
> Thank you Diego for your quick reply.
> Whether or not I include those filter parameters explicitly does not change anything.
> This is what i have now:
> 
>         cfg.artfctdef.eog               = [];
>          cfg.artfctdef.eog.bpfilter   = 'yes';
>         cfg.artfctdef.eog.bpfilttype = 'but';
>         cfg.artfctdef.eog.bpfreq     = [1 15];
>         cfg.artfctdef.eog.bpfiltord  = 4;
> 
>        cfg.artfctdef.eog.channel       = eogchans;
>         cfg.artfctdef.eog.trlpadding    = 0;
>         cfg.artfctdef.eog.interactive   = 'yes';
>         cfg.artfctdef.eog.cutoff        = 2.5;
>         
>         [cfg, artifact{iC,iD}]      = ft_artifact_eog(cfg,data);
> 
> 
> but the resulting interactive window looks like this:
> 
> 
> 
> Seems like the preprocessing step isn't applied... any clue why that is?
> 
> 
> Le mer. 26 oct. 2016 à 11:35, Diego Lozano-Soldevilla <dlozanosoldevilla at gmail.com <mailto:dlozanosoldevilla at gmail.com>> a écrit :
> Dear Maximilien,
> 
> You should specify the filter parameters in the cfg:
> 
>     cfg.artfctdef.eog.bpfilter   = 'yes'
>    cfg.artfctdef.eog.bpfilttype = 'but';% or any other filter type you want to use, see help ft_preprocessing for more details
>     cfg.artfctdef.eog.bpfreq     = [1 15]
>     cfg.artfctdef.eog.bpfiltord  = 4; % goes hand-by-hand with the filter type; see 
> 
> Take a look to the fft_artifact_eog.m documentation. To know more about filtering you might want to take a look here:
> http://www.fieldtriptoolbox.org/example/determine_the_filter_characteristics <http://www.fieldtriptoolbox.org/example/determine_the_filter_characteristics>
> 
> Best,
> 
> Diego
> 
> On 26 October 2016 at 10:42, Maximilien Chaumon <maximilien.chaumon at gmail.com <mailto:maximilien.chaumon at gmail.com>> wrote:
> Dear all,
> when attempting to detect blinks automatically on a continuous recording without EOGs, I use a few frontal sensors and ft_artifact_eog as follows:
> 
>         cfg                         = [];
>         cfg.dataset                 = fullfile(rootdir,f{iD});
>         cfg.layout                  = 'neuromag306mag.lay';
>         cfg.trialdef.eventtype      = 'STI101';
>         cfg.trialdef.eventvalue      = {255};
>         cfg                          = ft_definetrial(cfg);
>        
>         cfg.trl                     = [cfg.trl(1,1) cfg.trl(end,2) 0];
>         cfg.channel                 = 'megmag'; 
>         cfg.continuous              = 'yes';
>         data                        = ft_preprocessing(cfg);
> 
> 
>         cfg.artfctdef.eog           = [];
>         cfg.artfctdef.eog.channel   = eogchans;
>         cfg.artfctdef.eog.trlpadding = 0;
>         cfg.artfctdef.eog.interactive = 'yes';
>         
>         [cfg, artifact{iC,iD}]      = ft_artifact_eog(cfg,data);
> 
> This opens an interactive window in which the EOG signal is not BPfiltered, and contains in particular slow drifts that make the threshold detection pretty inefficient. I'm surprised because cfg.artfctdef is supposed to bpfilter 1-15Hz the data, isn't it?
> 
> Is this normal?
> Thanks,
> Max
> 
> 
> 
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl <mailto:fieldtrip at donders.ru.nl>
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip <https://mailman.science.ru.nl/mailman/listinfo/fieldtrip>
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl <mailto:fieldtrip at donders.ru.nl>
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip <https://mailman.science.ru.nl/mailman/listinfo/fieldtrip>_______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20161026/9dc07df9/attachment-0001.html>


More information about the fieldtrip mailing list