<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear all,<div class=""><br class=""></div><div class="">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).</div><div class="">I solved the problem by doing the filtering separately, as a first step, and using the low-level ft_preprocbandstopfilter function.</div><div class="">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.</div><div class=""><br class=""></div><div class="">All the best,</div><div class=""><br class=""><div class="">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="">Florian</div></span>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On 26 Oct, 2016, at 9:27 PM, Maximilien Chaumon <<a href="mailto:maximilien.chaumon@gmail.com" class="">maximilien.chaumon@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Thank you Diego for your quick reply.<div class="">Whether or not I include those filter parameters explicitly does not change anything.</div><div class="">This is what i have now:</div><div class=""><br class=""></div><div class=""><div class=""><span style="font-family:monospace" class=""> cfg.artfctdef.eog = [];</span><br class=""></div><div class=""><font face="monospace" class=""> </font><span style="font-family:monospace" class=""> cfg.artfctdef.eog.bpfilter = 'yes';</span></div><div class=""><font face="monospace" class=""> cfg.artfctdef.eog.bpfilttype = 'but';</font></div><div class=""><font face="monospace" class=""> cfg.artfctdef.eog.bpfreq = [1 15];</font></div><div class=""><font face="monospace" class=""> cfg.artfctdef.eog.bpfiltord = 4;</font></div><br class="inbox-inbox-Apple-interchange-newline"><div class=""><font face="monospace" class=""> cfg.artfctdef.eog.channel = eogchans;</font></div><div class=""><font face="monospace" class=""> cfg.artfctdef.eog.trlpadding = 0;</font></div><div class=""><font face="monospace" class=""> cfg.artfctdef.eog.interactive = 'yes';</font></div><div class=""><font face="monospace" class=""> cfg.artfctdef.eog.cutoff = 2.5;</font></div><div class=""><font face="monospace" class=""> </font></div><div class=""><font face="monospace" class=""> [cfg, artifact{iC,iD}] = ft_artifact_eog(cfg,data);</font></div></div><div class=""><font face="monospace" class=""><br class=""></font></div><div class=""><font face="monospace" class=""><br class=""></font></div><div class="">but the resulting interactive window looks like this:</div><div class=""><br class=""></div><object alt="pasted1" class="" style="max-width: 100%; opacity: 1;" data="cid:15800f3666dd0cad2201" type="application/x-apple-msg-attachment"></object><div class=""><br class=""></div><div class="">Seems like the preprocessing step isn't applied... any clue why that is?</div><div class=""><br class=""></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">Le mer. 26 oct. 2016 à 11:35, Diego Lozano-Soldevilla <<a href="mailto:dlozanosoldevilla@gmail.com" class="">dlozanosoldevilla@gmail.com</a>> a écrit :<br class=""></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); 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>
_______________________________________________<br class="">fieldtrip mailing list<br class=""><a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</div></blockquote></div><br class=""></div></body></html>