<div dir="ltr">Thank you Diego for your quick reply.<div>Whether or not I include those filter parameters explicitly does not change anything.</div><div>This is what i have now:</div><div><br></div><div><div><span style="font-family:monospace"> cfg.artfctdef.eog = [];</span><br></div><div><font face="monospace"> </font><span style="font-family:monospace"> cfg.artfctdef.eog.bpfilter = 'yes';</span></div><div><font face="monospace"> cfg.artfctdef.eog.bpfilttype = 'but';</font></div><div><font face="monospace"> cfg.artfctdef.eog.bpfreq = [1 15];</font></div><div><font face="monospace"> cfg.artfctdef.eog.bpfiltord = 4;</font></div><br class="inbox-inbox-Apple-interchange-newline"><div><font face="monospace"> cfg.artfctdef.eog.channel = eogchans;</font></div><div><font face="monospace"> cfg.artfctdef.eog.trlpadding = 0;</font></div><div><font face="monospace"> cfg.artfctdef.eog.interactive = 'yes';</font></div><div><font face="monospace"> cfg.artfctdef.eog.cutoff = 2.5;</font></div><div><font face="monospace"> </font></div><div><font face="monospace"> [cfg, artifact{iC,iD}] = ft_artifact_eog(cfg,data);</font></div></div><div><font face="monospace"><br></font></div><div><font face="monospace"><br></font></div><div>but the resulting interactive window looks like this:</div><div><br></div><img src="cid:15800f3666dd0cad2201" alt="pasted1" class="" style="max-width: 100%; opacity: 1;"><div><br></div><div>Seems like the preprocessing step isn't applied... any clue why that is?</div><div><br></div><br><div class="gmail_quote"><div dir="ltr">Le mer. 26 oct. 2016 à 11:35, Diego Lozano-Soldevilla <<a href="mailto:dlozanosoldevilla@gmail.com">dlozanosoldevilla@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Dear Maximilien,<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">You should specify the filter parameters in the cfg:</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><pre style="padding:0.5em;margin-top:0px;margin-bottom:1em;font-size:12px;border:1px dashed rgb(204,204,204);color:rgb(0,0,0);overflow:hidden;font-family:consolas,"andale mono",menlo,monaco,monospace;background-color:rgb(247,249,250);white-space:pre-wrap;width:640px;text-align:justify" class="gmail_msg"> 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 <br class="gmail_msg"></pre></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Take a look to the fft_artifact_eog.m documentation. To know more about filtering you might want to take a look here:</div><div class="gmail_msg"><a href="http://www.fieldtriptoolbox.org/example/determine_the_filter_characteristics" class="gmail_msg" target="_blank">http://www.fieldtriptoolbox.org/example/determine_the_filter_characteristics</a><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Best,</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Diego</div></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg"></div></div><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg">On 26 October 2016 at 10:42, Maximilien Chaumon <span dir="ltr" class="gmail_msg"><<a href="mailto:maximilien.chaumon@gmail.com" class="gmail_msg" target="_blank">maximilien.chaumon@gmail.com</a>></span> wrote:<br class="gmail_msg"></div></div><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Dear all,<div class="gmail_msg">when attempting to detect blinks automatically on a continuous recording without EOGs, I use a few frontal sensors and ft_artifact_eog as follows:</div><div class="gmail_msg"><font face="monospace" class="gmail_msg"><br class="gmail_msg"></font></div><div class="gmail_msg"><div class="gmail_msg"><font face="monospace" class="gmail_msg"> cfg = [];</font></div><div class="gmail_msg"><font face="monospace" class="gmail_msg"> cfg.dataset = fullfile(rootdir,f{iD});</font></div><div class="gmail_msg"><font face="monospace" class="gmail_msg"> cfg.layout = 'neuromag306mag.lay';</font></div><div class="gmail_msg"><font face="monospace" class="gmail_msg"> cfg.trialdef.eventtype = 'STI101';</font></div><div class="gmail_msg"><font face="monospace" class="gmail_msg"> cfg.trialdef.eventvalue = {255};</font></div><div class="gmail_msg"><font face="monospace" class="gmail_msg"> cfg = ft_definetrial(cfg);</font></div><div class="gmail_msg"><font face="monospace" class="gmail_msg"> </font></div><div class="gmail_msg"><font face="monospace" class="gmail_msg"> cfg.trl = [cfg.trl(1,1) cfg.trl(end,2) 0];</font></div><div class="gmail_msg"><span style="font-family:monospace" class="gmail_msg"> cfg.channel = 'megmag'; </span><br class="gmail_msg"></div><div class="gmail_msg"><font face="monospace" class="gmail_msg"> cfg.continuous = 'yes';</font></div><div class="gmail_msg"><span style="font-family:monospace" class="gmail_msg"> data = ft_preprocessing(cfg);</span><br class="gmail_msg"></div><div class="gmail_msg"><span style="font-family:monospace" class="gmail_msg"><br class="gmail_msg"></span></div><span style="font-family:monospace" class="gmail_msg"><br class="gmail_msg"></span></div><div class="gmail_msg"><div class="gmail_msg"><font face="monospace" class="gmail_msg"> cfg.artfctdef.eog = [];</font></div><div class="gmail_msg"><font face="monospace" class="gmail_msg"> cfg.artfctdef.eog.channel = eogchans;</font></div><div class="gmail_msg"><font face="monospace" class="gmail_msg"> cfg.artfctdef.eog.trlpadding = 0;</font></div><div class="gmail_msg"><font face="monospace" class="gmail_msg"> cfg.artfctdef.eog.interactive = 'yes';</font></div><div class="gmail_msg"><font face="monospace" class="gmail_msg"> </font></div><div class="gmail_msg"><font face="monospace" class="gmail_msg"> [cfg, artifact{iC,iD}] = ft_artifact_eog(cfg,data);</font></div><div style="font-family:monospace" class="gmail_msg"><br class="gmail_msg"></div></div><div class="gmail_msg">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?</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Is this normal?</div><div class="gmail_msg">Thanks,</div><div class="gmail_msg">Max</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><font face="monospace" class="gmail_msg"><br class="gmail_msg"></font></div><div class="gmail_msg"><br class="gmail_msg"></div></div>
<br class="gmail_msg"></blockquote></div></div><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br class="gmail_msg">
fieldtrip mailing list<br class="gmail_msg">
<a href="mailto:fieldtrip@donders.ru.nl" class="gmail_msg" target="_blank">fieldtrip@donders.ru.nl</a><br class="gmail_msg">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" class="gmail_msg" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="gmail_msg"></blockquote></div><br class="gmail_msg"></div>
_______________________________________________<br class="gmail_msg">
fieldtrip mailing list<br class="gmail_msg">
<a href="mailto:fieldtrip@donders.ru.nl" class="gmail_msg" target="_blank">fieldtrip@donders.ru.nl</a><br class="gmail_msg">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" class="gmail_msg" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote></div></div>