<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Hi Mats,
<div><br>
</div>
<div>This sometimes happens, and is the consequence of the fact that the specific algorithmic parameters applied prior to Z-scoring the data are intended to increase the sensitivity to the particular type of artifact at hand, but it does not give a guarantee
that all artifact are sufficiently amplified. One reason for this is in your particular case that the jump is not big enough in relation to the total number of samples that are used, causing the Z-value to be sub-threshold.</div>
<div>Either way, if the ‘muscle’ algorithm picks up this jump it’s not a problem, is it? Either way, the ‘interactive’ mode allows you to play around with the threshold, and to reject/accept individual snippets of data, irrespective of whether the threshold
is or is not exceeded.</div>
<div>Out of curiosity, why are you using an ‘old’ version of the code? I suggest that if you have experienced problems with the development version of the code, you team up with one of the knowledgeable people in the group to get it sorted out. If you stick
to using static code, you may not benefit from improvements to the development version that may happen in the future.</div>
<div><br>
</div>
<div>Best,</div>
<div>Jan-Mathijs</div>
<div><br>
</div>
<div>PS: for efficiency you may want to consider to present screen dumps in your e-mail rather than pointing to a mat-file, because it’ll save time for people who are willing to look into your problem.</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<br>
<br>
<div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Jan-Mathijs Schoffelen, MD PhD, Senior researcher
<div><br>
Max Planck Institute for Psycholinguistics<br>
Donders Centre for Cognitive Neuroimaging</div>
<div><br>
E-mail: <a href="mailto:j.schoffelen@donders.ru.nl">j.schoffelen@donders.ru.nl</a><br>
Telephone: +31-24-3614793<br>
<br>
<a href="http://www.hettaligebrein.nl">http://www.hettaligebrein.nl</a></div>
<div><a href="http://www.fieldtriptoolbox.org">http://www.fieldtriptoolbox.org</a></div>
</div>
</div>
</div>
</div>
<div><br class="webkit-block-placeholder">
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
<div>
<div>On Jul 8, 2015, at 10:15 PM, Es, M.W.J. van (Mats) <<a href="mailto:M.vanEs@donders.ru.nl">M.vanEs@donders.ru.nl</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div fpstyle="1" ocsi="0">
<div style="direction: ltr; font-family: Tahoma; font-size: 10pt;">
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
Hi everyone,</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
I am currently preprocessing my MEG data (removing artifacts). The strange thing is that when looking for jump artifacts I don't find any, but when looking for muscle artifacts I do find jump artifacts. See the code below. Here you can find 5 trials of my data,
where in the second trial there is a jump artifact (according to muscle artifact detection): <a href="http://dropcanvas.com/yp0d0" target="_blank" style="color: rgb(17, 85, 204);">http://dropcanvas.com/yp0d0</a></div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
<div>------------------------------<wbr>------------------------------<wbr>------------------</div>
<div><i>load('data_short')</i></div>
<div><i>%% detect jump artifacts </i></div>
<div><i>cfg = [];</i></div>
<div><i> </i></div>
<div><i>% channel selection, cutoff and padding</i></div>
<div><i>cfg.artfctdef.zvalue.channel = 'MEG';</i></div>
<div><i>cfg.artfctdef.zvalue.cutoff = 20; % artifact threshold</i></div>
<div><i>cfg.artfctdef.zvalue.<wbr>trlpadding = 0; </i></div>
<div><i>cfg.artfctdef.zvalue.<wbr>artpadding = 0;</i></div>
<div><i>cfg.artfctdef.zvalue.<wbr>fltpadding = 0;</i></div>
<div><i> </i></div>
<div><i>% algorithmic parameters</i></div>
<div><i>cfg.artfctdef.zvalue.<wbr>cumulative = 'yes';</i></div>
<div><i>cfg.artfctdef.zvalue.<wbr>medianfilter = 'yes';</i></div>
<div><i>cfg.artfctdef.zvalue.<wbr>medianfiltord = 9;</i></div>
<div><i>cfg.artfctdef.zvalue.absdiff = 'yes';</i></div>
<div><i> </i></div>
<div><i>% make the process interactive</i></div>
<div><i>cfg.artfctdef.zvalue.<wbr>interactive = 'yes';</i></div>
<div><i> </i></div>
<div><i>[~, artifact_jump] = ft_artifact_zvalue_old(cfg, data_short);</i></div>
<div><i><br>
</i></div>
<div><i><br>
</i></div>
<div><i>%% Detect muscle artifacts</i></div>
<div><i>cfg = [];</i></div>
<div><i><br>
</i></div>
<div><i>% channel selection, cutoff and padding</i></div>
<div><i>cfg.artfctdef.zvalue.channel = 'MEG';</i></div>
<div><i>cfg.artfctdef.zvalue.cutoff = 4; % artifact threshold</i></div>
<div><i>cfg.artfctdef.zvalue.<wbr>trlpadding = 0; % pad at both sides of trial till it is ... seconds.</i></div>
<div><i>cfg.artfctdef.zvalue.<wbr>fltpadding = 0;</i></div>
<div><i>cfg.artfctdef.zvalue.<wbr>artpadding = 0.2; % take 0.2s padding of an artifact (of the part that is above threshold)</i></div>
<div><i><br>
</i></div>
<div><i>% algorithmic parameters</i></div>
<div><i>cfg.artfctdef.zvalue.bpfilter = 'yes';</i></div>
<div><i>cfg.artfctdef.zvalue.bpfreq = [110 140];</i></div>
<div><i>cfg.artfctdef.zvalue.bpfiltord = 9;</i></div>
<div><i>cfg.artfctdef.zvalue.<wbr>bpfilttype = 'but';</i></div>
<div><i>cfg.artfctdef.zvalue.hilbert = 'yes';</i></div>
<div><i>cfg.artfctdef.zvalue.boxcar = 0.2;</i></div>
<div><i><br>
</i></div>
<div><i>% make the process interactive</i></div>
<div><i>cfg.artfctdef.zvalue.<wbr>interactive = 'yes';</i></div>
<div><i><br>
</i></div>
<div><i>[~, artifact_muscle] = ft_artifact_zvalue_old(cfg, data_short);</i></div>
</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
------------------------------<wbr>------------------------------<wbr>---------------------------</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
Another thing is that when I only look for jump artifacts in the channel from where I know a jump is present, it actually is detected (try specifying <i>cfg.artfctdef.<wbr>zvalue.channel = 'MLF32';)</i></div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
<i><br>
</i></div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
I am using matlab2013a on the mentat cluster and I use the latest version of FieldTrip. Any help on detecting these jump artifacts is greatly appreciated.</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
Best,</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
Mats van Es</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div>
</blockquote>
<div><br>
</div>
</div>
</div>
</div>
<br>
</body>
</html>